Skip to main content
Version: 30.0.x

Class: Offering

Defined in: src/api/entities/Offering/index.ts:65

Represents an Asset Offering in the Polymesh blockchain

Extends​

Properties​

asset​

asset: FungibleAsset

Defined in: src/api/entities/Offering/index.ts:84

Asset being offered


id​

id: BigNumber

Defined in: src/api/entities/Offering/index.ts:79

identifier number of the Offering


uuid​

uuid: string

Defined in: src/api/entities/Entity.ts:46

Inherited from​

Entity.uuid

Methods​

close()​

close(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Offering/index.ts:200

Close the Offering

Parameters​

ParameterType

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

Note​

this method is of type NoArgsProcedureMethod, which means you can call close.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


details()​

Call Signature​

details(): Promise<OfferingDetails>

Defined in: src/api/entities/Offering/index.ts:139

Retrieve the Offering's details

Returns​

Promise<OfferingDetails>

Promise that resolves to the Offering details

Call Signature​

details(callback: SubCallback<OfferingDetails>): Promise<UnsubCallback>

Defined in: src/api/entities/Offering/index.ts:150

Retrieve the Offering's details (with subscription support)

Parameters​
ParameterTypeDescription

callback

SubCallback<OfferingDetails>

Callback function that receives offering detail updates

Returns​

Promise<UnsubCallback>

Promise that resolves to an unsubscribe function

Note​

can be subscribed to, if connected to node using a web socket


enableOffChainFunding()​

enableOffChainFunding(args: EnableOffChainFundingParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Offering/index.ts:220

Enable off-chain funding for the Offering

Parameters​

ParameterType

args

EnableOffChainFundingParams

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

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

Note​

this method is of type ProcedureMethod, which means you can call enableOffChainFunding.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


exists()​

exists(): Promise<boolean>

Defined in: src/api/entities/Offering/index.ts:329

Determine whether this Offering exists on chain

Returns​

Promise<boolean>

Overrides​

Entity.exists


freeze()​

freeze(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<Offering, Offering>>

Defined in: src/api/entities/Offering/index.ts:205

Freeze the Offering

Parameters​

ParameterType

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<Offering, Offering>>

Note​

this method is of type NoArgsProcedureMethod, which means you can call freeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


generateOffChainFundingReceipt()​

generateOffChainFundingReceipt(args: object): Promise<OffChainFundingReceipt>

Defined in: src/api/entities/Offering/index.ts:375

Generate an off-chain funding receipt for this offering

Parameters​

ParameterTypeDescription

args

{ amount: BigNumber; metadata?: string; offChainTicker: string; sender: string | Identity; signer?: string | Account; signerKeyRingType?: SignerKeyRingType; uid: BigNumber; }

‐

args.amount

BigNumber

equivalent investment amount in the raising asset (calculated from the off-chain asset value based on STO tier pricing)

args.metadata?

string

(optional) additional metadata to be associated with the receipt

args.offChainTicker

string

ticker symbol of the off-chain asset being transferred (e.g., 'BTC', 'ETH')

args.sender

string | Identity

Identity or DID of the investor providing the off-chain funding

args.signer?

string | Account

(optional) authorized venue receipt signer to generate the cryptographic signature. Defaults to signing Account associated with the SDK

args.signerKeyRingType?

SignerKeyRingType

(optional) keyring type for signature generation. Defaults to 'Sr25519'. Supported types: SR25519, ED25519, ECDSA

args.uid

BigNumber

unique receipt ID (UID) for this off-chain funding transaction

Returns​

Promise<OffChainFundingReceipt>

Note​

The generated receipt contains SCALE-encoded data wrapped with <Bytes> tags, including:

  • Receipt UID
  • 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


getInvestments()​

getInvestments(opts?: object): Promise<ResultSet<Investment>>

Defined in: src/api/entities/Offering/index.ts:250

Retrieve all investments made on this Offering

Parameters​

ParameterTypeDescription

opts

{ size?: BigNumber; start?: BigNumber; }

‐

opts.size?

BigNumber

page size

opts.start?

BigNumber

page offset

Returns​

Promise<ResultSet<Investment>>

Note​

supports pagination

Note​

uses the middleware V2


invest()​

invest(args: object & { fundingPortfolio: PortfolioLike; } | { offChainFundingReceipt: OffChainFundingReceipt; offChainTicker: string; }, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Offering/index.ts:239

Invest in the Offering

Parameters​

ParameterType

args

object & { fundingPortfolio: PortfolioLike; } | { offChainFundingReceipt: OffChainFundingReceipt; offChainTicker: string; }

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

Note​

required roles:

  • Purchase Portfolio Custodian
  • Funding Portfolio Custodian

Note​

this method is of type ProcedureMethod, which means you can call invest.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


isEqual()​

isEqual(entity: Entity<unknown, unknown>): boolean

Defined in: src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters​

ParameterType

entity

Entity<unknown, unknown>

Returns​

boolean

Inherited from​

Entity.isEqual


modifyTimes()​

modifyTimes(args: ModifyOfferingTimesParams, opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Offering/index.ts:230

Modify the start/end time of the Offering

Parameters​

ParameterType

args

ModifyOfferingTimesParams

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<void, void>>

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

Note​

this method is of type ProcedureMethod, which means you can call modifyTimes.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


offChainFundingDetails()​

offChainFundingDetails(): Promise<OffChainFundingDetails>

Defined in: src/api/entities/Offering/index.ts:302

Retrieve off chain funding details

Returns​

Promise<OffChainFundingDetails>


toHuman()​

toHuman(): HumanReadable

Defined in: src/api/entities/Offering/index.ts:345

Return the Offering's ID and Asset ticker

Returns​

HumanReadable

Overrides​

Entity.toHuman


unfreeze()​

unfreeze(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<Offering, Offering>>

Defined in: src/api/entities/Offering/index.ts:210

Unfreeze the Offering

Parameters​

ParameterType

opts?

ProcedureOpts

Returns​

Promise<GenericPolymeshTransaction<Offering, Offering>>

Note​

this method is of type NoArgsProcedureMethod, which means you can call unfreeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


generateUuid()​

static generateUuid<Identifiers>(identifiers: Identifiers): string

Defined in: src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type Parameters​

Type Parameter

Identifiers

Parameters​

ParameterTypeDescription

identifiers

Identifiers

‐

Returns​

string

Inherited from​

Entity.generateUuid


unserialize()​

static unserialize<Identifiers>(serialized: string): Identifiers

Defined in: src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type Parameters​

Type Parameter

Identifiers

Parameters​

ParameterTypeDescription

serialized

string

UUID to unserialize

Returns​

Identifiers

Inherited from​

Entity.unserialize