# Sto

Represents a Security Token Offering in the Polymesh blockchain

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)‹UniqueIdentifiers, [HumanReadable](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/humanreadable.md)›

  ↳ **Sto**

## Index

### Properties

* [context](#protected-context)
* [id](#id)
* [ticker](#ticker)
* [uuid](#uuid)

### Methods

* [close](#close)
* [details](#details)
* [exists](#exists)
* [freeze](#freeze)
* [getInvestments](#getinvestments)
* [invest](#invest)
* [isEqual](#isequal)
* [modifyTimes](#modifytimes)
* [toJson](#tojson)
* [unfreeze](#unfreeze)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/context)

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#protected-context)

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Entity.ts#L48)

***

### id

• **id**: *BigNumber*

*Defined in* [*src/api/entities/Sto/index.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L61)

identifier number of the Offering

***

### ticker

• **ticker**: *string*

*Defined in* [*src/api/entities/Sto/index.ts:66*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L66)

ticker of the Security Token being offered

***

### uuid

• **uuid**: *string*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#uuid)

*Defined in* [*src/api/entities/Entity.ts:46*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Entity.ts#L46)

## Methods

### close

▸ **close**(`args`: void, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/Sto/index.ts:159*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L159)

Close the STO

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/proceduremethod.md), which means you can call `close.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                            |
| ------- | --------------------------------------------------------------------------------------------------------------- |
| `args`  | void                                                                                                            |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md) |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

***

### details

▸ **details**(): *Promise‹*[*StoDetails*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/stodetails.md)*›*

*Defined in* [*src/api/entities/Sto/index.ts:106*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L106)

Retrieve the STO's details

**`note`** can be subscribed to

**Returns:** *Promise‹*[*StoDetails*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/stodetails.md)*›*

▸ **details**(`callback`: [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#subcallback)‹[StoDetails](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/stodetails.md)›): *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#unsubcallback)*›*

*Defined in* [*src/api/entities/Sto/index.ts:107*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L107)

**Parameters:**

| Name       | Type                                                                                                                                                                                                                 |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callback` | [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#subcallback)‹[StoDetails](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/stodetails.md)› |

**Returns:** *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#unsubcallback)*›*

***

### exists

▸ **exists**(): *Promise‹boolean›*

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*exists*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#abstract-exists)

*Defined in* [*src/api/entities/Sto/index.ts:276*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L276)

Determine whether this STO exists on chain

**Returns:** *Promise‹boolean›*

***

### freeze

▸ **freeze**(`args`: void, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹*[*Sto*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/sto)*››*

*Defined in* [*src/api/entities/Sto/index.ts:169*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L169)

Freeze the STO

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/proceduremethod.md), which means you can call `freeze.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                            |
| ------- | --------------------------------------------------------------------------------------------------------------- |
| `args`  | void                                                                                                            |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md) |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹*[*Sto*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/sto)*››*

***

### getInvestments

▸ **getInvestments**(`opts`: object): *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/resultset.md)*‹*[*Investment*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/investment.md)*››*

*Defined in* [*src/api/entities/Sto/index.ts:221*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L221)

Retrieve all investments made on this STO

**`note`** supports pagination

**`note`** uses the middleware

**Parameters:**

▪`Default value` **opts**: *object*= {}

| Name     | Type                | Description |
| -------- | ------------------- | ----------- |
| `size?`  | undefined \| number | page size   |
| `start?` | undefined \| number | page offset |

**Returns:** *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/resultset.md)*‹*[*Investment*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/investment.md)*››*

***

### invest

▸ **invest**(`args`: [InvestInStoParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/investinstoparams.md), `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/Sto/index.ts:208*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L208)

Invest in the STO

**`note`** required roles:

* Purchase Portfolio Custodian
* Funding Portfolio Custodian

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/proceduremethod.md), which means you can call `invest.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                    |
| ------- | ----------------------------------------------------------------------------------------------------------------------- |
| `args`  | [InvestInStoParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/investinstoparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)         |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

***

### isEqual

▸ **isEqual**(`entity`: [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)‹unknown, unknown›): *boolean*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*isEqual*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#isequal)

*Defined in* [*src/api/entities/Entity.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Entity.ts#L61)

Determine whether this Entity is the same as another one

**Parameters:**

| Name     | Type                                                                                                              |
| -------- | ----------------------------------------------------------------------------------------------------------------- |
| `entity` | [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)‹unknown, unknown› |

**Returns:** *boolean*

***

### modifyTimes

▸ **modifyTimes**(`args`: [ModifyStoTimesParams](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#modifystotimesparams), `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/Sto/index.ts:194*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L194)

Modify the start/end time of the STO

**`throws`** if:

* Trying to modify the start time on an STO that already started
* Trying to modify anything on an STO that already ended
* Trying to change start or end time to a past date

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/proceduremethod.md), which means you can call `modifyTimes.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                                        |
| ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [ModifyStoTimesParams](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/globals#modifystotimesparams) |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)             |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹void››*

***

### toJson

▸ **toJson**(): [*HumanReadable*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/humanreadable.md)

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*toJson*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#abstract-tojson)

*Defined in* [*src/api/entities/Sto/index.ts:290*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L290)

Return the Sto's ID and Token ticker

**Returns:** [*HumanReadable*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/humanreadable.md)

***

### unfreeze

▸ **unfreeze**(`args`: void, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹*[*Sto*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/sto)*››*

*Defined in* [*src/api/entities/Sto/index.ts:179*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Sto/index.ts#L179)

Unfreeze the STO

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/proceduremethod.md), which means you can call `unfreeze.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                            |
| ------- | --------------------------------------------------------------------------------------------------------------- |
| `args`  | void                                                                                                            |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/v13/docs/interfaces/procedureopts.md) |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/transactionqueue)*‹*[*Sto*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/sto)*››*

***

### `Static` generateUuid

▸ **generateUuid**‹**Identifiers**›(`identifiers`: Identifiers): *string*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*generateUuid*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Entity.ts#L14)

Generate the Entity's UUID from its identifying properties

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name          | Type        | Description |
| ------------- | ----------- | ----------- |
| `identifiers` | Identifiers |             |

**Returns:** *string*

***

### `Static` unserialize

▸ **unserialize**‹**Identifiers**›(`serialized`: string): *Identifiers*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/classes/entity)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/v13.0.0/entity#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/108d588b/src/api/entities/Entity.ts#L23)

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| `serialized` | string | UUID to unserialize |

**Returns:** *Identifiers*
