import * as _lucid_evolution_lucid from '@lucid-evolution/lucid';
import { Data, UTxO, Credential, OutRef, LucidEvolution, TxBuilder, Network, WithdrawalValidator, SpendingValidator, Assets, MintingPolicy, Address, PolicyId, ScriptHash, ProtocolParameters, OutputDatum, Script, Datum } from '@lucid-evolution/lucid';
import { AssetClass } from '@3rd-eye-labs/cardano-offchain-common';
import * as Core from '@evolution-sdk/evolution';
import { TSchema, Schema, Data as Data$1 } from '@evolution-sdk/evolution';
import { option, ord } from 'fp-ts';
import * as effect_Schema from 'effect/Schema';
import { Schema as Schema$1 } from 'effect';
import { Predicate } from 'fp-ts/lib/Predicate';
import Decimal from 'decimal.js';
import { ParsedPayload } from '@pythnetwork/pyth-lazer-sdk';

declare const AssetClassSchema: _lucid_evolution_lucid.TObject<{
    currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
    /** Use the HEX encoding */
    tokenName: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type AssetClassD = Data.Static<typeof AssetClassSchema>;
declare function toAssetClassFromLucid(asset: AssetClassD): AssetClass;
declare function getAssetClassComparisonStr(asset: AssetClass): string;
declare const VerificationKeyHashSchema: _lucid_evolution_lucid.TUnsafe<string>;
declare const CredentialSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
    PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
}> | _lucid_evolution_lucid.TObject<{
    ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
}>)[]>;
type CredentialD = Data.Static<typeof CredentialSchema>;
declare const CredentialD: CredentialD;
declare const StakeCredentialSchema: _lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
    Inline: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnion<(_lucid_evolution_lucid.TObject<{
        PublicKeyCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
    }> | _lucid_evolution_lucid.TObject<{
        ScriptCredential: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TUnsafe<string>]>;
    }>)[]>]>;
}> | _lucid_evolution_lucid.TObject<{
    Pointer: _lucid_evolution_lucid.TTuple<[_lucid_evolution_lucid.TObject<{
        slotNumber: _lucid_evolution_lucid.TUnsafe<bigint>;
        transactionIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
        certificateIndex: _lucid_evolution_lucid.TUnsafe<bigint>;
    }>]>;
}>)[]>;
type StakeCredential = Data.Static<typeof StakeCredentialSchema>;
declare const StakeCredential: StakeCredential;
type ParsedOutput<T> = {
    utxo: UTxO;
    datum: T;
};

