Skip to content

api.entities.Offering.Offering

prashantasdeveloper edited this page Oct 31, 2024 · 65 revisions

Class: Offering

api/entities/Offering.Offering

Represents an Asset Offering in the Polymesh blockchain

Hierarchy

Table of contents

Properties

Methods

Properties

asset

asset: FungibleAsset

Asset being offered

Defined in

api/entities/Offering/index.ts:78


id

id: BigNumber

identifier number of the Offering

Defined in

api/entities/Offering/index.ts:73


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

close

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

Close the Offering

Parameters

Name Type
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

Defined in

api/entities/Offering/index.ts:178


details

details(): Promise<OfferingDetails>

Retrieve the Offering's details

Returns

Promise<OfferingDetails>

Note

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

Defined in

api/entities/Offering/index.ts:124

details(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<OfferingDetails>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Offering/index.ts:125


exists

exists(): Promise<boolean>

Determine whether this Offering exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/Offering/index.ts:291


freeze

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

Freeze the Offering

Parameters

Name Type
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

Defined in

api/entities/Offering/index.ts:188


getInvestments

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

Retrieve all investments made on this Offering

Parameters

Name Type Description
opts Object -
opts.size? BigNumber page size
opts.start? BigNumber page offset

Returns

Promise<ResultSet<Investment>>

Note

supports pagination

Note

uses the middleware V2

Defined in

api/entities/Offering/index.ts:240


invest

invest(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Invest in the Offering

Parameters

Name Type
args InvestInOfferingParams
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

Defined in

api/entities/Offering/index.ts:227


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

Name Type
entity Entity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual

Defined in

api/entities/Entity.ts:61


modifyTimes

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

Modify the start/end time of the Offering

Parameters

Name Type
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

Defined in

api/entities/Offering/index.ts:213


toHuman

toHuman(): HumanReadable

Return the Offering's ID and Asset ticker

Returns

HumanReadable

Overrides

Entity.toHuman

Defined in

api/entities/Offering/index.ts:307


unfreeze

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

Unfreeze the Offering

Parameters

Name Type
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

Defined in

api/entities/Offering/index.ts:198


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name
Identifiers

Parameters

Name Type
identifiers Identifiers

Returns

string

Inherited from

Entity.generateUuid

Defined in

api/entities/Entity.ts:14


unserialize

Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name
Identifiers

Parameters

Name Type Description
serialized string UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23

Clone this wiki locally