UNPKG

@node-dlc/core

Version:
21 lines (20 loc) 647 B
import { ContractInfo, MessageType } from '@node-dlc/messaging'; export interface OptionInfo { contractSize: bigint; strikePrice: bigint; premium?: bigint; type?: OptionType; expiry: Date; } export type HasOfferCollateral = { offerCollateral: bigint; }; export type HasContractInfo = { contractInfo: ContractInfo; }; export type HasType = { type: MessageType; }; export type OptionType = 'put' | 'call'; export declare function getOptionInfoFromContractInfo(_contractInfo: ContractInfo): OptionInfo; export declare function getOptionInfoFromOffer(offer: HasOfferCollateral & HasContractInfo & HasType): OptionInfo;