declare const PythConfigurationSchema: TSchema.Struct<{
    priceFeedId: TSchema.Integer;
}>;
type PythConfiguration = typeof PythConfigurationSchema.Type;
declare const DerivedPythPriceSchema: TSchema.Union<[TSchema.Struct<{
    Value: TSchema.Struct<{
        configuration: TSchema.Struct<{
            priceFeedId: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Struct<{
    Inverse: TSchema.Struct<{
        value: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
    }>;
}>, TSchema.Struct<{
    Divide: TSchema.Struct<{
        x: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
        y: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
    }>;
}>]>;
type DerivedPythPrice = typeof DerivedPythPriceSchema.Type;
declare function fromDataDerivedPythPrice(data: Data$1.Data): DerivedPythPrice;
declare function toDataDerivedPythPrice(derivedPythPrice: DerivedPythPrice): Data$1.Data;
declare const PythFeedParamsSchema: TSchema.Struct<{
    config: TSchema.Union<[TSchema.Struct<{
        Value: TSchema.Struct<{
            configuration: TSchema.Struct<{
                priceFeedId: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        Inverse: TSchema.Struct<{
            value: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
        }>;
    }>, TSchema.Struct<{
        Divide: TSchema.Struct<{
            x: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
            y: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
        }>;
    }>]>;
    pythStatePolicyId: TSchema.ByteArray;
}>;
type PythFeedParams = typeof PythFeedParamsSchema.Type;
declare function serialisePythFeedParams(params: PythFeedParams): Data$1.Data;
declare const PythFeedRedeemerSchema: TSchema.Struct<{
    price: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    auxiliaryData: Schema.SchemaClass<Data$1.Data, Data$1.Data, never>;
}>;
type PythFeedRedeemer = typeof PythFeedRedeemerSchema.Type;
declare function serialisePythFeedRedeemer(r: PythFeedRedeemer): string;
/**
 * IntervalBoundType
 * A type of interval bound. The value for the `Finite` case typically
 represents a number of seconds or milliseconds.
 */
declare const AikenIntervalIntervalBoundType: TSchema.Union<[TSchema.Struct<{
    _tag: TSchema.Literal<["NegativeInfinity"]>;
}>, TSchema.Struct<{
    _tag: TSchema.Literal<["Finite"]>;
} & {
    finite: TSchema.Integer;
}>, TSchema.Struct<{
    _tag: TSchema.Literal<["PositiveInfinity"]>;
}>]>;
/**
 * IntervalBound
 * An interval bound, either inclusive or exclusive.
 */
declare const AikenIntervalIntervalBound: TSchema.Struct<{
    bound_type: TSchema.Union<[TSchema.Struct<{
        _tag: TSchema.Literal<["NegativeInfinity"]>;
    }>, TSchema.Struct<{
        _tag: TSchema.Literal<["Finite"]>;
    } & {
        finite: TSchema.Integer;
    }>, TSchema.Struct<{
        _tag: TSchema.Literal<["PositiveInfinity"]>;
    }>]>;
    is_inclusive: TSchema.Boolean;
}>;
/**
 * ValidityRange
 * A type to represent intervals of values. Interval are inhabited by an
 integer value representing  have a finite lower-bound and/or upper-bound.
 This allows to represent all kind of mathematical intervals:
 ```aiken
 // [1; 10]
 let i0: Interval = Interval
   { lower_bound:
       IntervalBound { bound_type: Finite(1), is_inclusive: True }
   , upper_bound:
       IntervalBound { bound_type: Finite(10), is_inclusive: True }
   }
 ```
 ```aiken
 // (20; infinity)
 let i1: Interval = Interval
   { lower_bound:
       IntervalBound { bound_type: Finite(20), is_inclusive: False }
   , upper_bound:
       IntervalBound { bound_type: PositiveInfinity, is_inclusive: False }
   }
 ```
 */
declare const CardanoTransactionValidityRange: TSchema.Struct<{
    lower_bound: TSchema.Struct<{
        bound_type: TSchema.Union<[TSchema.Struct<{
            _tag: TSchema.Literal<["NegativeInfinity"]>;
        }>, TSchema.Struct<{
            _tag: TSchema.Literal<["Finite"]>;
        } & {
            finite: TSchema.Integer;
        }>, TSchema.Struct<{
            _tag: TSchema.Literal<["PositiveInfinity"]>;
        }>]>;
        is_inclusive: TSchema.Boolean;
    }>;
    upper_bound: TSchema.Struct<{
        bound_type: TSchema.Union<[TSchema.Struct<{
            _tag: TSchema.Literal<["NegativeInfinity"]>;
        }>, TSchema.Struct<{
            _tag: TSchema.Literal<["Finite"]>;
        } & {
            finite: TSchema.Integer;
        }>, TSchema.Struct<{
            _tag: TSchema.Literal<["PositiveInfinity"]>;
        }>]>;
        is_inclusive: TSchema.Boolean;
    }>;
}>;
declare const PythStateDatumSchema: TSchema.Struct<{
    governance: TSchema.Struct<{
        wormhole: TSchema.ByteArray;
        emitterChain: TSchema.Integer;
        emitterAddress: TSchema.ByteArray;
        seenSequence: TSchema.Integer;
    }>;
    trustedSigners: TSchema.Map<TSchema.ByteArray, TSchema.Struct<{
        lower_bound: TSchema.Struct<{
            bound_type: TSchema.Union<[TSchema.Struct<{
                _tag: TSchema.Literal<["NegativeInfinity"]>;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["Finite"]>;
            } & {
                finite: TSchema.Integer;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["PositiveInfinity"]>;
            }>]>;
            is_inclusive: TSchema.Boolean;
        }>;
        upper_bound: TSchema.Struct<{
            bound_type: TSchema.Union<[TSchema.Struct<{
                _tag: TSchema.Literal<["NegativeInfinity"]>;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["Finite"]>;
            } & {
                finite: TSchema.Integer;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["PositiveInfinity"]>;
            }>]>;
            is_inclusive: TSchema.Boolean;
        }>;
    }>>;
    deprecatedWithdrawScripts: TSchema.Map<TSchema.Struct<{
        lower_bound: TSchema.Struct<{
            bound_type: TSchema.Union<[TSchema.Struct<{
                _tag: TSchema.Literal<["NegativeInfinity"]>;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["Finite"]>;
            } & {
                finite: TSchema.Integer;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["PositiveInfinity"]>;
            }>]>;
            is_inclusive: TSchema.Boolean;
        }>;
        upper_bound: TSchema.Struct<{
            bound_type: TSchema.Union<[TSchema.Struct<{
                _tag: TSchema.Literal<["NegativeInfinity"]>;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["Finite"]>;
            } & {
                finite: TSchema.Integer;
            }>, TSchema.Struct<{
                _tag: TSchema.Literal<["PositiveInfinity"]>;
            }>]>;
            is_inclusive: TSchema.Boolean;
        }>;
    }>, TSchema.ByteArray>;
    withdraw_script: TSchema.ByteArray;
}>;
type PythStateDatum = typeof PythStateDatumSchema.Type;
declare function serialisePythStateDatum(r: PythStateDatum): string;
declare function parsePythStateDatum(datum: string): PythStateDatum;
declare const PythUpdatesRedeemerSchema: TSchema.Array<TSchema.ByteArray>;
type PythUpdatesRedeemer = typeof PythUpdatesRedeemerSchema.Type;
declare function serialisePythUpdatesRedeemer(r: PythUpdatesRedeemer): string;

interface CurrencySymbolSP {
    unCurrencySymbol: string;
}
interface TokenNameSP {
    unTokenName: string;
}
/**
 * AssetClassSP used in System Params
 */
type AssetClassSP = [CurrencySymbolSP, TokenNameSP];
type PythPriceConfigurationSP = {
    priceFeedId: number;
};
type DerivedPythPriceSP = {
    tag: 'value';
    val: PythPriceConfigurationSP;
} | {
    tag: 'inverse';
    val: DerivedPythPriceSP;
} | {
    tag: 'divide';
    val: [DerivedPythPriceSP, DerivedPythPriceSP];
};
type PythFeedParamsSP = {
    config: DerivedPythPriceSP;
    pythStatePolicyId: CurrencySymbolSP;
};
declare function fromSysParamsDerivedPythPrice(cfg: DerivedPythPriceSP): DerivedPythPrice;
declare function fromSysParamsPythFeedParams(params: PythFeedParamsSP): PythFeedParams;
type PythFeedConfig = {
    params: PythFeedParamsSP;
    pythFeedValHash: string;
    pythFeedValScriptRef: ScriptReference;
};
type PythConfig = {
    pythStateAssetClass: AssetClassSP;
    /**
     * Key is in the format: "iAsset.ascii/Collateral.currency.hex.Collateral.tokenName.hex".
     * Use the `getPythFeedConfig` helper to querying.
     */
    pythFeeds: {
        [key: string]: PythFeedConfig;
    };
};
declare function getPythFeedConfig(cfg: PythConfig, iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass): PythFeedConfig;
interface SystemParams {
    versionRecordParams: VersionRecordParams;
    validatorHashes: ValidatorHashes;
    treasuryParams: TreasuryParamsSP;
    startTime: StartTime;
    stakingParams: StakingParamsSP;
    stabilityPoolParams: StabilityPoolParamsSP;
    stableswapParams: StableswapParamsSP;
    scriptReferences: ScriptReferences;
    pollShardParams: PollShardParamsSP;
    pollManagerParams: PollManagerParamsSP;
    robParams: RobParamsSP;
    interestCollectionParams: InterestCollectionParamsSP;
    indyToken: AssetClassSP;
    govParams: GovParamsSP;
    executeParams: ExecuteParamsSP;
    collectorParams: CollectorParamsSP;
    cdpParams: CdpParamsSP;
    cdpCreatorParams: CDPCreatorParamsSP;
    cdpRedeemParams: CdpRedeemParamsSP;
    iassetParams: IAssetParamsSP;
    pythConfig: PythConfig;
}
type ValidatorHashes = {
    versionRegistryHash: string;
    treasuryHash: string;
    stableswapHash: string;
    stakingHash: string;
    stabilityPoolHash: string;
    pollShardHash: string;
    pollManagerHash: string;
    robHash: string;
    interestCollectionHash: string;
    govHash: string;
    executeHash: string;
    collectorHash: string;
    cdpHash: string;
    cdpCreatorHash: string;
    iassetHash: string;
};
interface AddressCredential {
    tag: string;
    contents: PubKeyHash;
}
interface ScriptCredential {
    tag: string;
    contents: {
        tag: string;
        contents: string;
    };
}
interface PubKeyHash {
    getPubKeyHash: string;
}
interface VersionRecordParams {
    upgradeToken: AssetClassSP;
}
interface TreasuryParamsSP {
    upgradeToken: AssetClassSP;
    versionRecordToken: AssetClassSP;
    treasuryUtxosStakeCredential: ScriptCredential | undefined;
}
interface StartTime {
    slot: number;
    blockHeader: string;
}
interface StakingParamsSP {
    versionRecordToken: AssetClassSP;
    stakingToken: AssetClassSP;
    stakingManagerNFT: AssetClassSP;
    pollToken: AssetClassSP;
    indyToken: AssetClassSP;
    collectorValHash: string;
}
interface StabilityPoolParamsSP {
    versionRecordToken: AssetClassSP;
    stabilityPoolToken: AssetClassSP;
    snapshotEpochToScaleToSumToken: AssetClassSP;
    iAssetAuthToken: AssetClassSP;
    iassetValHash: string;
    cdpToken: AssetClassSP;
    assetSymbol: CurrencySymbolSP;
    accountToken: AssetClassSP;
    accountCreateFeeLovelaces: number;
    accountProcessingCooldownMs: number;
    accountProcessingBiasMs: number;
    stakeCredential: ScriptCredential | undefined;
}
interface StableswapParamsSP {
    iassetSymbol: CurrencySymbolSP;
    cdpToken: AssetClassSP;
    versionRecordToken: AssetClassSP;
    cdpValHash: string;
    treasuryValHash: string;
}
interface ScriptReferences {
    versionRegistryValidatorRef: ScriptReference;
    treasuryValidatorRef: ScriptReference;
    stakingValidatorRef: ScriptReference;
    stabilityPoolValidatorRef: ScriptReference;
    stableswapValidatorRef: ScriptReference;
    pollShardValidatorRef: ScriptReference;
    pollManagerValidatorRef: ScriptReference;
    robValidatorRef: ScriptReference;
    interestCollectionValidatorRef: ScriptReference;
    iAssetTokenPolicyRef: ScriptReference;
    governanceValidatorRef: ScriptReference;
    executeValidatorRef: ScriptReference;
    collectorValidatorRef: ScriptReference;
    cdpValidatorRef: ScriptReference;
    cdpCreatorValidatorRef: ScriptReference;
    cdpRedeemValidatorRef: ScriptReference;
    iassetValidatorRef: ScriptReference;
    authTokenPolicies: AuthTokenPolicies;
}
interface Output {
    scriptRef: ScriptRef;
    output: ScriptOutput;
}
interface ScriptRef {
    tag: string;
    contents?: string[] | null;
}
interface ScriptOutput {
    referenceScript: string;
    datum: AddressCredentialOrDatum;
    amount: Amount;
    address: AddressSP;
}
interface AddressCredentialOrDatum {
    tag: string;
    contents: string;
}
interface Amount {
    getValue?: ((CurrencySymbolSP | (number[] | null)[] | null)[] | null)[] | null;
}
interface AddressSP {
    addressStakingCredential?: null;
    addressCredential: AddressCredentialOrDatum;
}
interface Input {
    transactionId: string;
    index: number;
}
interface ScriptReference {
    output?: Output;
    input: Input;
}
interface AuthTokenPolicies {
    upgradeTokenRef: ScriptReference;
    stakingTokenRef: ScriptReference;
    stabilityPoolTokenRef: ScriptReference;
    stabilityPoolAuthTokenRef: ScriptReference;
    snapshotEpochToScaleToSumTokenRef: ScriptReference;
    pollManagerTokenRef: ScriptReference;
    iAssetAuthTokenRef: ScriptReference;
    iAssetTokenRef: ScriptReference;
    collateralAssetTokenRef: ScriptReference;
    cdpAuthTokenRef: ScriptReference;
    accountTokenRef: ScriptReference;
    versionRecordTokenPolicyRef: ScriptReference;
}
interface RobParamsSP {
    versionRecordToken: AssetClassSP;
    iassetAuthToken: AssetClassSP;
    collateralAssetAuthToken: AssetClassSP;
    iassetValHash: string;
    iassetPolicyId: CurrencySymbolSP;
}
interface InterestCollectionParamsSP {
    versionRecordNft: AssetClassSP;
    multisigUtxoNft: AssetClassSP;
    cdpAuthTk: AssetClassSP;
    collateralAssetAuthTk: AssetClassSP;
    govAuthTk: AssetClassSP;
    cdpAssetSymbol: CurrencySymbolSP;
    cdpBiasTime: bigint;
    interestSettlementCooldown: bigint;
}
interface PollShardParamsSP {
    stakingValHash: string;
    stakingToken: AssetClassSP;
    pollToken: AssetClassSP;
    indyAsset: AssetClassSP;
}
interface PollManagerParamsSP {
    upgradeToken: AssetClassSP;
    treasuryValHash: string;
    shardsValHash: string;
    pollToken: AssetClassSP;
    pBiasTime: bigint;
    indyAsset: AssetClassSP;
    govNFT: AssetClassSP;
    govExecuteValHash: string;
}
interface GovParamsSP {
    versionRecordToken: AssetClassSP;
    upgradeToken: AssetClassSP;
    pollToken: AssetClassSP;
    pollManagerValHash: string;
    iassetValHash: string;
    indyAsset: AssetClassSP;
    iAssetAuthToken: AssetClassSP;
    govNFT: AssetClassSP;
    gBiasTime: bigint;
    daoIdentityToken: AssetClassSP;
    iassetSymbol: CurrencySymbolSP;
}
interface ExecuteParamsSP {
    govNFT: AssetClassSP;
    upgradeToken: AssetClassSP;
    iAssetToken: AssetClassSP;
    collateralAssetToken: AssetClassSP;
    stabilityPoolToken: AssetClassSP;
    cdpCreatorToken: AssetClassSP;
    cdpToken: AssetClassSP;
    versionRecordToken: AssetClassSP;
    iassetValHash: string;
    cdpValHash: string;
    sPoolValHash: string;
    versionRegistryValHash: string;
    treasuryValHash: string;
}
interface CollectorParamsSP {
    versionRecordToken: AssetClassSP;
    stakingToken: AssetClassSP;
    stakingManagerNFT: AssetClassSP;
}
interface CdpRedeemParamsSP {
    treasuryValHash: string;
    iassetValHash: string;
    partialRedemptionExtraFeeLovelace: number;
    iAssetAuthToken: AssetClassSP;
    collateralAssetAuthToken: AssetClassSP;
    govNFT: AssetClassSP;
    interestCollectorValHash: string;
    cdpAuthToken: AssetClassSP;
    cdpAssetSymbol: CurrencySymbolSP;
    biasTime: bigint;
}
interface CdpParamsSP {
    upgradeToken: AssetClassSP;
    versionRecordToken: AssetClassSP;
    treasuryValHash: string;
    stabilityPoolAuthToken: AssetClassSP;
    spValHash: string;
    iassetValHash: string;
    iAssetAuthToken: AssetClassSP;
    collateralAssetAuthToken: AssetClassSP;
    interestCollectorValHash: string;
    cdpRedeemValHash: string;
    cdpAuthToken: AssetClassSP;
    cdpAssetSymbol: CurrencySymbolSP;
    biasTime: bigint;
}
interface IAssetParamsSP {
    upgradeToken: AssetClassSP;
    versionRecordToken: AssetClassSP;
}
interface CDPCreatorParamsSP {
    versionRecordToken: AssetClassSP;
    upgradeToken: AssetClassSP;
    iAssetAuthTk: AssetClassSP;
    collateralAssetAuthTk: AssetClassSP;
    treasuryValHash: string;
    cdpScriptHash: string;
    iassetValHash: string;
    cdpCreatorNft: AssetClassSP;
    cdpAuthTk: AssetClassSP;
    cdpAssetCs: CurrencySymbolSP;
    biasTime: bigint;
}
declare function toSystemParamsAsset(asset: AssetClass): AssetClassSP;
declare function fromSystemParamsAsset(asset: AssetClassSP): AssetClass;
declare function fromSystemParamsAssetLucid(asset: AssetClassSP): AssetClassD;
declare function fromSystemParamsScriptRef(ref: ScriptReference): OutRef;
declare function fromSysParamsCredential(cred: ScriptCredential): Credential;
declare function fromSysParamsStakeCredential(cred: ScriptCredential): StakeCredential;

declare function openCdp(collateralAmount: bigint, mintedAmount: bigint, sysParams: SystemParams, cdpCreatorOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function adjustCdp(collateralAdjustment: bigint, debtAdjustment: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function depositCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function withdrawCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function mintCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function burnCdp(amount: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, interestCollectorOref: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function closeCdp(cdpOref: OutRef, collateralAssetOref: OutRef, interestOracleOref: OutRef, interestCollectorOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function redeemCdp(
/**
 * When the goal is to redeem the maximum possible, just pass in the total minted amount of the CDP.
 * The logic will automatically cap the amount to the max.
 */
attemptedRedemptionIAssetAmt: bigint, cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, interestCollectorOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, _pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function freezeCdp(cdpOref: OutRef, iassetOref: OutRef, collateralAssetOref: OutRef, priceOracleOref: OutRef | undefined, interestOracleOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;
declare function liquidateCdp(cdpOref: OutRef, stabilityPoolOref: OutRef, interestCollectorOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function mergeCdps(cdpsToMergeUtxos: OutRef[], sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;

declare const InterestOracleDatumSchema: TSchema.Struct<{
    unitaryInterest: TSchema.Integer;
    interestRate: TSchema.Struct<{
        getOnChainInt: TSchema.Integer;
    }>;
    lastUpdated: TSchema.Integer;
}>;
type InterestOracleDatum = typeof InterestOracleDatumSchema.Type;
declare const InterestOracleRedeemerSchema: TSchema.Struct<{
    newInterestRate: TSchema.Struct<{
        getOnChainInt: TSchema.Integer;
    }>;
    currentTime: TSchema.Integer;
}>;
type InterestOracleRedeemer = typeof InterestOracleRedeemerSchema.Type;
declare function serialiseFeedInterestOracleRedeemer(redeemer: InterestOracleRedeemer): string;
declare function parseInterestOracleDatum(datum: string): InterestOracleDatum;
declare function serialiseInterestOracleDatum(datum: InterestOracleDatum): string;

declare const CdpRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    AdjustCdp: TSchema.Struct<{
        currentTime: TSchema.Integer;
        debtAdjustment: TSchema.Integer;
        collateralAdjustment: TSchema.Integer;
        priceOracleIdx: TSchema.Union<[TSchema.Struct<{
            OracleRefInputIdx: TSchema.Integer;
        }>, TSchema.Struct<{
            OracleOutputIdx: TSchema.Integer;
        }>, TSchema.Literal<["OracleVoid"]>]>;
    }>;
}>, TSchema.Struct<{
    CloseCdp: TSchema.Struct<{
        currentTime: TSchema.Integer;
    }>;
}>, TSchema.Literal<["RedeemCdp"]>, TSchema.Struct<{
    FreezeCdp: TSchema.Struct<{
        currentTime: TSchema.Integer;
        priceOracleIdx: TSchema.Union<[TSchema.Struct<{
            OracleRefInputIdx: TSchema.Integer;
        }>, TSchema.Struct<{
            OracleOutputIdx: TSchema.Integer;
        }>, TSchema.Literal<["OracleVoid"]>]>;
    }>;
}>, TSchema.Literal<["MergeCdps"]>, TSchema.Struct<{
    MergeAuxiliary: TSchema.Struct<{
        mainMergeUtxo: TSchema.Struct<{
            txHash: TSchema.ByteArray;
            outputIndex: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Literal<["Liquidate"]>, TSchema.Struct<{
    SettleInterest: TSchema.Struct<{
        interestCollectorInputIndex: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    Stableswap: TSchema.Struct<{
        forwardingInputIndex: TSchema.Integer;
    }>;
}>, TSchema.Literal<["UpgradeVersion"]>]>;
type CdpRedeemer = typeof CdpRedeemerSchema.Type;
declare const RedeemCdpWithdrawalRedeemerSchema: TSchema.Struct<{
    cdpOutReference: TSchema.Struct<{
        txHash: TSchema.ByteArray;
        outputIndex: TSchema.Integer;
    }>;
    currentTime: TSchema.Integer;
    priceOracleIdx: TSchema.Union<[TSchema.Struct<{
        OracleRefInputIdx: TSchema.Integer;
    }>, TSchema.Struct<{
        OracleOutputIdx: TSchema.Integer;
    }>, TSchema.Literal<["OracleVoid"]>]>;
}>;
type RedeemCdpWithdrawalRedeemer = typeof RedeemCdpWithdrawalRedeemerSchema.Type;
declare const CDPContentSchema: TSchema.Struct<{
    cdpOwner: TSchema.NullOr<TSchema.ByteArray>;
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    mintedAmt: TSchema.Integer;
    cdpFees: TSchema.Union<[TSchema.Struct<{
        ActiveCDPInterestTracking: TSchema.Struct<{
            lastSettled: TSchema.Integer;
            unitaryInterestSnapshot: TSchema.Integer;
        }>;
    }>, TSchema.Struct<{
        FrozenCDPAccumulatedFees: TSchema.Struct<{
            iassetInterest: TSchema.Integer;
            collateralTreasury: TSchema.Integer;
        }>;
    }>]>;
}>;
type CDPContent = typeof CDPContentSchema.Type;
declare const StableswapPoolContentSchema: TSchema.Struct<{
    /** Use the HEX encoding */
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    collateralToIassetRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    mintingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    mintingEnabled: TSchema.Boolean;
    redemptionEnabled: TSchema.Boolean;
    feeManager: TSchema.NullOr<TSchema.ByteArray>;
    minMintOrderAmount: TSchema.Integer;
    minRedemptionOrderAmount: TSchema.Integer;
    stableswapValHash: TSchema.ByteArray;
}>;
type StableswapPoolContent = typeof StableswapPoolContentSchema.Type;
declare const CDPDatumSchema: TSchema.Union<[TSchema.Struct<{
    CDP: TSchema.Struct<{
        cdpOwner: TSchema.NullOr<TSchema.ByteArray>;
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        mintedAmt: TSchema.Integer;
        cdpFees: TSchema.Union<[TSchema.Struct<{
            ActiveCDPInterestTracking: TSchema.Struct<{
                lastSettled: TSchema.Integer;
                unitaryInterestSnapshot: TSchema.Integer;
            }>;
        }>, TSchema.Struct<{
            FrozenCDPAccumulatedFees: TSchema.Struct<{
                iassetInterest: TSchema.Integer;
                collateralTreasury: TSchema.Integer;
            }>;
        }>]>;
    }>;
}>, TSchema.Struct<{
    StableswapPool: TSchema.Struct<{
        /** Use the HEX encoding */
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        collateralToIassetRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        mintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        mintingEnabled: TSchema.Boolean;
        redemptionEnabled: TSchema.Boolean;
        feeManager: TSchema.NullOr<TSchema.ByteArray>;
        minMintOrderAmount: TSchema.Integer;
        minRedemptionOrderAmount: TSchema.Integer;
        stableswapValHash: TSchema.ByteArray;
    }>;
}>]>;
type CDPDatum = typeof CDPDatumSchema.Type;
declare function serialiseCdpRedeemer(r: CdpRedeemer): string;
declare function parseCdpRedeemer(datum: string): option.Option<CdpRedeemer>;
declare function parseCdpRedeemerOrThrow(datum: string): CdpRedeemer;
declare function serialiseRedeemCdpWithdrawalRedeemer(r: RedeemCdpWithdrawalRedeemer): string;
declare function serialiseCdpDatum(d: CDPContent): string;
declare function serialiseStableswapPoolDatum(d: StableswapPoolContent): string;
declare function parseCdpDatum(datum: string): option.Option<CDPContent>;
declare function parseCdpDatumOrThrow(datum: string): CDPContent;
declare function parseStableswapPoolDatum(datum: string): option.Option<StableswapPoolContent>;
declare function parseStableswapPoolDatumOrThrow(datum: string): StableswapPoolContent;

declare const RationalSchema: TSchema.Struct<{
    numerator: TSchema.Integer;
    denominator: TSchema.Integer;
}>;
type Rational = typeof RationalSchema.Type;
declare const rationalZero: Rational;
declare function rationalFromInt(a: bigint): Rational;
declare function rationalFloor(a: Rational): bigint;
declare function rationalCeil(a: Rational): bigint;
declare function rationalNegate(a: Rational): Rational;
declare function rationalAdd(a: Rational, b: Rational): Rational;
declare function rationalSub(a: Rational, b: Rational): Rational;
declare function rationalMul(a: Rational, b: Rational): Rational;
declare function rationalDiv(a: Rational, b: Rational): Rational;
declare function rationalToFloat(a: Rational): number;

/**
 * Amount of iasset equal in value to the given number of collateral amount.
 */
declare function iassetValueOfCollateral(collateralAmt: bigint, oraclePrice: Rational): bigint;
/**
 * This is mostly for debugging purposes.
 */
declare function cdpCollateralRatioPercentage(currentSlot: number, iassetPrice: Rational, cdpUtxo: UTxO, cdpContent: CDPContent, interestOracleDatum: InterestOracleDatum, network: Network): number;
/**
 * The amount of iassets to redeem to reach the RMR.
 */
declare function calculateIAssetRedemptionAmt(collateralAmt: bigint, mintedAmt: bigint, price: Rational, rmr: Rational): bigint;
/**
 * Calculates the allowable redemption amount so the min collateral constraint still holds.
 * It caps the redemption amount to still satisfy the min collateral.
 *
 * Returns uncapped max iassets /\ capped max iassets
 *
 * The derived calculation comes from the following equation where:
 * c - collateral
 * m - min collateral
 * r - reimburstment ratio
 * x - redemption amount
 *
 * `c - x + r * x = m`
 * `-x + r * x = m - c`
 * `x * (r - 1) = m - c`
 * `x = (m - c) / r - 1`
 */
declare function calculateMinCollateralCappedIAssetRedemptionAmt(collateralAmt: bigint, mintedAmt: bigint, price: Rational, rmr: Rational, reimbursementRatio: Rational, minCollateral: bigint): {
    uncappedIAssetRedemptionAmt: bigint;
    cappedIAssetRedemptionAmt: bigint;
};
declare function adjustPriceToDecimals(extraDecimals: bigint, price: Rational): Rational;

declare const CdpParamsSchema: _lucid_evolution_lucid.TObject<{
    cdp_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdp_asset_symbol: _lucid_evolution_lucid.TUnsafe<string>;
    iasset_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateral_asset_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    stability_pool_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    upgrade_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    version_record_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    interest_collector_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    sp_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    iasset_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    treasury_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    cdp_redeem_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    bias_time: _lucid_evolution_lucid.TUnsafe<bigint>;
}>;
type CdpParams = Data.Static<typeof CdpParamsSchema>;
declare function castCdpParams(params: CdpParams): Data;
declare const CdpRedeemParamsSchema: _lucid_evolution_lucid.TObject<{
    cdp_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdp_asset_symbol: _lucid_evolution_lucid.TUnsafe<string>;
    iasset_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateral_asset_auth_token: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    interest_collector_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    iasset_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    treasury_val_hash: _lucid_evolution_lucid.TUnsafe<string>;
    gov_nft: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    partial_redemption_extra_fee_lovelace: _lucid_evolution_lucid.TUnsafe<bigint>;
    bias_time: _lucid_evolution_lucid.TUnsafe<bigint>;
}>;
type CdpRedeemParams = Data.Static<typeof CdpRedeemParamsSchema>;
declare function castCdpRedeemParams(params: CdpRedeemParams): Data;

declare const mkCdpValidatorFromSP: (params: CdpParamsSP) => SpendingValidator;
declare const mkCdpRedeemValidatorFromSP: (params: CdpRedeemParamsSP) => WithdrawalValidator;

declare const CDPCreatorParamsSchema: _lucid_evolution_lucid.TObject<{
    cdpCreatorNft: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpAssetCs: _lucid_evolution_lucid.TUnsafe<string>;
    cdpAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iAssetAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateralAssetAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpScriptHash: _lucid_evolution_lucid.TUnsafe<string>;
    treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
    iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
    biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
}>;
type CDPCreatorParams = Data.Static<typeof CDPCreatorParamsSchema>;
declare const CDPCreatorParams: CDPCreatorParams;
declare function castCDPCreatorParams(params: CDPCreatorParams): Data;

declare const mkCDPCreatorValidator: (params: CDPCreatorParams) => SpendingValidator;
declare const mkCDPCreatorValidatorFromSP: (params: CDPCreatorParamsSP) => SpendingValidator;

declare const PollManagerParamsSchema: _lucid_evolution_lucid.TObject<{
    govNFT: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    pollToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    indyAsset: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    govExecuteValHash: _lucid_evolution_lucid.TUnsafe<string>;
    pBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
    shardValHash: _lucid_evolution_lucid.TUnsafe<string>;
    treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type PollManagerParams = Data.Static<typeof PollManagerParamsSchema>;
declare const PollManagerParams: PollManagerParams;
declare function castPollManagerParams(params: PollManagerParams): Data;

declare const PollShardParamsSchema: _lucid_evolution_lucid.TObject<{
    pollToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    stakingToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    indyAsset: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    stakingValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type PollShardParams = Data.Static<typeof PollShardParamsSchema>;
declare const PollShardParams: PollShardParams;
declare function castPollShardParams(params: PollShardParams): Data;

declare const mkPollManagerValidator: (params: PollManagerParams) => SpendingValidator;
declare const mkPollManagerValidatorFromSP: (params: PollManagerParamsSP) => SpendingValidator;
declare const mkPollShardValidator: (params: PollShardParams) => SpendingValidator;
declare const mkPollShardValidatorFromSP: (params: PollShardParamsSP) => SpendingValidator;

/**
 * Returns the collector ref script UTXO that was added to ref inputs.
 *
 * No need to return the TxBuilder since it's stateful object.
 */
declare function collectorFeeTx(fee: bigint, lucid: LucidEvolution, params: SystemParams, tx: TxBuilder, collectorOref: OutRef): Promise<UTxO>;

declare const CollectorRedeemerSchema: TSchema.Union<[TSchema.Literal<["Collect"]>, TSchema.Literal<["DistributeToStakers"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type CollectorRedeemer = typeof CollectorRedeemerSchema.Type;
declare function serialiseCollectorRedeemer(r: CollectorRedeemer): string;

declare const ProtocolParamsSchema: TSchema.Struct<{
    proposalDeposit: TSchema.Integer;
    votingPeriod: TSchema.Integer;
    effectiveDelay: TSchema.Integer;
    expirationPeriod: TSchema.Integer;
    proposingPeriod: TSchema.Integer;
    totalShards: TSchema.Integer;
    minimumQuorum: TSchema.Integer;
    maxTreasuryLovelaceSpend: TSchema.Integer;
    maxTreasuryIndySpend: TSchema.Integer;
    cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
    electorate: TSchema.Integer;
    foundationMultisig: TSchema.Union<[TSchema.Struct<{
        Signature: TSchema.Struct<{
            keyHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        AtLeast: TSchema.Struct<{
            required: TSchema.Integer;
            authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
        }>;
    }>]>;
}>;
type ProtocolParams = typeof ProtocolParamsSchema.Type;
declare const UpgradePathsSchema: TSchema.Struct<{
    upgradeId: TSchema.Integer;
    upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
        upgradeSymbol: TSchema.ByteArray;
    }>]>>;
}>;
type UpgradePaths = typeof UpgradePathsSchema.Type;
declare const ProposeIAssetContentSchema: TSchema.Struct<{
    asset: TSchema.ByteArray;
    debtMintingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    liquidationProcessingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionReimbursementRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionProcessingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
}>;
type ProposeAssetContent = typeof ProposeIAssetContentSchema.Type;
declare const AddCollateralAssetContentSchema: TSchema.Struct<{
    correspondingIAsset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    assetExtraDecimals: TSchema.Integer;
    assetPriceInfo: TSchema.Union<[TSchema.Struct<{
        Delisted: TSchema.Struct<{
            price: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        OracleNft: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        DeferredValidation: TSchema.Struct<{
            feedValHash: TSchema.ByteArray;
        }>;
    }>]>;
    interestOracleNft: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    redemptionRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    maintenanceRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    liquidationRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    minCollateralAmt: TSchema.Integer;
}>;
type AddCollateralAsssetContent = typeof AddCollateralAssetContentSchema.Type;
declare const ProposeStableswapPoolContentSchema: TSchema.Struct<{
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    collateralToIassetRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    mintingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    feeManager: TSchema.NullOr<TSchema.ByteArray>;
    minMintingAmount: TSchema.Integer;
    minRedemptionAmount: TSchema.Integer;
    stableswapValHash: TSchema.ByteArray;
}>;
type ProposeStableswapPoolContent = typeof ProposeStableswapPoolContentSchema.Type;
declare const ModifyStableswapPoolContentSchema: TSchema.Struct<{
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    newCollateralToIassetRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    newMintingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    newRedemptionFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    newMintingEnabled: TSchema.Boolean;
    newRedemptionEnabled: TSchema.Boolean;
    newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
    newMinMintingAmount: TSchema.Integer;
    newMinRedemptionAmount: TSchema.Integer;
    newStableswapValHash: TSchema.ByteArray;
}>;
type ModifyStableswapPoolContent = typeof ModifyStableswapPoolContentSchema.Type;
declare const ProposalContentSchema: TSchema.Union<[TSchema.Struct<{
    ProposeIAsset: TSchema.Struct<{
        asset: TSchema.ByteArray;
        debtMintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        liquidationProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionReimbursementRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Struct<{
    ModifyIAsset: TSchema.Struct<{
        asset: TSchema.ByteArray;
        newDebtMintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newLiquidationProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newRedemptionReimbursementRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newRedemptionProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Struct<{
    AddCollateralAsset: TSchema.Struct<{
        correspondingIAsset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        assetExtraDecimals: TSchema.Integer;
        assetPriceInfo: TSchema.Union<[TSchema.Struct<{
            Delisted: TSchema.Struct<{
                price: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            OracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            DeferredValidation: TSchema.Struct<{
                feedValHash: TSchema.ByteArray;
            }>;
        }>]>;
        interestOracleNft: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        redemptionRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        maintenanceRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        liquidationRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        minCollateralAmt: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    UpdateCollateralAsset: TSchema.Struct<{
        correspondingIAsset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        newAssetExtraDecimals: TSchema.Integer;
        newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
            Delisted: TSchema.Struct<{
                price: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            OracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            DeferredValidation: TSchema.Struct<{
                feedValHash: TSchema.ByteArray;
            }>;
        }>]>;
        newInterestOracleNft: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        newRedemptionRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newMaintenanceRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newLiquidationRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newMinCollateralAmt: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    ProposeStableswapPool: TSchema.Struct<{
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        collateralToIassetRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        mintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        feeManager: TSchema.NullOr<TSchema.ByteArray>;
        minMintingAmount: TSchema.Integer;
        minRedemptionAmount: TSchema.Integer;
        stableswapValHash: TSchema.ByteArray;
    }>;
}>, TSchema.Struct<{
    ModifyStableswapPool: TSchema.Struct<{
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        newCollateralToIassetRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newMintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newRedemptionFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        newMintingEnabled: TSchema.Boolean;
        newRedemptionEnabled: TSchema.Boolean;
        newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
        newMinMintingAmount: TSchema.Integer;
        newMinRedemptionAmount: TSchema.Integer;
        newStableswapValHash: TSchema.ByteArray;
    }>;
}>, TSchema.Struct<{
    ModifyProtocolParams: TSchema.Struct<{
        newParams: TSchema.Struct<{
            proposalDeposit: TSchema.Integer;
            votingPeriod: TSchema.Integer;
            effectiveDelay: TSchema.Integer;
            expirationPeriod: TSchema.Integer;
            proposingPeriod: TSchema.Integer;
            totalShards: TSchema.Integer;
            minimumQuorum: TSchema.Integer;
            maxTreasuryLovelaceSpend: TSchema.Integer;
            maxTreasuryIndySpend: TSchema.Integer;
            cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
            electorate: TSchema.Integer;
            foundationMultisig: TSchema.Union<[TSchema.Struct<{
                Signature: TSchema.Struct<{
                    keyHash: TSchema.ByteArray;
                }>;
            }>, TSchema.Struct<{
                AtLeast: TSchema.Struct<{
                    required: TSchema.Integer;
                    authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
                }>;
            }>]>;
        }>;
    }>;
}>, TSchema.Struct<{
    UpgradeProtocol: TSchema.Struct<{
        content: TSchema.Struct<{
            upgradeId: TSchema.Integer;
            upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
                upgradeSymbol: TSchema.ByteArray;
            }>]>>;
        }>;
    }>;
}>, TSchema.Struct<{
    TextProposal: TSchema.ByteArray;
}>]>;
type ProposalContent = typeof ProposalContentSchema.Type;
declare const TreasuryWithdrawalItemSchema: TSchema.Struct<{
    currencySymbol: TSchema.ByteArray;
    tokenName: TSchema.ByteArray;
    amount: TSchema.Integer;
}>;
type TreasuryWithdrawalItem = typeof TreasuryWithdrawalItemSchema.Type;
declare const TreasuryWithdrawalSchema: TSchema.Struct<{
    destination: TSchema.Struct<{
        paymentCredential: TSchema.Union<[TSchema.Struct<{
            PublicKeyCredential: TSchema.ByteArray;
        }>, TSchema.Struct<{
            ScriptCredential: TSchema.ByteArray;
        }>]>;
        stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
            Inline: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
        }>, TSchema.Struct<{
            Pointer: TSchema.Struct<{
                slotNumber: TSchema.Integer;
                transactionIndex: TSchema.Integer;
                certificateIndex: TSchema.Integer;
            }>;
        }>]>>;
    }>;
    value: TSchema.Array<TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
        amount: TSchema.Integer;
    }>>;
}>;
type TreasuryWithdrawal = typeof TreasuryWithdrawalSchema.Type;
declare const GovRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    CreatePoll: TSchema.Struct<{
        currentTime: TSchema.Integer;
        proposalOwner: TSchema.ByteArray;
        content: TSchema.Union<[TSchema.Struct<{
            ProposeIAsset: TSchema.Struct<{
                asset: TSchema.ByteArray;
                debtMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                liquidationProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionReimbursementRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            ModifyIAsset: TSchema.Struct<{
                asset: TSchema.ByteArray;
                newDebtMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newLiquidationProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionReimbursementRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            AddCollateralAsset: TSchema.Struct<{
                correspondingIAsset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                assetExtraDecimals: TSchema.Integer;
                assetPriceInfo: TSchema.Union<[TSchema.Struct<{
                    Delisted: TSchema.Struct<{
                        price: TSchema.Struct<{
                            numerator: TSchema.Integer;
                            denominator: TSchema.Integer;
                        }>;
                    }>;
                }>, TSchema.Struct<{
                    OracleNft: TSchema.Struct<{
                        currencySymbol: TSchema.ByteArray;
                        tokenName: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    DeferredValidation: TSchema.Struct<{
                        feedValHash: TSchema.ByteArray;
                    }>;
                }>]>;
                interestOracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                redemptionRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                maintenanceRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                liquidationRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                minCollateralAmt: TSchema.Integer;
            }>;
        }>, TSchema.Struct<{
            UpdateCollateralAsset: TSchema.Struct<{
                correspondingIAsset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newAssetExtraDecimals: TSchema.Integer;
                newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
                    Delisted: TSchema.Struct<{
                        price: TSchema.Struct<{
                            numerator: TSchema.Integer;
                            denominator: TSchema.Integer;
                        }>;
                    }>;
                }>, TSchema.Struct<{
                    OracleNft: TSchema.Struct<{
                        currencySymbol: TSchema.ByteArray;
                        tokenName: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    DeferredValidation: TSchema.Struct<{
                        feedValHash: TSchema.ByteArray;
                    }>;
                }>]>;
                newInterestOracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newRedemptionRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMaintenanceRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newLiquidationRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMinCollateralAmt: TSchema.Integer;
            }>;
        }>, TSchema.Struct<{
            ProposeStableswapPool: TSchema.Struct<{
                iasset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                collateralToIassetRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                mintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                feeManager: TSchema.NullOr<TSchema.ByteArray>;
                minMintingAmount: TSchema.Integer;
                minRedemptionAmount: TSchema.Integer;
                stableswapValHash: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            ModifyStableswapPool: TSchema.Struct<{
                iasset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newCollateralToIassetRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMintingEnabled: TSchema.Boolean;
                newRedemptionEnabled: TSchema.Boolean;
                newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
                newMinMintingAmount: TSchema.Integer;
                newMinRedemptionAmount: TSchema.Integer;
                newStableswapValHash: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            ModifyProtocolParams: TSchema.Struct<{
                newParams: TSchema.Struct<{
                    proposalDeposit: TSchema.Integer;
                    votingPeriod: TSchema.Integer;
                    effectiveDelay: TSchema.Integer;
                    expirationPeriod: TSchema.Integer;
                    proposingPeriod: TSchema.Integer;
                    totalShards: TSchema.Integer;
                    minimumQuorum: TSchema.Integer;
                    maxTreasuryLovelaceSpend: TSchema.Integer;
                    maxTreasuryIndySpend: TSchema.Integer;
                    cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
                    electorate: TSchema.Integer;
                    foundationMultisig: TSchema.Union<[TSchema.Struct<{
                        Signature: TSchema.Struct<{
                            keyHash: TSchema.ByteArray;
                        }>;
                    }>, TSchema.Struct<{
                        AtLeast: TSchema.Struct<{
                            required: TSchema.Integer;
                            authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
                        }>;
                    }>]>;
                }>;
            }>;
        }>, TSchema.Struct<{
            UpgradeProtocol: TSchema.Struct<{
                content: TSchema.Struct<{
                    upgradeId: TSchema.Integer;
                    upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
                        upgradeSymbol: TSchema.ByteArray;
                    }>]>>;
                }>;
            }>;
        }>, TSchema.Struct<{
            TextProposal: TSchema.ByteArray;
        }>]>;
        treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
            destination: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
            value: TSchema.Array<TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
                amount: TSchema.Integer;
            }>>;
        }>>;
    }>;
}>, TSchema.Struct<{
    WitnessEndPoll: TSchema.Struct<{
        currentTime: TSchema.Integer;
    }>;
}>, TSchema.Literal<["UpgradeGov"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type GovRedeemer = typeof GovRedeemerSchema.Type;
declare const GovDatumSchema: TSchema.Struct<{
    currentProposal: TSchema.Integer;
    protocolParams: TSchema.Struct<{
        proposalDeposit: TSchema.Integer;
        votingPeriod: TSchema.Integer;
        effectiveDelay: TSchema.Integer;
        expirationPeriod: TSchema.Integer;
        proposingPeriod: TSchema.Integer;
        totalShards: TSchema.Integer;
        minimumQuorum: TSchema.Integer;
        maxTreasuryLovelaceSpend: TSchema.Integer;
        maxTreasuryIndySpend: TSchema.Integer;
        cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
        electorate: TSchema.Integer;
        foundationMultisig: TSchema.Union<[TSchema.Struct<{
            Signature: TSchema.Struct<{
                keyHash: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            AtLeast: TSchema.Struct<{
                required: TSchema.Integer;
                authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
            }>;
        }>]>;
    }>;
    currentVersion: TSchema.Integer;
    iassetsCount: TSchema.Integer;
    activeProposals: TSchema.Integer;
}>;
type GovDatum = typeof GovDatumSchema.Type;
declare function serialiseGovRedeemer(r: GovRedeemer): string;
declare function serialiseGovDatum(d: GovDatum): string;
declare function parseGovDatum(datum: string): option.Option<GovDatum>;
declare function parseGovDatumOrThrow(datum: string): GovDatum;

declare const PollStatusSchema: TSchema.Struct<{
    yesVotes: TSchema.Integer;
    noVotes: TSchema.Integer;
}>;
type PollStatus = typeof PollStatusSchema.Type;
declare const PollManagerContentSchema: TSchema.Struct<{
    pollId: TSchema.Integer;
    pollOwner: TSchema.ByteArray;
    content: TSchema.Union<[TSchema.Struct<{
        ProposeIAsset: TSchema.Struct<{
            asset: TSchema.ByteArray;
            debtMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            liquidationProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionReimbursementRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        ModifyIAsset: TSchema.Struct<{
            asset: TSchema.ByteArray;
            newDebtMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newLiquidationProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionReimbursementRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        AddCollateralAsset: TSchema.Struct<{
            correspondingIAsset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            assetExtraDecimals: TSchema.Integer;
            assetPriceInfo: TSchema.Union<[TSchema.Struct<{
                Delisted: TSchema.Struct<{
                    price: TSchema.Struct<{
                        numerator: TSchema.Integer;
                        denominator: TSchema.Integer;
                    }>;
                }>;
            }>, TSchema.Struct<{
                OracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
            }>, TSchema.Struct<{
                DeferredValidation: TSchema.Struct<{
                    feedValHash: TSchema.ByteArray;
                }>;
            }>]>;
            interestOracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            redemptionRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            maintenanceRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            liquidationRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            minCollateralAmt: TSchema.Integer;
        }>;
    }>, TSchema.Struct<{
        UpdateCollateralAsset: TSchema.Struct<{
            correspondingIAsset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newAssetExtraDecimals: TSchema.Integer;
            newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
                Delisted: TSchema.Struct<{
                    price: TSchema.Struct<{
                        numerator: TSchema.Integer;
                        denominator: TSchema.Integer;
                    }>;
                }>;
            }>, TSchema.Struct<{
                OracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
            }>, TSchema.Struct<{
                DeferredValidation: TSchema.Struct<{
                    feedValHash: TSchema.ByteArray;
                }>;
            }>]>;
            newInterestOracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newRedemptionRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMaintenanceRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newLiquidationRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMinCollateralAmt: TSchema.Integer;
        }>;
    }>, TSchema.Struct<{
        ProposeStableswapPool: TSchema.Struct<{
            iasset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            collateralToIassetRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            mintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            feeManager: TSchema.NullOr<TSchema.ByteArray>;
            minMintingAmount: TSchema.Integer;
            minRedemptionAmount: TSchema.Integer;
            stableswapValHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        ModifyStableswapPool: TSchema.Struct<{
            iasset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newCollateralToIassetRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMintingEnabled: TSchema.Boolean;
            newRedemptionEnabled: TSchema.Boolean;
            newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
            newMinMintingAmount: TSchema.Integer;
            newMinRedemptionAmount: TSchema.Integer;
            newStableswapValHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        ModifyProtocolParams: TSchema.Struct<{
            newParams: TSchema.Struct<{
                proposalDeposit: TSchema.Integer;
                votingPeriod: TSchema.Integer;
                effectiveDelay: TSchema.Integer;
                expirationPeriod: TSchema.Integer;
                proposingPeriod: TSchema.Integer;
                totalShards: TSchema.Integer;
                minimumQuorum: TSchema.Integer;
                maxTreasuryLovelaceSpend: TSchema.Integer;
                maxTreasuryIndySpend: TSchema.Integer;
                cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
                electorate: TSchema.Integer;
                foundationMultisig: TSchema.Union<[TSchema.Struct<{
                    Signature: TSchema.Struct<{
                        keyHash: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    AtLeast: TSchema.Struct<{
                        required: TSchema.Integer;
                        authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
                    }>;
                }>]>;
            }>;
        }>;
    }>, TSchema.Struct<{
        UpgradeProtocol: TSchema.Struct<{
            content: TSchema.Struct<{
                upgradeId: TSchema.Integer;
                upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
                    upgradeSymbol: TSchema.ByteArray;
                }>]>>;
            }>;
        }>;
    }>, TSchema.Struct<{
        TextProposal: TSchema.ByteArray;
    }>]>;
    treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
        destination: TSchema.Struct<{
            paymentCredential: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
            stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                Inline: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
            }>, TSchema.Struct<{
                Pointer: TSchema.Struct<{
                    slotNumber: TSchema.Integer;
                    transactionIndex: TSchema.Integer;
                    certificateIndex: TSchema.Integer;
                }>;
            }>]>>;
        }>;
        value: TSchema.Array<TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
            amount: TSchema.Integer;
        }>>;
    }>>;
    status: TSchema.Struct<{
        yesVotes: TSchema.Integer;
        noVotes: TSchema.Integer;
    }>;
    votingEndTime: TSchema.Integer;
    createdShardsCount: TSchema.Integer;
    talliedShardsCount: TSchema.Integer;
    totalShardsCount: TSchema.Integer;
    proposingEndTime: TSchema.Integer;
    expirationTime: TSchema.Integer;
    protocolVersion: TSchema.Integer;
    minimumQuorum: TSchema.Integer;
}>;
type PollManagerContent = typeof PollManagerContentSchema.Type;
declare const PollShardContentSchema: TSchema.Struct<{
    pollId: TSchema.Integer;
    status: TSchema.Struct<{
        yesVotes: TSchema.Integer;
        noVotes: TSchema.Integer;
    }>;
    votingEndTime: TSchema.Integer;
    managerAddress: TSchema.Struct<{
        paymentCredential: TSchema.Union<[TSchema.Struct<{
            PublicKeyCredential: TSchema.ByteArray;
        }>, TSchema.Struct<{
            ScriptCredential: TSchema.ByteArray;
        }>]>;
        stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
            Inline: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
        }>, TSchema.Struct<{
            Pointer: TSchema.Struct<{
                slotNumber: TSchema.Integer;
                transactionIndex: TSchema.Integer;
                certificateIndex: TSchema.Integer;
            }>;
        }>]>>;
    }>;
}>;
type PollShardContent = typeof PollShardContentSchema.Type;
declare const PollDatumSchema: TSchema.Union<[TSchema.Struct<{
    PollManager: TSchema.Struct<{
        pollId: TSchema.Integer;
        pollOwner: TSchema.ByteArray;
        content: TSchema.Union<[TSchema.Struct<{
            ProposeIAsset: TSchema.Struct<{
                asset: TSchema.ByteArray;
                debtMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                liquidationProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionReimbursementRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            ModifyIAsset: TSchema.Struct<{
                asset: TSchema.ByteArray;
                newDebtMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newLiquidationProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionReimbursementRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionProcessingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            AddCollateralAsset: TSchema.Struct<{
                correspondingIAsset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                assetExtraDecimals: TSchema.Integer;
                assetPriceInfo: TSchema.Union<[TSchema.Struct<{
                    Delisted: TSchema.Struct<{
                        price: TSchema.Struct<{
                            numerator: TSchema.Integer;
                            denominator: TSchema.Integer;
                        }>;
                    }>;
                }>, TSchema.Struct<{
                    OracleNft: TSchema.Struct<{
                        currencySymbol: TSchema.ByteArray;
                        tokenName: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    DeferredValidation: TSchema.Struct<{
                        feedValHash: TSchema.ByteArray;
                    }>;
                }>]>;
                interestOracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                redemptionRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                maintenanceRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                liquidationRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                minCollateralAmt: TSchema.Integer;
            }>;
        }>, TSchema.Struct<{
            UpdateCollateralAsset: TSchema.Struct<{
                correspondingIAsset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newAssetExtraDecimals: TSchema.Integer;
                newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
                    Delisted: TSchema.Struct<{
                        price: TSchema.Struct<{
                            numerator: TSchema.Integer;
                            denominator: TSchema.Integer;
                        }>;
                    }>;
                }>, TSchema.Struct<{
                    OracleNft: TSchema.Struct<{
                        currencySymbol: TSchema.ByteArray;
                        tokenName: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    DeferredValidation: TSchema.Struct<{
                        feedValHash: TSchema.ByteArray;
                    }>;
                }>]>;
                newInterestOracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newRedemptionRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMaintenanceRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newLiquidationRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMinCollateralAmt: TSchema.Integer;
            }>;
        }>, TSchema.Struct<{
            ProposeStableswapPool: TSchema.Struct<{
                iasset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                collateralToIassetRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                mintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                redemptionFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                feeManager: TSchema.NullOr<TSchema.ByteArray>;
                minMintingAmount: TSchema.Integer;
                minRedemptionAmount: TSchema.Integer;
                stableswapValHash: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            ModifyStableswapPool: TSchema.Struct<{
                iasset: TSchema.ByteArray;
                collateralAsset: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
                newCollateralToIassetRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMintingFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newRedemptionFeeRatio: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
                newMintingEnabled: TSchema.Boolean;
                newRedemptionEnabled: TSchema.Boolean;
                newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
                newMinMintingAmount: TSchema.Integer;
                newMinRedemptionAmount: TSchema.Integer;
                newStableswapValHash: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            ModifyProtocolParams: TSchema.Struct<{
                newParams: TSchema.Struct<{
                    proposalDeposit: TSchema.Integer;
                    votingPeriod: TSchema.Integer;
                    effectiveDelay: TSchema.Integer;
                    expirationPeriod: TSchema.Integer;
                    proposingPeriod: TSchema.Integer;
                    totalShards: TSchema.Integer;
                    minimumQuorum: TSchema.Integer;
                    maxTreasuryLovelaceSpend: TSchema.Integer;
                    maxTreasuryIndySpend: TSchema.Integer;
                    cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
                    electorate: TSchema.Integer;
                    foundationMultisig: TSchema.Union<[TSchema.Struct<{
                        Signature: TSchema.Struct<{
                            keyHash: TSchema.ByteArray;
                        }>;
                    }>, TSchema.Struct<{
                        AtLeast: TSchema.Struct<{
                            required: TSchema.Integer;
                            authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
                        }>;
                    }>]>;
                }>;
            }>;
        }>, TSchema.Struct<{
            UpgradeProtocol: TSchema.Struct<{
                content: TSchema.Struct<{
                    upgradeId: TSchema.Integer;
                    upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
                        upgradeSymbol: TSchema.ByteArray;
                    }>]>>;
                }>;
            }>;
        }>, TSchema.Struct<{
            TextProposal: TSchema.ByteArray;
        }>]>;
        treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
            destination: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
            value: TSchema.Array<TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
                amount: TSchema.Integer;
            }>>;
        }>>;
        status: TSchema.Struct<{
            yesVotes: TSchema.Integer;
            noVotes: TSchema.Integer;
        }>;
        votingEndTime: TSchema.Integer;
        createdShardsCount: TSchema.Integer;
        talliedShardsCount: TSchema.Integer;
        totalShardsCount: TSchema.Integer;
        proposingEndTime: TSchema.Integer;
        expirationTime: TSchema.Integer;
        protocolVersion: TSchema.Integer;
        minimumQuorum: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    PollShard: TSchema.Struct<{
        pollId: TSchema.Integer;
        status: TSchema.Struct<{
            yesVotes: TSchema.Integer;
            noVotes: TSchema.Integer;
        }>;
        votingEndTime: TSchema.Integer;
        managerAddress: TSchema.Struct<{
            paymentCredential: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
            stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                Inline: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
            }>, TSchema.Struct<{
                Pointer: TSchema.Struct<{
                    slotNumber: TSchema.Integer;
                    transactionIndex: TSchema.Integer;
                    certificateIndex: TSchema.Integer;
                }>;
            }>]>>;
        }>;
    }>;
}>]>;
type PollDatum = typeof PollDatumSchema.Type;
declare const VoteOptionSchema: TSchema.Union<[TSchema.Literal<["Yes"]>, TSchema.Literal<["No"]>]>;
type VoteOption = typeof VoteOptionSchema.Type;
declare const PollShardRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    Vote: TSchema.Union<[TSchema.Literal<["Yes"]>, TSchema.Literal<["No"]>]>;
}>, TSchema.Struct<{
    MergeShards: TSchema.Struct<{
        currentTime: TSchema.Integer;
        pollManagerRef: TSchema.Struct<{
            txHash: TSchema.ByteArray;
            outputIndex: TSchema.Integer;
        }>;
    }>;
}>]>;
type PollShardRedeemer = typeof PollShardRedeemerSchema.Type;
declare const PollManagerRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    EndPoll: TSchema.Struct<{
        currentTime: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    CreateShards: TSchema.Struct<{
        currentTime: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    MergeShardsManager: TSchema.Struct<{
        currentTime: TSchema.Integer;
    }>;
}>]>;
type PollManagerRedeemer = typeof PollManagerRedeemerSchema.Type;
declare function serialisePollManagerRedeemer(r: PollManagerRedeemer): string;
declare function serialisePollShardRedeemer(r: PollShardRedeemer): string;
declare function parsePollShardRedeemer(datum: string): option.Option<PollShardRedeemer>;
declare function parsePollShardRedeemerOrThrow(datum: string): PollShardRedeemer;
declare function parsePollManager(datum: string): option.Option<PollManagerContent>;
declare function parsePollManagerOrThrow(datum: string): PollManagerContent;
declare function parsePollShard(datum: string): option.Option<PollShardContent>;
declare function parsePollShardOrThrow(datum: string): PollShardContent;
declare function serialisePollDatum(d: PollDatum): string;

/**
 * Returns the new PollId.
 */
declare function createProposal(proposalContent: ProposalContent, treasuryWithdrawal: TreasuryWithdrawal | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number, govOref: OutRef, 
/**
 * This has to be passed only in case of createAsset proposal
 */
allIAssetOrefs: OutRef[] | undefined): Promise<[TxBuilder, bigint]>;
/**
 * Builds transaction creating shards of count chunk size.
 */
declare function createShardsChunks(
/**
 * This gets automatically capped to total shards count.
 */
chunkSize: bigint, pollManagerOref: OutRef, sysParams: SystemParams, currentSlot: number, lucid: LucidEvolution): Promise<TxBuilder>;
declare function vote(voteOption: VoteOption, pollShardOref: OutRef, stakingPositionOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function mergeShards(pollManagerOref: OutRef, shardsOutRefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function endProposal(pollManagerOref: OutRef, govOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function executeProposal(executeOref: OutRef, govOref: OutRef, treasuryWithdrawalOref: OutRef | null, allIAssetOrefs: OutRef[] | null, 
/**
 * This for either Propose IAsset, Modify IAsset or Add Collateral asset proposals.
 */
iAssetOref: OutRef | null, 
/**
 * This is when adding new collateral asset. It should be all collateral assets of the given iAsset
 * where it's adding the new collateral asset.
 */
allCollateralAssetsOrefsOfIAsset: OutRef[] | null, collateralAssetOref: OutRef | null, stableswapPoolOrCdpCreatorOref: OutRef | null, sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;

declare const GovParamsSchema: _lucid_evolution_lucid.TObject<{
    govNFT: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    pollToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    indyAsset: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iassetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
    pollManagerValHash: _lucid_evolution_lucid.TUnsafe<string>;
    iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
    gBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
    daoIdentityToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iAssetAuthToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
}>;
type GovParams = Data.Static<typeof GovParamsSchema>;
declare const GovParams: GovParams;
declare function castGovParams(params: GovParams): Data;

declare const mkGovValidator: (params: GovParams) => SpendingValidator;
declare const mkGovValidatorFromSP: (params: GovParamsSP) => SpendingValidator;

declare function requestSpAccountCreation(assetAscii: string, amount: bigint, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function requestSpAccountAdjustment(amount: bigint, accountUtxo: UTxO, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function requestSpAccountClosure(accountUtxo: UTxO, sysParams: SystemParams, lucid: LucidEvolution, maxTxFee?: bigint): Promise<TxBuilder>;
declare function processSpRequest(stabilityPoolUtxo: UTxO, accountUtxo: UTxO, iAssetUtxo: UTxO, 
/**
 * For performance provide only the ones related to the pool's iAsset.
 */
allE2s2sSnapshotOrefs: OutRef[], sysParams: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function createE2s2sSnapshots(stabilityPoolOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function annulRequest(accountUtxo: UTxO, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;

/** SP Parameters */
declare const StabilityPoolParamsSchema: _lucid_evolution_lucid.TObject<{
    assetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
    stabilityPoolToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    snapshotEpochToScaleToSumToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    accountToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iAssetAuthToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
    accountCreateFeeLovelaces: _lucid_evolution_lucid.TUnsafe<bigint>;
    accountProcessingCooldownMs: _lucid_evolution_lucid.TUnsafe<bigint>;
    accountProcessingBiasMs: _lucid_evolution_lucid.TUnsafe<bigint>;
    stakeCredential: _lucid_evolution_lucid.TUnsafe<{
        Inline: [{
            PublicKeyCredential: [string];
        } | {
            ScriptCredential: [string];
        }];
    } | {
        Pointer: [{
            slotNumber: bigint;
            transactionIndex: bigint;
            certificateIndex: bigint;
        }];
    } | null>;
}>;
type StabilityPoolParams = Data.Static<typeof StabilityPoolParamsSchema>;
declare const StabilityPoolParams: StabilityPoolParams;
declare function castStabilityPoolParams(params: StabilityPoolParams): Data;

declare const mkStabilityPoolValidator: (params: StabilityPoolParams) => SpendingValidator;
declare const mkStabilityPoolValidatorFromSP: (params: StabilityPoolParamsSP) => SpendingValidator;

declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;

declare const StakingPosLockedAmtSchema: TSchema.Array<TSchema.Tuple<[TSchema.Integer, TSchema.Struct<{
    voteAmt: TSchema.Integer;
    votingEnd: TSchema.Integer;
}>]>>;
type StakingPosLockedAmt = typeof StakingPosLockedAmtSchema.Type;
declare const StakingPositionSchema: TSchema.Struct<{
    owner: TSchema.ByteArray;
    lockedAmount: TSchema.Array<TSchema.Tuple<[TSchema.Integer, TSchema.Struct<{
        voteAmt: TSchema.Integer;
        votingEnd: TSchema.Integer;
    }>]>>;
    positionSnapshot: TSchema.Struct<{
        snapshotAda: TSchema.Integer;
    }>;
}>;
type StakingPosition = typeof StakingPositionSchema.Type;
declare const StakingManagerSchema: TSchema.Struct<{
    totalStake: TSchema.Integer;
    managerSnapshot: TSchema.Struct<{
        snapshotAda: TSchema.Integer;
    }>;
}>;
type StakingManager = typeof StakingManagerSchema.Type;
declare const StakingDatumSchema: TSchema.Union<[TSchema.Struct<{
    totalStake: TSchema.Integer;
    managerSnapshot: TSchema.Struct<{
        snapshotAda: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    owner: TSchema.ByteArray;
    lockedAmount: TSchema.Array<TSchema.Tuple<[TSchema.Integer, TSchema.Struct<{
        voteAmt: TSchema.Integer;
        votingEnd: TSchema.Integer;
    }>]>>;
    positionSnapshot: TSchema.Struct<{
        snapshotAda: TSchema.Integer;
    }>;
}>]>;
type StakingDatum = typeof StakingDatumSchema.Type;
declare const StakingRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    CreateStakingPosition: TSchema.Struct<{
        creatorPkh: TSchema.ByteArray;
    }>;
}>, TSchema.Literal<["UpdateTotalStake"]>, TSchema.Literal<["Distribute"]>, TSchema.Struct<{
    AdjustStakedAmount: TSchema.Struct<{
        adjustAmount: TSchema.Integer;
    }>;
}>, TSchema.Literal<["Unstake"]>, TSchema.Literal<["Lock"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type StakingRedeemer = typeof StakingRedeemerSchema.Type;
declare function serialiseStakingRedeemer(r: StakingRedeemer): string;
declare function parseStakingRedeemer(datum: string): option.Option<StakingRedeemer>;
declare function parseStakingRedeemerOrThrow(datum: string): StakingRedeemer;
declare function parseStakingPosition(datum: string): option.Option<StakingPosition>;
declare function parseStakingPositionOrThrow(datum: string): StakingPosition;
declare function parseStakingManagerDatum(datum: string): StakingManager;
declare function serialiseStakingDatum(d: StakingDatum): string;

type StakingPositionOutput = {
    utxo: UTxO;
    datum: StakingPosition;
};
type StakingManagerOutput = {
    utxo: UTxO;
    datum: StakingManager;
};
/**
 * Update the staking position locked amount. In case proposal's voting finished, unlock the amount.
 */
declare function updateStakingLockedAmount(stakingPosLockedAmt: StakingPosLockedAmt, currentTime: bigint): StakingPosLockedAmt;
declare function findStakingManagerByOutRef(stakingManagerRef: OutRef, lucid: LucidEvolution): Promise<StakingManagerOutput>;
declare function findStakingManager(params: SystemParams, lucid: LucidEvolution): Promise<StakingManagerOutput>;
declare function findStakingPositionByOutRef(stakingPositionRef: OutRef, lucid: LucidEvolution): Promise<StakingPositionOutput>;
declare const rewardSnapshotPrecision: bigint;
declare function distributeReward(snapshotAda: bigint, adaReward: bigint, totalStake: bigint): bigint;
declare function calculateAdaReward(currentSnapshotAda: bigint, oldSnapshotAda: bigint, existingIndyAmount: bigint): bigint;

declare const StakingParamsSchema: _lucid_evolution_lucid.TObject<{
    stakingManagerNft: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    stakingToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    indyToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    pollToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collectorValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type StakingParams = Data.Static<typeof StakingParamsSchema>;
declare const StakingParams: StakingParams;
declare function castStakingParams(params: StakingParams): Data;

declare const mkStakingValidatorFromSP: (params: StakingParamsSP) => SpendingValidator;

declare const InterestOracleParamsSchema: _lucid_evolution_lucid.TObject<{
    /**  Milliseconds */
    biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
    owner: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type InterestOracleParams = Data.Static<typeof InterestOracleParamsSchema>;
declare function castInterestOracleParams(params: InterestOracleParams): Data;

declare function startInterestOracle(initialUnitaryInterest: bigint, initialInterestRate: bigint, initialLastInterestUpdate: bigint, oracleParams: InterestOracleParams, lucid: LucidEvolution, interestTokenName?: string, withScriptRef?: boolean, refOutRef?: OutRef): Promise<[TxBuilder, AssetClass]>;
declare function feedInterestOracle(params: InterestOracleParams, newInterestRate: bigint, lucid: LucidEvolution, currentSlot: number, assetClass?: AssetClass, utxo?: UTxO, scriptRef?: UTxO): Promise<TxBuilder>;

declare function calculateUnitaryInterest(timePeriod: bigint, interestRate: bigint): bigint;
declare function calculateUnitaryInterestSinceOracleLastUpdated(now: bigint, oracleDatum: InterestOracleDatum): bigint;
declare function calculateAccruedInterest(now: bigint, unitaryInterestSnapshot: bigint, mintedAmount: bigint, interestLastSettled: bigint, interestOracleDatum: InterestOracleDatum): bigint;

declare const MultisigSchema: TSchema.Union<[TSchema.Struct<{
    Signature: TSchema.Struct<{
        keyHash: TSchema.ByteArray;
    }>;
}>, TSchema.Struct<{
    AtLeast: TSchema.Struct<{
        required: TSchema.Integer;
        authSignatories: TSchema.Array<Schema$1.SchemaClass<Data$1.Data, Data$1.Data, never>>;
    }>;
}>]>;
type Multisig = typeof MultisigSchema.Type;

declare function signersAllOf(multisig: Multisig): string[];

declare const InterestCollectionParamsSchema: _lucid_evolution_lucid.TObject<{
    versionRecordNft: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    multisigUtxoNft: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateralAssetAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    govAuthTk: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpAssetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
    cdpBiasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
    interestSettlementCooldown: _lucid_evolution_lucid.TUnsafe<bigint>;
}>;
type InterestCollectionParams = Data.Static<typeof InterestCollectionParamsSchema>;
declare function castInterestCollectionParams(params: InterestCollectionParams): Data;

declare const InterestCollectionDatumSchema: TSchema.Struct<{
    admin_permissions: TSchema.Union<[TSchema.Struct<{
        Signature: TSchema.Struct<{
            keyHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        AtLeast: TSchema.Struct<{
            required: TSchema.Integer;
            authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
        }>;
    }>]>;
}>;
type InterestCollectionDatum = typeof InterestCollectionDatumSchema.Type;
declare const InterestCollectionRedeemerSchema: TSchema.Union<[TSchema.Literal<["CollectInterest"]>, TSchema.Struct<{
    BatchCollectInterest: TSchema.Struct<{
        currentTime: TSchema.Integer;
        ownInputIndex: TSchema.Integer;
        collateralAssetRefInputIndex: TSchema.Integer;
        interestOracleRefInputIndex: TSchema.Integer;
    }>;
}>, TSchema.Literal<["Distribute"]>, TSchema.Literal<["UpdatePermissions"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type InterestCollectionRedeemer = typeof InterestCollectionRedeemerSchema.Type;
declare function serialiseInterestCollectionRedeemer(redeemer: InterestCollectionRedeemer): string;
declare function parseInterestCollectionDatum(datum: string): InterestCollectionDatum;
declare function serialiseInterestCollectionDatum(datum: InterestCollectionDatum): string;

declare function mkInterestCollectionValidator(params: InterestCollectionParams): SpendingValidator;
declare const mkInterestCollectionValidatorFromSP: (params: InterestCollectionParamsSP) => SpendingValidator;

declare function batchCollectInterest(collateralAssetOref: OutRef, interestCollectorOutRef: OutRef, interestOracleOutRef: OutRef, cdpOutRefs: OutRef[], params: SystemParams, lucid: LucidEvolution, currentSlot: number): Promise<TxBuilder>;
declare function collectInterestTx(value: Assets, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, interestCollectorOref: OutRef): Promise<UTxO>;
declare function distributeInterest(interestCollectorOutRefs: OutRef[], interestAdminOutRef: OutRef, params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function updatePermissions(interestAdminOutRef: OutRef, govOref: OutRef, newAdminPermissions: Multisig, expectedSigners: string[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;

declare function mkInterestOracleValidator(params: InterestOracleParams): SpendingValidator;

declare const VersionRecordTokenParamsSchema: _lucid_evolution_lucid.TObject<{
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
}>;
type VersionRecordTokenParams = Data.Static<typeof VersionRecordTokenParamsSchema>;
declare const VersionRecordTokenParams: VersionRecordTokenParams;
declare function castVersionRecordTokenParams(params: VersionRecordTokenParams): Data;

declare function mkVersionRecordTokenPolicy(params: VersionRecordTokenParams): MintingPolicy;
declare const mkVersionRegistryValidator: () => SpendingValidator;

declare function treasuryFeeTx(assetToPay: AssetClass, amountToPay: bigint, extraLovelaces: bigint, lucid: LucidEvolution, sysParams: SystemParams, tx: TxBuilder, actionOref: OutRef, 
/**
 * `undefined` in case using direct treasury payment.
 */
treasuryOref: OutRef | undefined): Promise<UTxO | null>;
declare function treasuryCollect(assetToPay: AssetClass, amountToPay: bigint, extraLovelaces: bigint, lucid: LucidEvolution, sysParams: SystemParams, actionOref: OutRef, treasuryOref: OutRef): Promise<TxBuilder>;
declare function treasuryMerge(treasuryOutRefs: OutRef[], lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
declare function treasurySplit(treasuryOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;
declare function treasuryPrepareWithdrawal(treasuryOutRefs: OutRef[], upgradeOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams): Promise<TxBuilder>;

declare function mkTreasuryAddr(lucid: LucidEvolution, sysParams: SystemParams): Address;

declare const SPIntegerSchema: TSchema.Struct<{
    value: TSchema.Integer;
}>;
type SPInteger = typeof SPIntegerSchema.Type;
declare const AccountActionSchema: TSchema.Union<[TSchema.Literal<["Create"]>, TSchema.Struct<{
    Adjust: TSchema.Struct<{
        amount: TSchema.Integer;
        outputAddress: TSchema.Struct<{
            paymentCredential: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
            stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                Inline: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
            }>, TSchema.Struct<{
                Pointer: TSchema.Struct<{
                    slotNumber: TSchema.Integer;
                    transactionIndex: TSchema.Integer;
                    certificateIndex: TSchema.Integer;
                }>;
            }>]>>;
        }>;
    }>;
}>, TSchema.Struct<{
    Close: TSchema.Struct<{
        outputAddress: TSchema.Struct<{
            paymentCredential: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
            stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                Inline: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
            }>, TSchema.Struct<{
                Pointer: TSchema.Struct<{
                    slotNumber: TSchema.Integer;
                    transactionIndex: TSchema.Integer;
                    certificateIndex: TSchema.Integer;
                }>;
            }>]>>;
        }>;
        maxTxFee: TSchema.Integer;
    }>;
}>]>;
type AccountAction = typeof AccountActionSchema.Type;
declare const SumSnapshotSchema: TSchema.Struct<{
    sumVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    isLastInEpoch: TSchema.Boolean;
    isFirstSnapshot: TSchema.Boolean;
}>;
type SumSnapshot = typeof SumSnapshotSchema.Type;
declare const EpochToScaleKeySchema: TSchema.Struct<{
    epoch: TSchema.Integer;
    scale: TSchema.Integer;
}>;
type EpochToScaleKey = typeof EpochToScaleKeySchema.Type;
declare const EpochToScaleToSumEntrySchema: TSchema.Tuple<[TSchema.Struct<{
    epoch: TSchema.Integer;
    scale: TSchema.Integer;
}>, TSchema.Struct<{
    sumVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    isLastInEpoch: TSchema.Boolean;
    isFirstSnapshot: TSchema.Boolean;
}>]>;
type EpochToScaleToSumEntry = typeof EpochToScaleToSumEntrySchema.Type;
declare const StateSnapshotSchema: TSchema.Struct<{
    productVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    depositVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    epoch: TSchema.Integer;
    scale: TSchema.Integer;
}>;
type StateSnapshot = typeof StateSnapshotSchema.Type;
declare const AssetSnapshotSchema: TSchema.Struct<{
    currentSumVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    epoch2scale2sum: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
        epoch: TSchema.Integer;
        scale: TSchema.Integer;
    }>, TSchema.Struct<{
        sumVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        isLastInEpoch: TSchema.Boolean;
        isFirstSnapshot: TSchema.Boolean;
    }>]>>;
}>;
type AssetSnapshot = typeof AssetSnapshotSchema.Type;
declare const AssetStateSchema: TSchema.Tuple<[TSchema.Struct<{
    currencySymbol: TSchema.ByteArray;
    tokenName: TSchema.ByteArray;
}>, TSchema.Struct<{
    currentSumVal: TSchema.Struct<{
        value: TSchema.Integer;
    }>;
    epoch2scale2sum: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
        epoch: TSchema.Integer;
        scale: TSchema.Integer;
    }>, TSchema.Struct<{
        sumVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        isLastInEpoch: TSchema.Boolean;
        isFirstSnapshot: TSchema.Boolean;
    }>]>>;
}>]>;
type AssetState = typeof AssetStateSchema.Type;
declare const StabilityPoolContentSchema: TSchema.Struct<{
    iasset: TSchema.ByteArray;
    state: TSchema.Struct<{
        productVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        depositVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        epoch: TSchema.Integer;
        scale: TSchema.Integer;
    }>;
    assetStates: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>, TSchema.Struct<{
        currentSumVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        epoch2scale2sum: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
            epoch: TSchema.Integer;
            scale: TSchema.Integer;
        }>, TSchema.Struct<{
            sumVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            isLastInEpoch: TSchema.Boolean;
            isFirstSnapshot: TSchema.Boolean;
        }>]>>;
    }>]>>;
}>;
type StabilityPoolContent = typeof StabilityPoolContentSchema.Type;
declare const AccountContentSchema: TSchema.Struct<{
    owner: TSchema.ByteArray;
    iasset: TSchema.ByteArray;
    state: TSchema.Struct<{
        productVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        depositVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        epoch: TSchema.Integer;
        scale: TSchema.Integer;
    }>;
    assetSums: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>, TSchema.Struct<{
        value: TSchema.Integer;
    }>]>>;
    request: TSchema.NullOr<TSchema.Union<[TSchema.Literal<["Create"]>, TSchema.Struct<{
        Adjust: TSchema.Struct<{
            amount: TSchema.Integer;
            outputAddress: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
        }>;
    }>, TSchema.Struct<{
        Close: TSchema.Struct<{
            outputAddress: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
            maxTxFee: TSchema.Integer;
        }>;
    }>]>>;
    lastRequestProcessingTime: TSchema.Integer;
}>;
type AccountContent = typeof AccountContentSchema.Type;
declare const SnapshotEpochToScaleToSumContentSchema: TSchema.Struct<{
    snapshot: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
        epoch: TSchema.Integer;
        scale: TSchema.Integer;
    }>, TSchema.Struct<{
        sumVal: TSchema.Struct<{
            value: TSchema.Integer;
        }>;
        isLastInEpoch: TSchema.Boolean;
        isFirstSnapshot: TSchema.Boolean;
    }>]>>;
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
}>;
type SnapshotEpochToScaleToSumContent = typeof SnapshotEpochToScaleToSumContentSchema.Type;
declare const StabilityPoolDatumSchema: TSchema.Union<[TSchema.Struct<{
    StabilityPool: TSchema.Struct<{
        iasset: TSchema.ByteArray;
        state: TSchema.Struct<{
            productVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            depositVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            epoch: TSchema.Integer;
            scale: TSchema.Integer;
        }>;
        assetStates: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>, TSchema.Struct<{
            currentSumVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            epoch2scale2sum: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
                epoch: TSchema.Integer;
                scale: TSchema.Integer;
            }>, TSchema.Struct<{
                sumVal: TSchema.Struct<{
                    value: TSchema.Integer;
                }>;
                isLastInEpoch: TSchema.Boolean;
                isFirstSnapshot: TSchema.Boolean;
            }>]>>;
        }>]>>;
    }>;
}>, TSchema.Struct<{
    Account: TSchema.Struct<{
        owner: TSchema.ByteArray;
        iasset: TSchema.ByteArray;
        state: TSchema.Struct<{
            productVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            depositVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            epoch: TSchema.Integer;
            scale: TSchema.Integer;
        }>;
        assetSums: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>, TSchema.Struct<{
            value: TSchema.Integer;
        }>]>>;
        request: TSchema.NullOr<TSchema.Union<[TSchema.Literal<["Create"]>, TSchema.Struct<{
            Adjust: TSchema.Struct<{
                amount: TSchema.Integer;
                outputAddress: TSchema.Struct<{
                    paymentCredential: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                    stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                        Inline: TSchema.Union<[TSchema.Struct<{
                            PublicKeyCredential: TSchema.ByteArray;
                        }>, TSchema.Struct<{
                            ScriptCredential: TSchema.ByteArray;
                        }>]>;
                    }>, TSchema.Struct<{
                        Pointer: TSchema.Struct<{
                            slotNumber: TSchema.Integer;
                            transactionIndex: TSchema.Integer;
                            certificateIndex: TSchema.Integer;
                        }>;
                    }>]>>;
                }>;
            }>;
        }>, TSchema.Struct<{
            Close: TSchema.Struct<{
                outputAddress: TSchema.Struct<{
                    paymentCredential: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                    stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                        Inline: TSchema.Union<[TSchema.Struct<{
                            PublicKeyCredential: TSchema.ByteArray;
                        }>, TSchema.Struct<{
                            ScriptCredential: TSchema.ByteArray;
                        }>]>;
                    }>, TSchema.Struct<{
                        Pointer: TSchema.Struct<{
                            slotNumber: TSchema.Integer;
                            transactionIndex: TSchema.Integer;
                            certificateIndex: TSchema.Integer;
                        }>;
                    }>]>>;
                }>;
                maxTxFee: TSchema.Integer;
            }>;
        }>]>>;
        lastRequestProcessingTime: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    SnapshotEpochToScaleToSum: TSchema.Struct<{
        snapshot: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
            epoch: TSchema.Integer;
            scale: TSchema.Integer;
        }>, TSchema.Struct<{
            sumVal: TSchema.Struct<{
                value: TSchema.Integer;
            }>;
            isLastInEpoch: TSchema.Boolean;
            isFirstSnapshot: TSchema.Boolean;
        }>]>>;
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
    }>;
}>]>;
declare const E2S2SIndexSchema: TSchema.Union<[TSchema.Struct<{
    StabilityPoolListIdx: TSchema.Integer;
}>, TSchema.Struct<{
    RefInputIdx: TSchema.Struct<{
        refInputIdx: TSchema.Integer;
        snapshotListIdx: TSchema.Integer;
    }>;
}>]>;
type E2S2SIndex = typeof E2S2SIndexSchema.Type;
declare const E2S2SIndicesPerAssetSchema: TSchema.Array<TSchema.Tuple<[TSchema.Union<[TSchema.Struct<{
    StabilityPoolListIdx: TSchema.Integer;
}>, TSchema.Struct<{
    RefInputIdx: TSchema.Struct<{
        refInputIdx: TSchema.Integer;
        snapshotListIdx: TSchema.Integer;
    }>;
}>]>, TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
    StabilityPoolListIdx: TSchema.Integer;
}>, TSchema.Struct<{
    RefInputIdx: TSchema.Struct<{
        refInputIdx: TSchema.Integer;
        snapshotListIdx: TSchema.Integer;
    }>;
}>]>>]>>;
type E2S2SIndicesPerAsset = typeof E2S2SIndicesPerAssetSchema.Type;
declare const ProcessRequestAccountContentSchema: TSchema.Struct<{
    poolInputIdx: TSchema.Integer;
    accountInputIdx: TSchema.Integer;
    e2s2sIdxs: TSchema.Array<TSchema.Tuple<[TSchema.Union<[TSchema.Struct<{
        StabilityPoolListIdx: TSchema.Integer;
    }>, TSchema.Struct<{
        RefInputIdx: TSchema.Struct<{
            refInputIdx: TSchema.Integer;
            snapshotListIdx: TSchema.Integer;
        }>;
    }>]>, TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
        StabilityPoolListIdx: TSchema.Integer;
    }>, TSchema.Struct<{
        RefInputIdx: TSchema.Struct<{
            refInputIdx: TSchema.Integer;
            snapshotListIdx: TSchema.Integer;
        }>;
    }>]>>]>>;
    currentTime: TSchema.Integer;
}>;
type ProcessRequestAccountContent = typeof ProcessRequestAccountContentSchema.Type;
declare const StabilityPoolRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    RequestAction: TSchema.Union<[TSchema.Literal<["Create"]>, TSchema.Struct<{
        Adjust: TSchema.Struct<{
            amount: TSchema.Integer;
            outputAddress: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
        }>;
    }>, TSchema.Struct<{
        Close: TSchema.Struct<{
            outputAddress: TSchema.Struct<{
                paymentCredential: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
                stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                    Inline: TSchema.Union<[TSchema.Struct<{
                        PublicKeyCredential: TSchema.ByteArray;
                    }>, TSchema.Struct<{
                        ScriptCredential: TSchema.ByteArray;
                    }>]>;
                }>, TSchema.Struct<{
                    Pointer: TSchema.Struct<{
                        slotNumber: TSchema.Integer;
                        transactionIndex: TSchema.Integer;
                        certificateIndex: TSchema.Integer;
                    }>;
                }>]>>;
            }>;
            maxTxFee: TSchema.Integer;
        }>;
    }>]>;
}>, TSchema.Struct<{
    ProcessRequestPool: TSchema.Struct<{
        poolInputIdx: TSchema.Integer;
        accountInputIdx: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    ProcessRequestAccount: TSchema.Struct<{
        poolInputIdx: TSchema.Integer;
        accountInputIdx: TSchema.Integer;
        e2s2sIdxs: TSchema.Array<TSchema.Tuple<[TSchema.Union<[TSchema.Struct<{
            StabilityPoolListIdx: TSchema.Integer;
        }>, TSchema.Struct<{
            RefInputIdx: TSchema.Struct<{
                refInputIdx: TSchema.Integer;
                snapshotListIdx: TSchema.Integer;
            }>;
        }>]>, TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
            StabilityPoolListIdx: TSchema.Integer;
        }>, TSchema.Struct<{
            RefInputIdx: TSchema.Struct<{
                refInputIdx: TSchema.Integer;
                snapshotListIdx: TSchema.Integer;
            }>;
        }>]>>]>>;
        currentTime: TSchema.Integer;
    }>;
}>, TSchema.Literal<["AnnulRequest"]>, TSchema.Struct<{
    LiquidateCDP: TSchema.Struct<{
        cdpIdx: TSchema.Integer;
    }>;
}>, TSchema.Literal<["RecordEpochToScaleToSum"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type StabilityPoolRedeemer = typeof StabilityPoolRedeemerSchema.Type;
declare const ActionReturnDatumSchema: TSchema.Union<[TSchema.Struct<{
    IndigoStabilityPoolAccountAdjustment: TSchema.Struct<{
        txHash: TSchema.ByteArray;
        outputIndex: TSchema.Integer;
    }>;
}>, TSchema.Struct<{
    IndigoStabilityPoolAccountClosure: TSchema.Struct<{
        txHash: TSchema.ByteArray;
        outputIndex: TSchema.Integer;
    }>;
}>]>;
type ActionReturnDatum = typeof ActionReturnDatumSchema.Type;
declare function serialiseActionReturnDatum(d: ActionReturnDatum): string;
declare function serialiseStabilityPoolRedeemer(r: StabilityPoolRedeemer): string;
declare function parseStabilityPoolRedeemer(datum: string): option.Option<StabilityPoolRedeemer>;
declare function parseStabilityPoolRedeemerOrThrow(datum: string): StabilityPoolRedeemer;
declare function serialiseStabilityPoolDatum(d: typeof StabilityPoolDatumSchema.Type, 
/**
 * This is necessary to change only in case of execute propose asset.
 */
useIndefiniteMaps?: boolean): string;
declare function parseStabilityPoolDatum(datum: string): option.Option<StabilityPoolContent>;
declare function parseStabilityPoolDatumOrThrow(datum: string): StabilityPoolContent;
declare function parseAccountDatum(datum: string): option.Option<AccountContent>;
declare function parseAccountDatumOrThrow(datum: string): AccountContent;
declare function parseSnapshotEpochToScaleToSumDatum(datum: string): option.Option<SnapshotEpochToScaleToSumContent>;
declare function parseSnapshotEpochToScaleToSumDatumOrThrow(datum: string): SnapshotEpochToScaleToSumContent;
declare function mkSPInteger(value: bigint): SPInteger;
declare function fromSPInteger(value: SPInteger): bigint;
declare function spAdd(a: SPInteger, b: SPInteger): SPInteger;
declare function spSub(a: SPInteger, b: SPInteger): SPInteger;
declare function spMul(a: SPInteger, b: SPInteger): SPInteger;
declare function spDiv(a: SPInteger, b: SPInteger): SPInteger;
declare function spZeroNegatives(a: SPInteger): SPInteger;

declare const BASE_MAX_TX_FEE = 1250000n;
declare const MAX_E2S2S_ENTRIES_COUNT = 5;
declare const initSumVal: SPInteger;
declare const initSpState: StateSnapshot;
declare function mkStabilityPoolAddr(lucid: LucidEvolution, sysParams: SystemParams): Address;
declare function isSameEpochToScaleKey(a: EpochToScaleKey, b: EpochToScaleKey): boolean;
type StabilityPoolListIdx = {
    spListIdx: number;
    sumSnapshot: readonly [EpochToScaleKey, SumSnapshot];
};
type SnapshotIdx = {
    snapshotUtxo: UTxO;
    snapshotDatum: SnapshotEpochToScaleToSumContent;
    snapshotListIdx: number;
    sumSnapshot: readonly [EpochToScaleKey, SumSnapshot];
};
type FindE2S2SIdxResult = StabilityPoolListIdx | SnapshotIdx;
declare function findRelevantE2s2sIdxs(lucid: LucidEvolution, stabilityPool: StabilityPoolContent, accountState: StateSnapshot, allSnapshotsOutRefs: OutRef[]): Promise<[FindE2S2SIdxResult, option.Option<FindE2S2SIdxResult>][]>;
declare function createProcessRequestAccountRedeemer(e2s2sIdxs: [FindE2S2SIdxResult, option.Option<FindE2S2SIdxResult>][], otherRefInputs: UTxO[], currentTime: bigint): {
    e2s2sRefInputs: UTxO[];
    mkProcessRequestAccountRedeemerContent: (poolInputIdx: bigint, accountInputIdx: bigint) => ProcessRequestAccountContent;
};
declare function getUpdatedAccountDeposit(poolState: StateSnapshot, accountState: StateSnapshot): SPInteger;
declare function updateAccount(pool: StabilityPoolContent, account: AccountContent, e2s2sIdxs: [FindE2S2SIdxResult, option.Option<FindE2S2SIdxResult>][]): {
    updatedAccountContent: AccountContent;
    reward: Assets;
};
declare function liquidationHelper(poolContent: StabilityPoolContent, collateralAsset: AssetClass, iassetBurnAmt: bigint, 
/**
 * The collateral absorbed
 */
reward: bigint): StabilityPoolContent;
declare function updatePoolStateWhenWithdrawalFee(withdrawalFeeAmt: bigint, updatedPoolState: StateSnapshot): StateSnapshot;
declare function partitionEpochToScaleToSums(spContent: StabilityPoolContent): readonly [
    readonly SnapshotEpochToScaleToSumContent[],
    readonly AssetState[]
];

declare const ONE_SECOND: number;
declare const ONE_HOUR: bigint;
declare const ONE_DAY: bigint;
declare const ONE_YEAR: bigint;

declare const mkCollectorValidatorFromSP: (params: CollectorParamsSP) => SpendingValidator;

declare const mkTreasuryValidatorFromSP: (params: TreasuryParamsSP) => SpendingValidator;

declare const ExecuteParamsSchema: _lucid_evolution_lucid.TObject<{
    govNFT: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iAssetToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateralAssetToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    stabilityPoolToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpCreatorToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
    cdpValHash: _lucid_evolution_lucid.TUnsafe<string>;
    sPoolValHash: _lucid_evolution_lucid.TUnsafe<string>;
    versionRegistryValHash: _lucid_evolution_lucid.TUnsafe<string>;
    treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type ExecuteParams = Data.Static<typeof ExecuteParamsSchema>;
declare const ExecuteParams: ExecuteParams;
declare function castExecuteParams(params: ExecuteParams): Data;

declare const ExecuteDatumSchema: TSchema.Struct<{
    id: TSchema.Integer;
    content: TSchema.Union<[TSchema.Struct<{
        ProposeIAsset: TSchema.Struct<{
            asset: TSchema.ByteArray;
            debtMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            liquidationProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionReimbursementRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        ModifyIAsset: TSchema.Struct<{
            asset: TSchema.ByteArray;
            newDebtMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newLiquidationProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newStabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionReimbursementRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionProcessingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        AddCollateralAsset: TSchema.Struct<{
            correspondingIAsset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            assetExtraDecimals: TSchema.Integer;
            assetPriceInfo: TSchema.Union<[TSchema.Struct<{
                Delisted: TSchema.Struct<{
                    price: TSchema.Struct<{
                        numerator: TSchema.Integer;
                        denominator: TSchema.Integer;
                    }>;
                }>;
            }>, TSchema.Struct<{
                OracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
            }>, TSchema.Struct<{
                DeferredValidation: TSchema.Struct<{
                    feedValHash: TSchema.ByteArray;
                }>;
            }>]>;
            interestOracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            redemptionRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            maintenanceRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            liquidationRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            minCollateralAmt: TSchema.Integer;
        }>;
    }>, TSchema.Struct<{
        UpdateCollateralAsset: TSchema.Struct<{
            correspondingIAsset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newAssetExtraDecimals: TSchema.Integer;
            newAssetPriceInfo: TSchema.Union<[TSchema.Struct<{
                Delisted: TSchema.Struct<{
                    price: TSchema.Struct<{
                        numerator: TSchema.Integer;
                        denominator: TSchema.Integer;
                    }>;
                }>;
            }>, TSchema.Struct<{
                OracleNft: TSchema.Struct<{
                    currencySymbol: TSchema.ByteArray;
                    tokenName: TSchema.ByteArray;
                }>;
            }>, TSchema.Struct<{
                DeferredValidation: TSchema.Struct<{
                    feedValHash: TSchema.ByteArray;
                }>;
            }>]>;
            newInterestOracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newRedemptionRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMaintenanceRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newLiquidationRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMinCollateralAmt: TSchema.Integer;
        }>;
    }>, TSchema.Struct<{
        ProposeStableswapPool: TSchema.Struct<{
            iasset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            collateralToIassetRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            mintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            redemptionFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            feeManager: TSchema.NullOr<TSchema.ByteArray>;
            minMintingAmount: TSchema.Integer;
            minRedemptionAmount: TSchema.Integer;
            stableswapValHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        ModifyStableswapPool: TSchema.Struct<{
            iasset: TSchema.ByteArray;
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            newCollateralToIassetRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMintingFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newRedemptionFeeRatio: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
            newMintingEnabled: TSchema.Boolean;
            newRedemptionEnabled: TSchema.Boolean;
            newFeeManager: TSchema.NullOr<TSchema.ByteArray>;
            newMinMintingAmount: TSchema.Integer;
            newMinRedemptionAmount: TSchema.Integer;
            newStableswapValHash: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        ModifyProtocolParams: TSchema.Struct<{
            newParams: TSchema.Struct<{
                proposalDeposit: TSchema.Integer;
                votingPeriod: TSchema.Integer;
                effectiveDelay: TSchema.Integer;
                expirationPeriod: TSchema.Integer;
                proposingPeriod: TSchema.Integer;
                totalShards: TSchema.Integer;
                minimumQuorum: TSchema.Integer;
                maxTreasuryLovelaceSpend: TSchema.Integer;
                maxTreasuryIndySpend: TSchema.Integer;
                cdpRedemptionRequiredSignature: TSchema.NullOr<TSchema.ByteArray>;
                electorate: TSchema.Integer;
                foundationMultisig: TSchema.Union<[TSchema.Struct<{
                    Signature: TSchema.Struct<{
                        keyHash: TSchema.ByteArray;
                    }>;
                }>, TSchema.Struct<{
                    AtLeast: TSchema.Struct<{
                        required: TSchema.Integer;
                        authSignatories: TSchema.Array<effect_Schema.SchemaClass<Data$1.Data, Data$1.Data, never>>;
                    }>;
                }>]>;
            }>;
        }>;
    }>, TSchema.Struct<{
        UpgradeProtocol: TSchema.Struct<{
            content: TSchema.Struct<{
                upgradeId: TSchema.Integer;
                upgradePaths: TSchema.Array<TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
                    upgradeSymbol: TSchema.ByteArray;
                }>]>>;
            }>;
        }>;
    }>, TSchema.Struct<{
        TextProposal: TSchema.ByteArray;
    }>]>;
    passedTime: TSchema.Integer;
    votingEndTime: TSchema.Integer;
    protocolVersion: TSchema.Integer;
    treasuryWithdrawal: TSchema.NullOr<TSchema.Struct<{
        destination: TSchema.Struct<{
            paymentCredential: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
            stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
                Inline: TSchema.Union<[TSchema.Struct<{
                    PublicKeyCredential: TSchema.ByteArray;
                }>, TSchema.Struct<{
                    ScriptCredential: TSchema.ByteArray;
                }>]>;
            }>, TSchema.Struct<{
                Pointer: TSchema.Struct<{
                    slotNumber: TSchema.Integer;
                    transactionIndex: TSchema.Integer;
                    certificateIndex: TSchema.Integer;
                }>;
            }>]>>;
        }>;
        value: TSchema.Array<TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
            amount: TSchema.Integer;
        }>>;
    }>>;
}>;
type ExecuteDatum = typeof ExecuteDatumSchema.Type;
declare function serialiseExecuteDatum(d: ExecuteDatum): string;
declare function parseExecuteDatum(datum: string): option.Option<ExecuteDatum>;
declare function parseExecuteDatumOrThrow(datum: string): ExecuteDatum;

declare const mkExecuteValidator: (params: ExecuteParams) => SpendingValidator;
declare const mkExecuteValidatorFromSP: (params: ExecuteParamsSP) => SpendingValidator;

declare const PriceOracleParamsSchema: _lucid_evolution_lucid.TObject<{
    owner: _lucid_evolution_lucid.TUnsafe<string>;
    /**  Milliseconds */
    biasTime: _lucid_evolution_lucid.TUnsafe<bigint>;
    /**  Milliseconds */
    expirationPeriod: _lucid_evolution_lucid.TUnsafe<bigint>;
}>;
type PriceOracleParams = Data.Static<typeof PriceOracleParamsSchema>;
declare function castPriceOracleParams(params: PriceOracleParams): Data;

declare const RobOrderTypeSchema: TSchema.Union<[TSchema.Struct<{
    BuyIAssetOrder: TSchema.Struct<{
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        maxPrice: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Struct<{
    SellIAssetOrder: TSchema.Struct<{
        allowedCollateralAssets: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>, TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>]>>;
    }>;
}>]>;
type RobOrderType = typeof RobOrderTypeSchema.Type;
declare const RobDatumSchema: TSchema.Struct<{
    owner: TSchema.ByteArray;
    iasset: TSchema.ByteArray;
    orderType: TSchema.Union<[TSchema.Struct<{
        BuyIAssetOrder: TSchema.Struct<{
            collateralAsset: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
            maxPrice: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        SellIAssetOrder: TSchema.Struct<{
            allowedCollateralAssets: TSchema.Array<TSchema.Tuple<[TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>, TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>]>>;
        }>;
    }>]>;
    robRefInput: TSchema.Struct<{
        txHash: TSchema.ByteArray;
        outputIndex: TSchema.Integer;
    }>;
}>;
type RobDatum = typeof RobDatumSchema.Type;
declare const RobRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    Redeem: TSchema.Struct<{
        ownInputIdx: TSchema.Integer;
        collateralAssetRefInputIdx: TSchema.Integer;
        iassetRefInputIdx: TSchema.Integer;
        continuingOutputIdx: TSchema.Integer;
        sellOrderAllowedAssetsIdx: TSchema.Integer;
        priceOracleIdx: TSchema.Union<[TSchema.Struct<{
            OracleRefInputIdx: TSchema.Integer;
        }>, TSchema.Struct<{
            OracleOutputIdx: TSchema.Integer;
        }>, TSchema.Literal<["OracleVoid"]>]>;
    }>;
}>, TSchema.Literal<["Cancel"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type RobRedeemer = typeof RobRedeemerSchema.Type;
declare function parseRobDatum(datum: string): option.Option<RobDatum>;
declare function parseRobDatumOrThrow(datum: string): RobDatum;
declare function serialiseRobDatum(d: RobDatum): string;
declare function serialiseRobRedeemer(r: RobRedeemer): string;
declare function parseRobRedeemer(redeemerCborHex: string): option.Option<RobRedeemer>;
declare function parseRobRedeemerOrThrow(redeemerCborHex: string): RobRedeemer;
type RobOutput = {
    datum: RobDatum;
    utxo: UTxO;
};

declare const OracleIdxSchema: TSchema.Union<[TSchema.Struct<{
    OracleRefInputIdx: TSchema.Integer;
}>, TSchema.Struct<{
    OracleOutputIdx: TSchema.Integer;
}>, TSchema.Literal<["OracleVoid"]>]>;
type OracleIdx = typeof OracleIdxSchema.Type;
declare const PriceOracleDatumSchema: TSchema.Struct<{
    price: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    expirationTime: TSchema.Integer;
    auxiliaryData: Schema$1.SchemaClass<Data$1.Data, Data$1.Data, never>;
}>;
type PriceOracleDatum = typeof PriceOracleDatumSchema.Type;
declare const PriceOracleRedeemerSchema: TSchema.Struct<{
    currentTime: TSchema.Integer;
    newPrice: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
}>;
type PriceOracleRedeemer = typeof PriceOracleRedeemerSchema.Type;
declare function serialisePriceOracleRedeemer(r: PriceOracleRedeemer): string;
declare function serialisePriceOracleDatum(d: PriceOracleDatum): string;
declare function parsePriceOracleDatum(datum: string): PriceOracleDatum;

declare const MIN_ROB_COLLATERAL_AMT = 3000000n;
/**
 * The maximum of redemptions for a Tx that is doing only sell order redemptions.
 * Based on the benchmarks.
 */
declare const MAX_SELL_ROB_REDEMPTIONS_COUNT = 18;
/**
 * The maximum of redemptions for a Tx that is doing only buy order redemptions.
 * Based on the benchmarks.
 */
declare const MAX_BUY_ROB_REDEMPTIONS_COUNT = 20;
/**
 * Helper for ROB redemptions. A redeemer is selling iAssets against
 * a buy order, i.e. buying a collateral asset.
 * The return is the amount of collateral asset he buys.
 */
declare function calculatePurchaseAmtWhenRobBuyOrder(sellIassetAmt: bigint, redemptionReimbursementRatio: Rational, price: Rational): bigint;
/**
 * A redeemer is purchasing given collateral amount against buy order.
 * Calculate what is the amount of iAsset the user sells/spends.
 */
declare function calculateSpendAmtWhenRobBuyOrder(purchaseCollateralAmt: bigint, redemptionReimbursementRatio: Rational, price: Rational): bigint;
/**
 * Helper for ROB redemptions. A redeemer is selling collateral against
 * a sell order, i.e. buying iassets.
 * The return is the amount of iassets he buys.
 */
declare function calculatePurchaseAmtWhenRobSellOrder(sellCollateralAmt: bigint, redemptionReimbursementRatio: Rational, price: Rational): bigint;
/**
 * A redeemer is purchasing given iasset amount against sell order.
 * Calculate what is the amount of collateral the user sells/spends.
 */
declare function calculateSpendAmtWhenRobSellOrder(purchaseIassetAmt: bigint, redemptionReimbursementRatio: Rational, price: Rational): bigint;
/**
 * The amount of collateral asset available in the ROB when buy order. In case of ADA, take
 * into account the min UTXO collateral.
 */
declare function robCollateralAmtToSpend(robAssets: Assets, robOrderType: RobOrderType): bigint;
/**
 * The amount if iassets available in ROB when sell order.
 */
declare function robIAssetAmtToSpend(robAssets: Assets, robOrderType: RobOrderType, 
/**
 * This has to be assetclass having policyID of Indigo iAssets,
 * and the asset name being the ROB datum iasset.
 */
robIasset: AssetClass): bigint;
/**
 * Amount to spend from the ROB universal for Buy and sell orders.
 */
declare function robAmtToSpend(robAssets: Assets, robOrderType: RobOrderType, 
/**
 * This has to be assetclass having policyID of Indigo iAssets,
 * and the asset name being the ROB datum iasset.
 */
robIasset: AssetClass): bigint;
type FilledResult = {
    asset: AssetClass;
    filledAmt: bigint;
};
/**
 * The assets that have filled the order and are able to be claimed.
 */
declare function robBuyOrderFilledAssets(robAssets: Assets, robOrderType: RobOrderType, 
/**
 * This has to be assetclass having policyID of Indigo iAssets,
 * and the asset name being the ROB datum iasset.
 */
robIasset: AssetClass): FilledResult;
/**
 * The assets that have filled the order and are able to be claimed.
 */
declare function robSellOrderFilledAssets(robAssets: Assets, robOrderType: RobOrderType): FilledResult[];
declare function robBuyOrderSummary(robAssets: Assets, robOrderType: RobOrderType, oraclePrice: Rational): {
    /**
     * The amount that can be spent from the ROB.
     */
    redeemableCollateral: bigint;
    /**
     * The amount paid to the ROB when everything redeemed.
     */
    payoutIAsset: bigint;
};
/**
 * In case it's applied to a sell order instead, it will throw an error.
 */
declare function isBuyOrderFullyRedeemed(robAssets: Assets, robOrderType: RobOrderType, oraclePrice: Rational): boolean;
/**
 * Use the limit prices to decide fully redeemed.
 */
declare function isFullyRedeemed(robAssets: Assets, robOrderType: RobOrderType, 
/**
 * This has to be assetclass having policyID of Indigo iAssets,
 * and the asset name being the ROB datum iasset.
 */
robIasset: AssetClass): boolean;
/**
 * Right now we allow multi redemptions when the collateral asset, iasset pair is the same.
 * The on-chain however should allow even other combinations.
 */
declare function buildRedemptionsTx(
/**
 * The tuple represents the ROB UTXO and the amount to payout for a redemption. In case of buy order,
 * it's denominated in iAssets, in case of sell order, it's denominated in collateral asset.
 */
redemptions: [UTxO, bigint][], iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, price: Rational, redemptionReimbursementRatio: Rational, sysParams: SystemParams, tx: TxBuilder, 
/**
 * The number of Tx outputs before these new ones.
 */
txOutputsBeforeCount: bigint, collateralAssetRefInputIdx: bigint, iassetRefInputIdx: bigint, oracleIdx: OracleIdx): TxBuilder;
/**
 * Given all available LRP UTXOs, calculate total available collateral that can be redeemed.
 * Taking into account incorrectly initialised LRPs (without base collateral) and max number of ROBs.
 */
declare function calculateTotalCollateralForRedemption(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, iassetPrice: Rational, allRobs: [UTxO, RobDatum][], 
/**
 * How many LRPs can be redeemed in a single Tx.
 */
maxRobsInTx: number): bigint;
/**
 * Pick random subset from all the ROBs (it does the necessary filtering) satisfying the target collateral to spend.
 * It's relevant for BUY orders only.
 */
declare function randomRobsSubsetSatisfyingTargetCollateral(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, targetCollateralToSpend: bigint, iassetPrice: Rational, allLrps: [UTxO, RobDatum][], 
/**
 * How many LRPs can be redeemed in a single Tx.
 */
maxLrpsInTx: number, randomiseFn?: (arr: [UTxO, RobDatum][]) => [UTxO, RobDatum][]): [UTxO, RobDatum][];

declare const RobParamsSchema: _lucid_evolution_lucid.TObject<{
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iassetAuthToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    collateralAssetAuthToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    iassetPolicyId: _lucid_evolution_lucid.TUnsafe<string>;
    iassetValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type RobParams = Data.Static<typeof RobParamsSchema>;
declare function castRobParams(params: RobParams): Data;

declare function openRob(assetTokenNameAscii: string, depositAmt: bigint, orderType: RobOrderType, lucid: LucidEvolution, sysParams: SystemParams, robStakeCredential?: Credential): Promise<TxBuilder>;
declare function cancelRob(robOutRef: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function redeemRob(
/**
 * The tuple represents the ROB UTXO and the amount to payout for a redemption. In case of buy order,
 * it's denominated in iAssets, in case of sell order, it's denominated in collateral asset.
 */
redemptionRobsData: [OutRef, bigint][], priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, lucid: LucidEvolution, sysParams: SystemParams, currentSlot: number, pythMessage?: string | undefined, pythStateOutRef?: OutRef | undefined): Promise<TxBuilder>;
/**
 * Create Tx adjusting the ROB and claiming the received iAssets
 */
declare function adjustRob(lucid: LucidEvolution, robOutRef: OutRef, 
/**
 * A positive amount increases the deposit in the ROB,
 * and a negative amount takes deposit from the ROB.
 */
adjustmentAmt: bigint, newLimitPrice: {
    BuyOrder: Rational;
} | {
    SellOrder: {
        newLimitPrices: [AssetClass, Rational][];
    };
} | undefined, sysParams: SystemParams): Promise<TxBuilder>;
/**
 * Create Tx claiming the received iAssets.
 */
declare function claimRob(lucid: LucidEvolution, robOutRef: OutRef, sysParams: SystemParams): Promise<TxBuilder>;

declare const mkRobValidator: (params: RobParams) => SpendingValidator;
declare const mkRobValidatorFromSP: (params: RobParamsSP) => SpendingValidator;

declare const OneShotParamsSchema: _lucid_evolution_lucid.TObject<{
    referenceOutRef: _lucid_evolution_lucid.TObject<{
        txHash: _lucid_evolution_lucid.TUnsafe<string>;
        outputIdx: _lucid_evolution_lucid.TUnsafe<bigint>;
    }>;
    mintAmounts: _lucid_evolution_lucid.TArray<_lucid_evolution_lucid.TObject<{
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
        amount: _lucid_evolution_lucid.TUnsafe<bigint>;
    }>>;
}>;
type OneShotParams = Data.Static<typeof OneShotParamsSchema>;
declare function castOneShotParams(params: OneShotParams): Data;

declare function mkOneShotPolicy(params: OneShotParams): MintingPolicy;

declare function oneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<[TxBuilder, PolicyId]>;
declare function runOneShotMintTx(lucid: LucidEvolution, params: OneShotParams): Promise<PolicyId>;

declare function leverageCdpWithRob(leverage: number, baseCollateral: bigint, priceOracleOutRef: OutRef | undefined, iassetOutRef: OutRef, collateralAssetOutRef: OutRef, cdpCreatorOref: OutRef, interestOracleOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution, allRobs: [UTxO, RobDatum][], currentSlot: number, pythMessage?: string | undefined, pythStateOref?: OutRef | undefined): Promise<TxBuilder>;

declare const OnChainDecimalSchema: TSchema.Struct<{
    getOnChainInt: TSchema.Integer;
}>;
type OnChainDecimal = typeof OnChainDecimalSchema.Type;

/**
 * The following is the math related to the leverage calculations.
 *
 * Leverage is the multiplier you apply to the base deposit and you get the amount of final collateral
 * the CDP should have. Additionally, the minted amount is used to pay for fees. The leverage a user picks, is
 * already taking into account the fees, i.e. the fees are paid from the borrowed assets.
 *
 * There's a direct relationship between collateral ratio and leverage multiplier. Each leverage multiplier
 * results in a single collateral ratio and vice versa. Maximum potential leverage is the leverage that
 * results in collateral ratio being the maintenance collateral ratio of the corresponding iAsset.
 *
 * `d` = base deposit
 * `b` = total borrowed value (including the fees)
 * `L` = leverage
 * `f_m` = debt minting fee
 * `f_r` = reimbursement fee
 * `c` = collateral ratio
 *
 * The following is a detailed derivation of the math:
 *
 *  1.  Since the redemption fee is proportional to the borrowed amount,
 *      we can express the ADA we get from the order book as `b'=b*(1-f_r)`,
 *      since some of the borrowed amount goes back to the order book.
 *
 *  2.  Since all the minted iAsset are used to get borrowed ADA,
 *      the value of the minted asset will be `b`.
 *
 *  3.  The minting fee is a percentage of the value of the minted iAsset.
 *      Therefore the available ADA to add as collateral is `b''=b' - b*f_m = b*(1 - f_r - f_m)`.
 *
 *  4.  The collateral ratio can now be expressed as `c = (d + b * (1 - f_r - f_m)) / b`.
 *
 *  5.  Working out the expression, we can express `b` in terms of everything else: `b = d / (c - 1 + f_r + f_m)`.
 *
 *  6.  The minted amount will be `b / asset_price`.
 *
 *  7.  Collateral amount of the CDP is `d + b * (1 - f_r - f_m)`
 *
 *  8.  Leverage calculation: `L = (d + b * (1 - f_r - f_m)) / d`.
 *
 *      Plugging in the `b` formula we get: `L = (d + (d / (c - 1 + f_r + f_m)) * (1 - f_r - f_m)) / d`.
 *
 *      Simplified, yields the following:
 *      `L = 1 + ((1 - f_r - f_m) / (c - 1 + f_r + f_m))`
 *
 *  9.  `b'' = b * (1 - f_r - f_m)`
 *      Solved for `b` yields the following:
 *      `b = b'' / (1 - f_r - f_m)`
 *
 *  10. Having leverage and base deposit, we can find `b''`:
 *      `b’’ = d(L - 1)`
 */

/**
 * How many LRP redemptions can we fit into a TX with CDP open.
 */
declare const MAX_REDEMPTIONS_WITH_CDP_OPEN = 4;
type ROBRedemptionDetails = {
    utxo: UTxO;
    redeemedCollateral: bigint;
    /**
     * The amount of iAssets paid to ROB.
     */
    iassetsPayoutAmt: bigint;
    reimbursementIAssetAmt: bigint;
};
type ApproximateLeverageRedemptionsResult = {
    leverage: number;
    collateralRatio: Rational;
    redeemedCollateral: bigint;
};
/**
 * We assume exact precision. However, actual redemptions include rounding and
 * the rounding behaviour changes based on the number of redemptions.
 * This may slightly tweak the numbers and the result can be different.
 *
 * The math is described at the top of this code file.
 */
declare function approximateLeverageRedemptions(baseCollateral: bigint, targetLeverage: number, redemptionReimbursementRatio: Rational, debtMintingFeeRatio: Rational): ApproximateLeverageRedemptionsResult;
declare function summarizeActualLeverageRedemptions(lovelacesForRedemptionWithReimbursement: bigint, redemptionReimbursementRatio: Rational, iassetPrice: Rational, redemptionLrps: [UTxO, RobDatum][]): {
    redemptions: ROBRedemptionDetails[];
    /**
     * The actual amount received from redemptions (i.e. without the reimbursement fee).
     */
    totalRedeemedCollateral: bigint;
    /**
     * Total amount of IAssets to cover the reimbursement fee.
     */
    totalReimbursedIAsset: bigint;
    /**
     * Total amount of IAssets paid to ROBs, including the reimbursement.
     */
    totalIAssetPayout: bigint;
};
/**
 * The math is described at the top of this code file.
 */
declare function calculateCollateralRatioFromLeverage(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, leverage: number, baseCollateral: bigint, iassetPrice: Rational, debtMintingFeePercentage: OnChainDecimal, redemptionReimbursementPercentage: OnChainDecimal, allLrps: [UTxO, RobDatum][]): OnChainDecimal | undefined;
/**
 * The math is described at the top of this code file.
 */
declare function calculateLeverageFromCollateralRatio(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, collateralRatio: Rational, baseCollateral: bigint, iassetPrice: Rational, debtMintingFeeRatio: Rational, redemptionReimbursementRatio: Rational, allLrps: [UTxO, RobDatum][]): number | undefined;

declare function startPriceOracleTx(lucid: LucidEvolution, assetName: string, startPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, refOutRef?: OutRef, auxiliaryData?: Core.Data.Data): Promise<[TxBuilder, AssetClass]>;
declare function feedPriceOracleTx(lucid: LucidEvolution, oracleOref: OutRef, newPrice: Rational, oracleParams: PriceOracleParams, currentSlot: number, auxiliaryData?: Core.Data.Data): Promise<TxBuilder>;

declare function mkPriceOracleValidator(params: PriceOracleParams): SpendingValidator;

/**
 * Accept only a single item in the array and return it.
 * When not exclusively a single item, throw an error.
 */
declare function matchSingle<T>(xs: T[], mkErr: (xs: T[]) => Error): T;
declare function loadSystemParamsFromFile(file: string): SystemParams;
declare function loadSystemParamsFromUrl(url: string): Promise<SystemParams>;

declare function shuffle<T>(arr: T[]): T[];
/**
 * The parameter `arr` should be sorted for correct results.
 */
declare function insertSorted<T>(arr: T[], item: T, ord: ord.Ord<T>): T[];
/**
 * Replace when existent, otherwise add at the end.
 */
declare const repsertReadonlyArr: <K, V>(predicate: Predicate<K>, val: V, mkKey: () => K) => (arr: ReadonlyArray<readonly [K, V]>) => ReadonlyArray<readonly [K, V]>;
declare const repsertWithReadonlyArr: <K, V>(predicate: Predicate<K>, replaceVal: (oldVal: V) => V, newVal: () => V, mkKey: () => K) => (arr: ReadonlyArray<readonly [K, V]>) => ReadonlyArray<readonly [K, V]>;

/**
 * Returns the inline datum.
 * Throws when the UTXO doesn't have an inline datum
 * (i.e. in case it has hash datum or no datum).
 */
declare function getInlineDatumOrThrow(utxo: UTxO): Datum;
declare function addrDetails(lucid: LucidEvolution): Promise<[Credential, Credential | undefined]>;
declare function createScriptAddress(network: Network, scriptHash: ScriptHash, stakeCredential?: Credential): Address;
declare function scriptRef(ref: ScriptReference, lucid: LucidEvolution): Promise<UTxO>;
/**
 * Complete, sign with wallet, submit a tx and wait for confirmation.
 */
declare function submitTx(lucid: LucidEvolution, tx: TxBuilder): Promise<void>;
declare function balance(utxos: UTxO[]): Assets;
/**
 * Estimate the min lovelace for a UTXO so it can be created.
 */
declare function estimateUtxoMinLovelace(protocolParameters: ProtocolParameters, destinationAddr: string, assets: Assets, destinationDatum?: OutputDatum | undefined, scriptRef?: Script | undefined): bigint;

/**
 * TODO: remove this, it should be part of the testsuite only
 * Uses an always fail validator for the destination address.
 */
declare function runCreateScriptRefTx(lucid: LucidEvolution, scriptRefValidator: SpendingValidator, network: Network): Promise<OutRef>;

/**
 * Plutus division behaves differently when working with negative numbers vs positive ones.
 */
declare function divideOnChainCompatible(a: bigint, b: bigint): bigint;
declare function bigintMax(a: bigint, b: bigint): bigint;
declare function bigintMin(a: bigint, b: bigint): bigint;
declare function sum(arr: bigint[]): bigint;
declare function fromDecimal(val: Decimal): bigint;
declare function zeroNegatives(a: bigint): bigint;
declare const BigIntOrd: ord.Ord<bigint>;

type CollateralAssetInfo = {
    collateralAsset: AssetClass;
    oracleParams: PriceOracleParams | undefined;
    interestOracleParams: InterestOracleParams;
    interestOracleNft: AssetClass;
};
type AssetInfo = {
    iassetTokenNameAscii: string;
    collateralAssets: CollateralAssetInfo[];
};
/** Price oracle config for indigo oracle (used during initialize) */
type IndigoOracleNftParam = {
    tag: '_indigo_oracle_nft';
    tokenName: string;
    startPrice: Rational;
    params: {
        biasTime: bigint;
        expirationPeriod: bigint;
    };
};
/** Price oracle config for Pyth (used during initialize) */
type PythOracleParam = {
    tag: '_pyth_oracle_nft';
    pythFeedParams: PythFeedParamsSP;
};
type PriceOracleParam = IndigoOracleNftParam | PythOracleParam;
type InitialStablepoolParam = {
    collateralAsset: AssetClass;
    collateralToIassetRatio: Rational;
    mintingFeeRatio: Rational;
    redemptionFeeRatio: Rational;
    mintingEnabled: boolean;
    redemptionEnabled: boolean;
    feeManager: string | undefined;
    minMintOrderAmount: bigint;
    minRedemptionOrderAmount: bigint;
};
/** Collateral asset input for initialize */
type InitialCollateralAssetParam = {
    collateralAsset: AssetClass;
    extraDecimals: bigint;
    priceOracle: PriceOracleParam;
    interestOracle: {
        tokenName: string;
        initialInterestRate: bigint;
        params: {
            biasTime: bigint;
        };
    };
    redemptionRatio: Rational;
    maintenanceRatio: Rational;
    liquidationRatio: Rational;
    minCollateralAmt: bigint;
    firstCollateralAsset: boolean;
    nextCollateralAsset: AssetClass | undefined;
};
/** IAsset input for initialize */
type InitialAssetParam = {
    name: string;
    collateralAssets: InitialCollateralAssetParam[];
    stablepools: InitialStablepoolParam[];
    debtMintingFeeRatio: Rational;
    liquidationProcessingFeeRatio: Rational;
    stabilityPoolWithdrawalFeeRatio: Rational;
    redemptionReimbursementRatio: Rational;
    redemptionProcessingFeeRatio: Rational;
    firstAsset: boolean;
    nextAsset?: string | undefined;
};
/** Configurable options for protocol initialization */
type InitializeOptions = {
    /** Number of CDP creator UTxOs to create */
    numCdpCreators: bigint;
    /** Number of collector UTxOs to create */
    numCollectors: bigint;
    /** Number of interest collector UTxOs to create */
    numInterestCollectors: bigint;
    /** Number of treasury UTxo deployments */
    numTreasuryUtxos: bigint;
    /** INDY amount to send to the treasury */
    treasuryIndyAmount: bigint;
    /** Total INDY token supply to mint */
    totalIndySupply: bigint;
    /** Stability pool: fee in lovelace to create an SP account */
    accountCreateFeeLovelaces: bigint;
    /** Stability pool: cooldown between account processing (ms) */
    accountProcessingCooldownMs: bigint;
    /** Interest collection: cooldown between interest settlement (slot) */
    interestSettlementCooldown: bigint;
    /** CDP redeem: extra fee in lovelace for partial redemption */
    partialRedemptionExtraFeeLovelace: number;
    /** Default Protocol bias time (ms). Used for CDP, CDP Redeem, Stability Pool, Interest Collection, Interest Oracle, Price Oracle, and Stableswap. */
    biasTime: bigint;
    gBiasTime?: bigint;
    accountProcessingBiasTime?: bigint;
    /** Lovelace per interest collector deployment UTxO */
    interestCollectorUtxoLovelaces: bigint;
};

declare const IAssetPriceInfoSchema: TSchema.Union<[TSchema.Struct<{
    Delisted: TSchema.Struct<{
        price: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
    }>;
}>, TSchema.Struct<{
    OracleNft: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
}>, TSchema.Struct<{
    DeferredValidation: TSchema.Struct<{
        feedValHash: TSchema.ByteArray;
    }>;
}>]>;
type IAssetPriceInfo = typeof IAssetPriceInfoSchema.Type;
declare const IAssetContentSchema: TSchema.Struct<{
    assetName: TSchema.ByteArray;
    collateralAssetsCount: TSchema.Integer;
    debtMintingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    liquidationProcessingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionReimbursementRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    redemptionProcessingFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    firstIAsset: TSchema.Boolean;
    nextIAsset: TSchema.NullOr<TSchema.ByteArray>;
}>;
type IAssetContent = typeof IAssetContentSchema.Type;
declare const CollateralAssetContentSchema: TSchema.Struct<{
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    extraDecimals: TSchema.Integer;
    priceInfo: TSchema.Union<[TSchema.Struct<{
        Delisted: TSchema.Struct<{
            price: TSchema.Struct<{
                numerator: TSchema.Integer;
                denominator: TSchema.Integer;
            }>;
        }>;
    }>, TSchema.Struct<{
        OracleNft: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
    }>, TSchema.Struct<{
        DeferredValidation: TSchema.Struct<{
            feedValHash: TSchema.ByteArray;
        }>;
    }>]>;
    interestOracleNft: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    redemptionRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    maintenanceRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    liquidationRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
    minCollateralAmt: TSchema.Integer;
    firstCollateralAsset: TSchema.Boolean;
    nextCollateralAsset: TSchema.NullOr<TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>>;
}>;
type CollateralAssetContent = typeof CollateralAssetContentSchema.Type;
declare const IAssetDatumSchema: TSchema.Union<[TSchema.Struct<{
    IAssetContent: TSchema.Struct<{
        assetName: TSchema.ByteArray;
        collateralAssetsCount: TSchema.Integer;
        debtMintingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        liquidationProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        stabilityPoolWithdrawalFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionReimbursementRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        redemptionProcessingFeeRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        firstIAsset: TSchema.Boolean;
        nextIAsset: TSchema.NullOr<TSchema.ByteArray>;
    }>;
}>, TSchema.Struct<{
    CollateralAssetContent: TSchema.Struct<{
        iasset: TSchema.ByteArray;
        collateralAsset: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        extraDecimals: TSchema.Integer;
        priceInfo: TSchema.Union<[TSchema.Struct<{
            Delisted: TSchema.Struct<{
                price: TSchema.Struct<{
                    numerator: TSchema.Integer;
                    denominator: TSchema.Integer;
                }>;
            }>;
        }>, TSchema.Struct<{
            OracleNft: TSchema.Struct<{
                currencySymbol: TSchema.ByteArray;
                tokenName: TSchema.ByteArray;
            }>;
        }>, TSchema.Struct<{
            DeferredValidation: TSchema.Struct<{
                feedValHash: TSchema.ByteArray;
            }>;
        }>]>;
        interestOracleNft: TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>;
        redemptionRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        maintenanceRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        liquidationRatio: TSchema.Struct<{
            numerator: TSchema.Integer;
            denominator: TSchema.Integer;
        }>;
        minCollateralAmt: TSchema.Integer;
        firstCollateralAsset: TSchema.Boolean;
        nextCollateralAsset: TSchema.NullOr<TSchema.Struct<{
            currencySymbol: TSchema.ByteArray;
            tokenName: TSchema.ByteArray;
        }>>;
    }>;
}>]>;
type IAssetDatum = typeof IAssetDatumSchema.Type;
declare const IAssetRedeemerSchema: TSchema.Union<[TSchema.Struct<{
    UpdateOrInsertAsset: TSchema.Struct<{
        executeInputIdx: TSchema.Integer;
    }>;
}>, TSchema.Literal<["UpgradeVersion"]>]>;
type IAssetRedeemer = typeof IAssetRedeemerSchema.Type;
declare function serialiseIAssetRedeemer(r: IAssetRedeemer): string;
declare function serialiseIAssetDatum(d: IAssetDatum): string;
declare function parseIAssetDatum(datum: string): option.Option<IAssetContent>;
declare function parseIAssetDatumOrThrow(datum: string): IAssetContent;
declare function parseCollateralAssetDatum(datum: string): option.Option<CollateralAssetContent>;
declare function parseCollateralAssetDatumOrThrow(datum: string): CollateralAssetContent;
type IAssetOutput = ParsedOutput<IAssetContent>;
type CollateralAssetOutput = ParsedOutput<CollateralAssetContent>;

/** Default init options used by tests; users must pass explicit options to init(). */
declare const DEFAULT_INIT_OPTIONS: InitializeOptions;
declare const INIT_TOKEN_NAMES: {
    readonly indy: "INDY";
    readonly dao: "DAO";
    readonly multisigUtxo: "INTEREST_COLLECTION_ADMIN";
    readonly govNft: "GOV_NFT";
    readonly pollManager: "POLL_MANAGER";
    readonly upgrade: "UPGRADE";
    readonly iasset: "IASSET";
    readonly collateralAsset: "COLLATERAL_ASSET";
    readonly stabilityPool: "STABILITY_POOL";
    readonly versionRecord: "VERSION_RECORD";
    readonly cdpCreator: "CDP_CREATOR";
    readonly cdp: "CDP";
    readonly stakingManager: "STAKING_MANAGER";
    readonly staking: "STAKING_POSITION";
    readonly snapshotEpochToScaleToSum: "SNAPSHOT_EPOCH_TO_SCALE_TO_SUM";
    readonly account: "SP_ACCOUNT";
};
declare function mintOneTimeToken(lucid: LucidEvolution, tokenName: string, amount: bigint): Promise<PolicyId>;
/** Mint a one-shot token and return its AssetClass. */
declare function mintOneTimeAsset(lucid: LucidEvolution, tokenName: string, amount: bigint): Promise<AssetClass>;
/** Build an auth-token AssetClass derived from a parent token. */
declare function deriveAuthToken(parent: AssetClass, tokenName: string): AssetClass;
declare function initScriptRef(lucid: LucidEvolution, validator: SpendingValidator): Promise<Input>;
declare function initCollector(lucid: LucidEvolution, collectorParams: CollectorParamsSP, numCollectors: bigint): Promise<void>;
declare function initInterestCollector(lucid: LucidEvolution, interestCollectionValHash: string, multisigUtxoNft: AssetClass, numInterestCollectors: bigint, interestCollectorUtxoLovelaces: bigint): Promise<void>;
declare function initCDPCreator(lucid: LucidEvolution, cdpCreatorParams: CDPCreatorParamsSP, numCdpCreators: bigint): Promise<void>;
declare function initTreasury(lucid: LucidEvolution, treasuryParams: TreasuryParamsSP, daoAsset: AssetClass, indyAsset: AssetClass, treasuryIndyAmount: bigint, numTreasuryCollectors: bigint): Promise<void>;
declare function initStakingManager(lucid: LucidEvolution, stakingParams: StakingParamsSP): Promise<void>;
declare function handleOracleForCollateralAsset(lucid: LucidEvolution, iasset: InitialAssetParam, collateralAsset: InitialCollateralAssetParam, pythConfig: PythConfig, currentSlot: number): Promise<{
    info: IAssetPriceInfo;
    params: PriceOracleParams | undefined;
}>;
declare function initializeAsset(lucid: LucidEvolution, iassetParams: IAssetParamsSP, iassetToken: AssetClass, collateralAssetAuthToken: AssetClass, cdpAuthToken: AssetClass, cdpParams: CdpParamsSP, stableswapValidatorHash: string, stabilityPoolParams: StabilityPoolParamsSP, stabilityPoolToken: AssetClass, asset: InitialAssetParam, pythConfig: PythConfig, currentSlot: number): Promise<AssetInfo>;
declare function initGovernance(lucid: LucidEvolution, governanceParams: GovParamsSP, govToken: AssetClass, initialAssets: InitialAssetParam[], protocolParams: ProtocolParams): Promise<void>;
declare function mintAuthTokenDirect(lucid: LucidEvolution, asset: AssetClass, tokenName: string, amount: bigint): Promise<void>;

/**
 * Initialize Pyth config from an existing Pyth state asset (e.g. from test's initPyth).
 * Caller is responsible for creating the Pyth state asset before calling this.
 */
declare function initPythConfig(lucid: LucidEvolution, initialAssets: InitialAssetParam[], pythStateAsset: AssetClass): Promise<PythConfig>;
declare function init(lucid: LucidEvolution, defaultInitialAssets: InitialAssetParam[], currentSlot: number, mkPythBasedAssets: ((pythStateNft: AssetClass) => InitialAssetParam[]) | undefined, protocolParams: ProtocolParams, initOptions: InitializeOptions, spStakingCred?: ScriptCredential | undefined, treasuryStakingCred?: ScriptCredential | undefined): Promise<[SystemParams, AssetInfo[]]>;

/**
 * Types mirroring the Aiken Pyth parser (lib/pyth).
 * Use bigint for values that may exceed Number safe integer (2^53 - 1).
 */
type MarketSession = 'Regular' | 'PreMarket' | 'PostMarket' | 'OverNight' | 'Closed';
/** Price-update payload magic (4 bytes). Must match Aiken price_update_magic_le. */
declare const PRICE_UPDATE_MAGIC: Uint8Array<ArrayBuffer>;
/** Pyth message (Solana format) magic (4 bytes). Must match Aiken solana_format_magic_le. */
declare const SOLANA_FORMAT_MAGIC: Uint8Array<ArrayBuffer>;
/**
 * Optional<T> = undefined (property not present) | null (explicit None) | T (value)
 * Matches Aiken Option<Option<T>> for feed properties.
 */
interface Feed {
    feedId: number;
    price?: bigint | null;
    bestBidPrice?: bigint | null;
    bestAskPrice?: bigint | null;
    publisherCount?: number;
    exponent?: number;
    confidence?: bigint | null;
    fundingRate?: bigint | null;
    fundingTimestamp?: bigint | null;
    fundingRateInterval?: bigint | null;
    marketSession?: MarketSession;
    emaPrice?: bigint | null;
    emaConfidence?: bigint | null;
    feedUpdateTimestamp?: bigint | null;
}
/**
 * Price update payload based on the ParsedPayload returned by pyth-lazer-sdk,
 * extended with the channel id used by the on-chain parser.
 */
interface PriceUpdate extends ParsedPayload {
    /** Channel id (u8) */
    channelId: number;
}
/**
 * Components of a Pyth message (Solana format).
 * To produce a valid on-chain message, payload should be a PriceUpdate payload
 * and signature must be Ed25519 over payload with the given public key.
 */
interface PythMessageParts {
    /** Ed25519 signature (64 bytes) */
    signature: Uint8Array;
    /** Ed25519 public key (32 bytes) */
    publicKey: Uint8Array;
    /** Payload bytes (e.g. encoded PriceUpdate) */
    payload: Uint8Array;
}

/**
 * Decode a PriceUpdate payload produced by {@link encodePriceUpdate}.
 */
declare function decodePriceUpdate(payload: Uint8Array): PriceUpdate;
/**
 * Decode a Solana-format Pyth message produced by {@link encodePythMessage}.
 */
declare function decodePythMessage(message: Uint8Array): PythMessageParts;

/**
 * Encode a PriceUpdate to the binary payload format consumed by the on-chain parser.
 * This is the payload that goes inside a PythMessage.
 */
declare function encodePriceUpdate(update: PriceUpdate): Uint8Array;
/**
 * Encode a full Pyth message (Solana format): magic + signature + key + payload length + payload.
 * Use this when you already have a signed payload (e.g. from a Pyth API or after signing locally).
 */
declare function encodePythMessage(parts: PythMessageParts): Uint8Array;
/**
 * Encode a PythMessage whose payload is a PriceUpdate.
 * Signs the payload with the given secret key (32-byte Ed25519 seed).
 * Returns the full message bytes (hex-friendly).
 */
declare function encodeSignedPythMessage(update: PriceUpdate, secretKey: Uint8Array): Promise<Uint8Array>;

declare const mkPythFeedValidator: (params: PythFeedParams) => SpendingValidator;

declare const IAssetScriptParamsSchema: _lucid_evolution_lucid.TObject<{
    upgradeToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
}>;
type IAssetScriptParams = Data.Static<typeof IAssetScriptParamsSchema>;
declare const IAssetScriptParams: IAssetScriptParams;
declare const mkIAssetValidatorFromSP: (params: IAssetParamsSP) => SpendingValidator;

declare const MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET = 9;
type Interval = {
    validFrom: number;
    validTo: number;
};
declare function attachOracle(iasset: Uint8Array<ArrayBufferLike>, collateralAsset: AssetClass, priceInfo: IAssetPriceInfo, priceOracleOref: OutRef | undefined, pythStateOref: OutRef | undefined, pythMessage: string | undefined, pythConfig: PythConfig, biasTime: bigint, currentSlot: number, lucid: LucidEvolution, tx: TxBuilder): Promise<{
    interval: Interval;
    referenceInputs: UTxO[];
}>;

declare const BASE_MAX_EXECUTION_FEE = 1620000n;
declare function createDestinationDatum(datum: Data$1.Data | null, outRef: OutRef): string;

declare function createStableswapOrder(iasset: string, collateralAsset: AssetClass, amount: bigint, minting: boolean, poolDatum: StableswapPoolContent, params: SystemParams, lucid: LucidEvolution, destinationAddress?: Address, destinationInlineDatum?: Core.Data.Data, maxExecutionFee?: bigint, additionalLovelaces?: bigint, maxFeeRatio?: Rational): Promise<TxBuilder>;
declare function cancelStableswapOrder(stableswapOrderOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function batchProcessStableswapOrders(stableswapOrderOrefs: OutRef[], stableswapPoolOref: OutRef, treasuryOref: OutRef, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
declare function updateStableswapPoolFees(stableswapPoolOutRef: OutRef, stableswapFeeOutRef: OutRef, newMintingFeeRatio: Rational | null, newRedemptionFeeRatio: Rational | null, sysParams: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;

declare const StableswapOrderDatumSchema: TSchema.Struct<{
    iasset: TSchema.ByteArray;
    collateralAsset: TSchema.Struct<{
        currencySymbol: TSchema.ByteArray;
        tokenName: TSchema.ByteArray;
    }>;
    owner: TSchema.ByteArray;
    destination: TSchema.Struct<{
        paymentCredential: TSchema.Union<[TSchema.Struct<{
            PublicKeyCredential: TSchema.ByteArray;
        }>, TSchema.Struct<{
            ScriptCredential: TSchema.ByteArray;
        }>]>;
        stakeCredential: TSchema.NullOr<TSchema.Union<[TSchema.Struct<{
            Inline: TSchema.Union<[TSchema.Struct<{
                PublicKeyCredential: TSchema.ByteArray;
            }>, TSchema.Struct<{
                ScriptCredential: TSchema.ByteArray;
            }>]>;
        }>, TSchema.Struct<{
            Pointer: TSchema.Struct<{
                slotNumber: TSchema.Integer;
                transactionIndex: TSchema.Integer;
                certificateIndex: TSchema.Integer;
            }>;
        }>]>>;
    }>;
    destinationInlineDatum: TSchema.NullOr<Schema$1.SchemaClass<Data$1.Data, Data$1.Data, never>>;
    maxExecutionFee: TSchema.Integer;
    maxFeeRatio: TSchema.Struct<{
        numerator: TSchema.Integer;
        denominator: TSchema.Integer;
    }>;
}>;
type StableswapOrderDatum = typeof StableswapOrderDatumSchema.Type;
declare const StableswapOrderRedeemerSchema: TSchema.Union<[TSchema.Literal<["BatchProcessStableswapOrders"]>, TSchema.Struct<{
    BatchAuxiliary: TSchema.Struct<{
        ownInputIndex: TSchema.Integer;
        mainOrderInputIndex: TSchema.Integer;
    }>;
}>, TSchema.Literal<["CancelStableswapOrder"]>, TSchema.Literal<["UpdateFees"]>, TSchema.Literal<["UpgradeVersion"]>]>;
type StableswapOrderRedeemer = typeof StableswapOrderRedeemerSchema.Type;
/**
 * This is used when order does not require any specific output datum.
 */
declare const StableswapOutputDatumSchema: TSchema.Tuple<[TSchema.ByteArray, TSchema.Struct<{
    txHash: TSchema.ByteArray;
    outputIndex: TSchema.Integer;
}>]>;
type StableswapOutputDatum = typeof StableswapOutputDatumSchema.Type;
declare function serialiseStableswapOrderDatum(d: StableswapOrderDatum): string;
declare function parseStableswapOrderDatum(datum: string): option.Option<StableswapOrderDatum>;
declare function parseStableswapOrderDatumOrThrow(datum: string): StableswapOrderDatum;
declare function serialiseStableswapOutputDatum(d: StableswapOutputDatum): string;
declare function serialiseStableswapOrderRedeemer(r: StableswapOrderRedeemer): string;
declare function parseStableswapOrderRedeemer(redeemerCborHex: string): option.Option<StableswapOrderRedeemer>;
declare function parseStableswapOrderRedeemerOrThrow(redeemerCborHex: string): StableswapOrderRedeemer;

declare const StableswapParamsSchema: _lucid_evolution_lucid.TObject<{
    iassetSymbol: _lucid_evolution_lucid.TUnsafe<string>;
    cdpToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    versionRecordToken: _lucid_evolution_lucid.TObject<{
        currencySymbol: _lucid_evolution_lucid.TUnsafe<string>;
        tokenName: _lucid_evolution_lucid.TUnsafe<string>;
    }>;
    cdpValHash: _lucid_evolution_lucid.TUnsafe<string>;
    treasuryValHash: _lucid_evolution_lucid.TUnsafe<string>;
}>;
type StableswapParams = Data.Static<typeof StableswapParamsSchema>;
declare const StableswapParams: StableswapParams;

declare const mkStableswapValidator: (params: StableswapParams) => SpendingValidator;
declare const mkStableswapValidatorFromSP: (params: StableswapParamsSP) => SpendingValidator;

declare function mkIAssetTokenPolicy(ac: AssetClass): MintingPolicy;

declare function mkAuthTokenPolicy(ac: AssetClass, tn: string): MintingPolicy;

declare const alwaysFailValidator: SpendingValidator;

export { type AccountAction, type AccountContent, AccountContentSchema, type ActionReturnDatum, type AddCollateralAsssetContent, type AddressCredential, type AddressCredentialOrDatum, type AddressSP, AikenIntervalIntervalBound, AikenIntervalIntervalBoundType, type Amount, type AssetClassD, type AssetClassSP, AssetClassSchema, type AssetInfo, type AssetSnapshot, type AssetState, type AuthTokenPolicies, BASE_MAX_EXECUTION_FEE, BASE_MAX_TX_FEE, BigIntOrd, type CDPContent, CDPCreatorParams, type CDPCreatorParamsSP, type CDPDatum, CardanoTransactionValidityRange, type CdpParams, type CdpParamsSP, type CdpRedeemParams, type CdpRedeemParamsSP, type CdpRedeemer, type CollateralAssetContent, type CollateralAssetInfo, type CollateralAssetOutput, type CollectorParamsSP, type CollectorRedeemer, CollectorRedeemerSchema, CredentialD, CredentialSchema, type CurrencySymbolSP, DEFAULT_INIT_OPTIONS, type DerivedPythPrice, type DerivedPythPriceSP, DerivedPythPriceSchema, type E2S2SIndex, type E2S2SIndicesPerAsset, type EpochToScaleKey, type EpochToScaleToSumEntry, type ExecuteDatum, ExecuteParams, type ExecuteParamsSP, type Feed, type FindE2S2SIdxResult, type GovDatum, GovParams, type GovParamsSP, type GovRedeemer, type IAssetContent, type IAssetDatum, type IAssetOutput, type IAssetParamsSP, type IAssetPriceInfo, IAssetPriceInfoSchema, type IAssetRedeemer, IAssetScriptParams, INIT_TOKEN_NAMES, type IndigoOracleNftParam, type InitialAssetParam, type InitialCollateralAssetParam, type InitialStablepoolParam, type InitializeOptions, type Input, type InterestCollectionDatum, type InterestCollectionParams, type InterestCollectionParamsSP, InterestCollectionParamsSchema, type InterestCollectionRedeemer, type InterestOracleDatum, InterestOracleDatumSchema, type InterestOracleParams, InterestOracleParamsSchema, type InterestOracleRedeemer, MAX_BUY_ROB_REDEMPTIONS_COUNT, MAX_COLLATERAL_ASSETS_COUNT_PER_IASSET, MAX_E2S2S_ENTRIES_COUNT, MAX_REDEMPTIONS_WITH_CDP_OPEN, MAX_SELL_ROB_REDEMPTIONS_COUNT, MIN_ROB_COLLATERAL_AMT, type MarketSession, type ModifyStableswapPoolContent, ONE_DAY, ONE_HOUR, ONE_SECOND, ONE_YEAR, type OneShotParams, OneShotParamsSchema, type OracleIdx, OracleIdxSchema, type Output, PRICE_UPDATE_MAGIC, type ParsedOutput, type PollDatum, type PollManagerContent, PollManagerParams, type PollManagerParamsSP, type PollManagerRedeemer, type PollShardContent, PollShardParams, type PollShardParamsSP, type PollShardRedeemer, type PollStatus, type PriceOracleDatum, type PriceOracleParam, type PriceOracleParams, PriceOracleParamsSchema, type PriceOracleRedeemer, type PriceUpdate, type ProcessRequestAccountContent, type ProposalContent, ProposalContentSchema, type ProposeAssetContent, type ProposeStableswapPoolContent, type ProtocolParams, ProtocolParamsSchema, type PubKeyHash, type PythConfig, type PythConfiguration, type PythFeedConfig, type PythFeedParams, type PythFeedParamsSP, type PythFeedRedeemer, type PythMessageParts, type PythOracleParam, type PythPriceConfigurationSP, type PythStateDatum, type PythUpdatesRedeemer, type Rational, RationalSchema, type RedeemCdpWithdrawalRedeemer, type RobDatum, type RobOrderType, type RobOutput, type RobParams, type RobParamsSP, RobParamsSchema, type RobRedeemer, SOLANA_FORMAT_MAGIC, type SPInteger, SPIntegerSchema, type ScriptCredential, type ScriptOutput, type ScriptRef, type ScriptReference, type ScriptReferences, type SnapshotEpochToScaleToSumContent, SnapshotEpochToScaleToSumContentSchema, type StabilityPoolContent, StabilityPoolContentSchema, StabilityPoolDatumSchema, StabilityPoolParams, type StabilityPoolParamsSP, type StabilityPoolRedeemer, StabilityPoolRedeemerSchema, type StableswapOrderDatum, StableswapOrderDatumSchema, type StableswapOrderRedeemer, type StableswapOutputDatum, type StableswapParamsSP, type StableswapPoolContent, StakeCredential, StakeCredentialSchema, type StakingManager, type StakingManagerOutput, type StakingParamsSP, type StakingPosLockedAmt, type StakingPosition, type StakingPositionOutput, type StakingRedeemer, type StartTime, type StateSnapshot, type SumSnapshot, type SystemParams, type TokenNameSP, type TreasuryParamsSP, type TreasuryWithdrawal, type TreasuryWithdrawalItem, TreasuryWithdrawalSchema, type UpgradePaths, type ValidatorHashes, VerificationKeyHashSchema, type VersionRecordParams, VersionRecordTokenParams, type VoteOption, addrDetails, adjustCdp, adjustPriceToDecimals, adjustRob, adjustStakingPosition, alwaysFailValidator, annulRequest, approximateLeverageRedemptions, attachOracle, balance, batchCollectInterest, batchProcessStableswapOrders, bigintMax, bigintMin, buildRedemptionsTx, burnCdp, calculateAccruedInterest, calculateAdaReward, calculateCollateralRatioFromLeverage, calculateIAssetRedemptionAmt, calculateLeverageFromCollateralRatio, calculateMinCollateralCappedIAssetRedemptionAmt, calculatePurchaseAmtWhenRobBuyOrder, calculatePurchaseAmtWhenRobSellOrder, calculateSpendAmtWhenRobBuyOrder, calculateSpendAmtWhenRobSellOrder, calculateTotalCollateralForRedemption, calculateUnitaryInterest, calculateUnitaryInterestSinceOracleLastUpdated, cancelRob, cancelStableswapOrder, castCDPCreatorParams, castCdpParams, castCdpRedeemParams, castExecuteParams, castGovParams, castInterestCollectionParams, castInterestOracleParams, castOneShotParams, castPollManagerParams, castPollShardParams, castPriceOracleParams, castRobParams, castStabilityPoolParams, castStakingParams, castVersionRecordTokenParams, cdpCollateralRatioPercentage, claimRob, closeCdp, closeStakingPosition, collectInterestTx, collectorFeeTx, createDestinationDatum, createE2s2sSnapshots, createProcessRequestAccountRedeemer, createProposal, createScriptAddress, createShardsChunks, createStableswapOrder, decodePriceUpdate, decodePythMessage, depositCdp, deriveAuthToken, distributeAda, distributeInterest, distributeReward, divideOnChainCompatible, encodePriceUpdate, encodePythMessage, encodeSignedPythMessage, endProposal, estimateUtxoMinLovelace, executeProposal, feedInterestOracle, feedPriceOracleTx, findRelevantE2s2sIdxs, findStakingManager, findStakingManagerByOutRef, findStakingPositionByOutRef, freezeCdp, fromDataDerivedPythPrice, fromDecimal, fromSPInteger, fromSysParamsCredential, fromSysParamsDerivedPythPrice, fromSysParamsPythFeedParams, fromSysParamsStakeCredential, fromSystemParamsAsset, fromSystemParamsAssetLucid, fromSystemParamsScriptRef, getAssetClassComparisonStr, getInlineDatumOrThrow, getPythFeedConfig, getUpdatedAccountDeposit, handleOracleForCollateralAsset, iassetValueOfCollateral, init, initCDPCreator, initCollector, initGovernance, initInterestCollector, initPythConfig, initScriptRef, initSpState, initStakingManager, initSumVal, initTreasury, initializeAsset, insertSorted, isBuyOrderFullyRedeemed, isFullyRedeemed, isSameEpochToScaleKey, leverageCdpWithRob, liquidateCdp, liquidationHelper, loadSystemParamsFromFile, loadSystemParamsFromUrl, matchSingle, mergeCdps, mergeShards, mintAuthTokenDirect, mintCdp, mintOneTimeAsset, mintOneTimeToken, mkAuthTokenPolicy, mkCDPCreatorValidator, mkCDPCreatorValidatorFromSP, mkCdpRedeemValidatorFromSP, mkCdpValidatorFromSP, mkCollectorValidatorFromSP, mkExecuteValidator, mkExecuteValidatorFromSP, mkGovValidator, mkGovValidatorFromSP, mkIAssetTokenPolicy, mkIAssetValidatorFromSP, mkInterestCollectionValidator, mkInterestCollectionValidatorFromSP, mkInterestOracleValidator, mkOneShotPolicy, mkPollManagerValidator, mkPollManagerValidatorFromSP, mkPollShardValidator, mkPollShardValidatorFromSP, mkPriceOracleValidator, mkPythFeedValidator, mkRobValidator, mkRobValidatorFromSP, mkSPInteger, mkStabilityPoolAddr, mkStabilityPoolValidator, mkStabilityPoolValidatorFromSP, mkStableswapValidator, mkStableswapValidatorFromSP, mkStakingValidatorFromSP, mkTreasuryAddr, mkTreasuryValidatorFromSP, mkVersionRecordTokenPolicy, mkVersionRegistryValidator, oneShotMintTx, openCdp, openRob, openStakingPosition, parseAccountDatum, parseAccountDatumOrThrow, parseCdpDatum, parseCdpDatumOrThrow, parseCdpRedeemer, parseCdpRedeemerOrThrow, parseCollateralAssetDatum, parseCollateralAssetDatumOrThrow, parseExecuteDatum, parseExecuteDatumOrThrow, parseGovDatum, parseGovDatumOrThrow, parseIAssetDatum, parseIAssetDatumOrThrow, parseInterestCollectionDatum, parseInterestOracleDatum, parsePollManager, parsePollManagerOrThrow, parsePollShard, parsePollShardOrThrow, parsePollShardRedeemer, parsePollShardRedeemerOrThrow, parsePriceOracleDatum, parsePythStateDatum, parseRobDatum, parseRobDatumOrThrow, parseRobRedeemer, parseRobRedeemerOrThrow, parseSnapshotEpochToScaleToSumDatum, parseSnapshotEpochToScaleToSumDatumOrThrow, parseStabilityPoolDatum, parseStabilityPoolDatumOrThrow, parseStabilityPoolRedeemer, parseStabilityPoolRedeemerOrThrow, parseStableswapOrderDatum, parseStableswapOrderDatumOrThrow, parseStableswapOrderRedeemer, parseStableswapOrderRedeemerOrThrow, parseStableswapPoolDatum, parseStableswapPoolDatumOrThrow, parseStakingManagerDatum, parseStakingPosition, parseStakingPositionOrThrow, parseStakingRedeemer, parseStakingRedeemerOrThrow, partitionEpochToScaleToSums, processSpRequest, randomRobsSubsetSatisfyingTargetCollateral, rationalAdd, rationalCeil, rationalDiv, rationalFloor, rationalFromInt, rationalMul, rationalNegate, rationalSub, rationalToFloat, rationalZero, redeemCdp, redeemRob, repsertReadonlyArr, repsertWithReadonlyArr, requestSpAccountAdjustment, requestSpAccountClosure, requestSpAccountCreation, rewardSnapshotPrecision, robAmtToSpend, robBuyOrderFilledAssets, robBuyOrderSummary, robCollateralAmtToSpend, robIAssetAmtToSpend, robSellOrderFilledAssets, runCreateScriptRefTx, runOneShotMintTx, scriptRef, serialiseActionReturnDatum, serialiseCdpDatum, serialiseCdpRedeemer, serialiseCollectorRedeemer, serialiseExecuteDatum, serialiseFeedInterestOracleRedeemer, serialiseGovDatum, serialiseGovRedeemer, serialiseIAssetDatum, serialiseIAssetRedeemer, serialiseInterestCollectionDatum, serialiseInterestCollectionRedeemer, serialiseInterestOracleDatum, serialisePollDatum, serialisePollManagerRedeemer, serialisePollShardRedeemer, serialisePriceOracleDatum, serialisePriceOracleRedeemer, serialisePythFeedParams, serialisePythFeedRedeemer, serialisePythStateDatum, serialisePythUpdatesRedeemer, serialiseRedeemCdpWithdrawalRedeemer, serialiseRobDatum, serialiseRobRedeemer, serialiseStabilityPoolDatum, serialiseStabilityPoolRedeemer, serialiseStableswapOrderDatum, serialiseStableswapOrderRedeemer, serialiseStableswapOutputDatum, serialiseStableswapPoolDatum, serialiseStakingDatum, serialiseStakingRedeemer, shuffle, signersAllOf, spAdd, spDiv, spMul, spSub, spZeroNegatives, startInterestOracle, startPriceOracleTx, submitTx, sum, summarizeActualLeverageRedemptions, toAssetClassFromLucid, toDataDerivedPythPrice, toSystemParamsAsset, treasuryCollect, treasuryFeeTx, treasuryMerge, treasuryPrepareWithdrawal, treasurySplit, updateAccount, updatePermissions, updatePoolStateWhenWithdrawalFee, updateStableswapPoolFees, updateStakingLockedAmount, vote, withdrawCdp, zeroNegatives };
