import BigNumber from 'bignumber.js'; import { Investment, OfferingDetails } from '../../../api/entities/Offering/types'; import { Context, Entity, FungibleAsset, Identity } from '../../../internal'; import { Account, EnableOffChainFundingParams, InvestInOfferingParams, ModifyOfferingTimesParams, NoArgsProcedureMethod, OffChainFundingDetails, OffChainFundingReceipt, ProcedureMethod, ResultSet, SignerKeyRingType, SubCallback, UnsubCallback } from '../../../types'; export interface UniqueIdentifiers { id: BigNumber; assetId: string; } export interface HumanReadable { id: string; assetId: string; } /** * Represents an Asset Offering in the Polymesh blockchain */ export declare class Offering extends Entity { /** * @hidden * Check if a value is of type {@link UniqueIdentifiers} */ static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers; /** * identifier number of the Offering */ id: BigNumber; /** * Asset being offered */ asset: FungibleAsset; /** * @hidden */ constructor(identifiers: UniqueIdentifiers, context: Context); /** * Retrieve the Offering's details * * @returns Promise that resolves to the Offering details */ details(): Promise; /** * Retrieve the Offering's details (with subscription support) * * @param callback - Callback function that receives offering detail updates * * @returns Promise that resolves to an unsubscribe function * * @note can be subscribed to, if connected to node using a web socket */ details(callback: SubCallback): Promise; /** * Close the Offering */ close: NoArgsProcedureMethod; /** * Freeze the Offering */ freeze: NoArgsProcedureMethod; /** * Unfreeze the Offering */ unfreeze: NoArgsProcedureMethod; /** * Enable off-chain funding for the Offering * * @throws if: * - Trying to enable off-chain funding on an Offering that does not exist * - Trying to enable off-chain funding on an Offering that has already ended * - Trying to enable off-chain funding on an Offering that is already closed */ enableOffChainFunding: ProcedureMethod; /** * Modify the start/end time of the Offering * * @throws if: * - Trying to modify the start time on an Offering that already started * - Trying to modify anything on an Offering that already ended * - Trying to change start or end time to a past date */ modifyTimes: ProcedureMethod; /** * Invest in the Offering * * @note required roles: * - Purchase Portfolio Custodian * - Funding Portfolio Custodian */ invest: ProcedureMethod; /** * Retrieve all investments made on this Offering * * @param opts.size - page size * @param opts.start - page offset * * @note supports pagination * @note uses the middleware V2 */ getInvestments(opts?: { size?: BigNumber; start?: BigNumber; }): Promise>; /** * Retrieve off chain funding details */ offChainFundingDetails(): Promise; /** * Determine whether this Offering exists on chain */ exists(): Promise; /** * Return the Offering's ID and Asset ticker */ toHuman(): HumanReadable; /** * Generate an off-chain funding receipt for this offering * * @param args.uid - unique receipt ID (UID) for this off-chain funding transaction * @param args.offChainTicker - ticker symbol of the off-chain asset being transferred (e.g., 'BTC', 'ETH') * @param args.amount - equivalent investment amount in the raising asset (calculated from the off-chain asset value based on STO tier pricing) * @param args.sender - Identity or DID of the investor providing the off-chain funding * @param args.metadata - (optional) additional metadata to be associated with the receipt * @param args.signer - (optional) authorized venue receipt signer to generate the cryptographic signature. Defaults to signing Account associated with the SDK * @param args.signerKeyRingType - (optional) keyring type for signature generation. Defaults to 'Sr25519'. Supported types: SR25519, ED25519, ECDSA * @param args.expiresAt - timestamp at which the receipt expires and can no longer be used to invest * * @note The generated receipt contains SCALE-encoded data wrapped with `` tags, including: * - Chain genesis hash * - Receipt UID * - Receipt label * - Receipt expiry * - Fundraiser ID * - Sender's DID (investor) * - Receiver's DID (raising portfolio owner) * - Off-chain asset ticker * - Equivalent investment amount in raising asset (calculated from STO tier pricing) * * @note The amount must represent the exact investment cost as calculated by the STO's blended pricing mechanism */ generateOffChainFundingReceipt(args: { uid: BigNumber; offChainTicker: string; amount: BigNumber; sender: Identity | string; metadata?: string; signer?: string | Account; signerKeyRingType?: SignerKeyRingType; expiresAt: Date; }): Promise; } //# sourceMappingURL=index.d.ts.map