> For the complete documentation index, see [llms.txt](https://docs.startrail.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.startrail.io/startrail-sdk-js/startrail-api-methods/createcollection.md).

# Create Collection

## `createCollection()`

Create a new SRR to a collection

## Method parameters

| Variable                      | Type     | Description                                                                                                               |
| ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `startrailLUWContractAddress` | `string` | The address of LicensedUserWallet(LUW) contract. Sets it when you want to execute transaction by the LUW contract address |
| `name`                        | `string` | Collection name                                                                                                           |
| `symbol`                      | `string` | Collection symbol                                                                                                         |
| `salt`                        | `string` | The salt used in collection creation can also serve as an identifier for querying your collection data.                   |

### Parameters Example

```
await sdk.createCollection(
  {
    startrailLUWContractAddress: '0x572a9e6B66F56A0D2c5cBE13066A4662b9C07868',
    name: 'Taihei 2022',
    symbol: 'T22',
    salt: '0xea9369d265ddf31c12231b2aeb90662018499cb62117f30cf722bc1b76c62c46'
  }
)
```

## Returns

`Promise` will be returned which resolves with a `Response` object upon a successful confirmation. `false` will be returned when user flow is cancelled in such a case that a user closes the popup modal.

If the confirmation fails, the `Promise` will resolve with an {error} object that describes the failure.

`Promise<Response | false>`

{% hint style="warning" %}
The use of "txReceiptId" will soon be deprecated and removed.
{% endhint %}

### Response

| Variable      | Type        | Description                                             |
| ------------- | ----------- | ------------------------------------------------------- |
| `txReceiptId` | `string`    | ID to identify transaction details in Startrail-API DB. |
| `tx`          | `TxDetails` | Refer TX for all possible data                          |

### TxDetails

| Variable          | Type     | Description                                                                                             |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------- |
| `contractAddress` | `string` | The address of collection contract                                                                      |
| `salt`            | `string` | The salt used in collection creation can also serve as an identifier for querying your collection data. |

### Error

ErrorCustom `Error` objects. Refer to the [Error Catalogue](/startrail-sdk-js/errors.md) for possible data.

### Response Example

###

```
{
  txReceiptId: 0,
  tx: {
    contractAddress: '0xb135c5F2056e8D84a78094b1B02B28494845747F',
    salt: '0xea9369d265ddf31c12231b2aeb90662018499cb62117f30cf722bc1b76c62c46'
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.startrail.io/startrail-sdk-js/startrail-api-methods/createcollection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
