api.entities.Offering.Offering - PolymeshAssociation/polymesh-sdk GitHub Wiki
api/entities/Offering.Offering
Represents an Asset Offering in the Polymesh blockchain
-
Entity
<UniqueIdentifiers
,HumanReadable
>↳
Offering
- close
- details
- exists
- freeze
- getInvestments
- invest
- isEqual
- modifyTimes
- toHuman
- unfreeze
- generateUuid
- unserialize
• asset: FungibleAsset
Asset being offered
api/entities/Offering/index.ts:65
• id: BigNumber
identifier number of the Offering
api/entities/Offering/index.ts:60
• uuid: string
▸ close(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Close the Offering
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Offering/index.ts:162
▸ details(): Promise
<OfferingDetails
>
Retrieve the Offering's details
Promise
<OfferingDetails
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Offering/index.ts:111
▸ details(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <OfferingDetails > |
Promise
<UnsubCallback
>
api/entities/Offering/index.ts:112
▸ exists(): Promise
<boolean
>
Determine whether this Offering exists on chain
Promise
<boolean
>
api/entities/Offering/index.ts:273
▸ freeze(opts?
): Promise
<GenericPolymeshTransaction
<Offering
, Offering
>>
Freeze the Offering
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Offering/index.ts:172
▸ getInvestments(opts?
): Promise
<ResultSet
<Investment
>>
Retrieve all investments made on this Offering
Name | Type | Description |
---|---|---|
opts |
Object |
- |
opts.size? |
BigNumber |
page size |
opts.start? |
BigNumber |
page offset |
Promise
<ResultSet
<Investment
>>
Note
supports pagination
Note
uses the middleware V2
api/entities/Offering/index.ts:224
▸ invest(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Invest in the Offering
Name | Type |
---|---|
args |
InvestInOfferingParams |
opts? |
ProcedureOpts |
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
api/entities/Offering/index.ts:211
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ modifyTimes(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Modify the start/end time of the Offering
Name | Type |
---|---|
args |
ModifyOfferingTimesParams |
opts? |
ProcedureOpts |
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
api/entities/Offering/index.ts:197
▸ toHuman(): HumanReadable
Return the Offering's ID and Asset ticker
api/entities/Offering/index.ts:291
▸ unfreeze(opts?
): Promise
<GenericPolymeshTransaction
<Offering
, Offering
>>
Unfreeze the Offering
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Offering/index.ts:182
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers