api.entities.Offering - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/Offering
Defined in: api/entities/Offering/index.ts:67
Represents an Asset Offering in the Polymesh blockchain
asset:
FungibleAsset
Defined in: api/entities/Offering/index.ts:86
Asset being offered
id:
BigNumber
Defined in: api/entities/Offering/index.ts:81
identifier number of the Offering
uuid:
string
Defined in: api/entities/Entity.ts:46
close(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Offering/index.ts:202
Close the Offering
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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():
Promise<OfferingDetails>
Defined in: api/entities/Offering/index.ts:141
Retrieve the Offering's details
Promise<OfferingDetails>
Promise that resolves to the Offering details
details(
callback):Promise<UnsubCallback>
Defined in: api/entities/Offering/index.ts:152
Retrieve the Offering's details (with subscription support)
| Parameter | Type | Description |
|---|---|---|
callback |
SubCallback<OfferingDetails> |
Callback function that receives offering detail updates |
Promise<UnsubCallback>
Promise that resolves to an unsubscribe function
can be subscribed to, if connected to node using a web socket
enableOffChainFunding(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Offering/index.ts:222
Enable off-chain funding for the Offering
| Parameter | Type |
|---|---|
args |
EnableOffChainFundingParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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
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():
Promise<boolean>
Defined in: api/entities/Offering/index.ts:330
Determine whether this Offering exists on chain
Promise<boolean>
freeze(
opts?):Promise<GenericPolymeshTransaction<Offering,Offering>>
Defined in: api/entities/Offering/index.ts:207
Freeze the Offering
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<Offering, Offering>>
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(
args):Promise<OffChainFundingReceipt>
Defined in: api/entities/Offering/index.ts:380
Generate an off-chain funding receipt for this offering
| Parameter | Type | Description |
|---|---|---|
args |
{ amount: BigNumber; expiresAt: Date; 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.expiresAt |
Date |
timestamp at which the receipt expires and can no longer be used to invest |
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 |
Promise<OffChainFundingReceipt>
The generated receipt contains SCALE-encoded data wrapped with <Bytes> 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)
The amount must represent the exact investment cost as calculated by the STO's blended pricing mechanism
getInvestments(
opts?):Promise<ResultSet<Investment>>
Defined in: api/entities/Offering/index.ts:252
Retrieve all investments made on this Offering
| Parameter | Type | Description |
|---|---|---|
opts |
{ size?: BigNumber; start?: BigNumber; } |
- |
opts.size? |
BigNumber |
page size |
opts.start? |
BigNumber |
page offset |
Promise<ResultSet<Investment>>
supports pagination
uses the middleware V2
invest(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Offering/index.ts:241
Invest in the Offering
| Parameter | Type |
|---|---|
args |
object & { fundingPortfolio: PortfolioLike; } | { offChainFundingReceipt: OffChainFundingReceipt; offChainTicker: string; } |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
required roles:
- Purchase Portfolio Custodian
- Funding Portfolio Custodian
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(
entity):boolean
Defined in: api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
| Parameter | Type |
|---|---|
entity |
Entity<unknown, unknown> |
boolean
modifyTimes(
args,opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/Offering/index.ts:232
Modify the start/end time of the Offering
| Parameter | Type |
|---|---|
args |
ModifyOfferingTimesParams |
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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
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():
Promise<OffChainFundingDetails>
Defined in: api/entities/Offering/index.ts:303
Retrieve off chain funding details
Promise<OffChainFundingDetails>
toHuman():
HumanReadable
Defined in: api/entities/Offering/index.ts:346
Return the Offering's ID and Asset ticker
unfreeze(
opts?):Promise<GenericPolymeshTransaction<Offering,Offering>>
Defined in: api/entities/Offering/index.ts:212
Unfreeze the Offering
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<Offering, Offering>>
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
staticgenerateUuid<Identifiers>(identifiers):string
Defined in: api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
identifiers |
Identifiers |
- |
string
staticunserialize<Identifiers>(serialized):Identifiers
Defined in: api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Defined in: api/entities/Offering/index.ts:59
assetId:
string
Defined in: api/entities/Offering/index.ts:61
id:
string
Defined in: api/entities/Offering/index.ts:60
Defined in: api/entities/Offering/index.ts:54
assetId:
string
Defined in: api/entities/Offering/index.ts:56
id:
BigNumber
Defined in: api/entities/Offering/index.ts:55