# Sto

Represents a Security Token Offering in the Polymesh blockchain

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/classes/entity)‹UniqueIdentifiers, [HumanReadable](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/humanreadable)›

  ↳ **Sto**

## Index

### Properties

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

### Methods

* [close](#close)
* [details](#details)
* [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/docs-v7/classes/context)

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

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/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/bf2b7a12/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/bf2b7a12/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/docs-v7/classes/entity)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/entity#uuid)

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

## Methods

### close

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

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

Close the STO

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/proceduremethod), 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://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/procedureopts) |

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

### details

▸ **details**(): *Promise‹*[*StoDetails*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/stodetails)*›*

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

Retrieve the STO's details

**`note`** can be subscribed to

**Returns:** *Promise‹*[*StoDetails*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/stodetails)*›*

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

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

**Parameters:**

| Name       | Type                                                                                                                                                                                                                  |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callback` | [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/globals#subcallback)‹[StoDetails](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/stodetails)› |

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

### freeze

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

*Defined in* [*src/api/entities/Sto/index.ts:172*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L172)

Freeze the STO

**`note`** required role:

* Security Token Primary Issuance Agent

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/proceduremethod), 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://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/procedureopts) |

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

### getInvestments

▸ **getInvestments**(`opts`: object): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/resultset)*‹*[*Investment*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/investment)*››*

*Defined in* [*src/api/entities/Sto/index.ts:230*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L230)

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://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/resultset)*‹*[*Investment*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/investment)*››*

### invest

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

*Defined in* [*src/api/entities/Sto/index.ts:217*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L217)

Invest in the STO

**`note`** required roles:

* Purchase Portfolio Custodian
* Funding Portfolio Custodian

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/proceduremethod), 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://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/investinstoparams) |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/procedureopts)         |

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

### isEqual

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

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

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

Whether this Entity is the same as another one

**Parameters:**

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

**Returns:** *boolean*

### modifyTimes

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

*Defined in* [*src/api/entities/Sto/index.ts:203*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L203)

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`** required role:

* Security Token Primary Issuance Agent

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/proceduremethod), 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/docs-v7/globals#modifystotimesparams) |
| `opts?` | [ProcedureOpts](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/procedureopts)            |

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

### toJson

▸ **toJson**(): [*HumanReadable*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/humanreadable)

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

*Defined in* [*src/api/entities/Sto/index.ts:285*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L285)

Return the Sto's ID and Token ticker

**Returns:** [*HumanReadable*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/humanreadable)

### unfreeze

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

*Defined in* [*src/api/entities/Sto/index.ts:185*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/src/api/entities/Sto/index.ts#L185)

Unfreeze the STO

**`note`** required role:

* Security Token Primary Issuance Agent

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/proceduremethod), 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://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/interfaces/procedureopts) |

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

### `Static` generateUuid

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

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

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/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/docs-v7/classes/entity)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v7/entity#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/bf2b7a12/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*
