# RegnstkSminer

This is the interface for storage miner registration and is in the first phase of storage miner registration, which is two phases, and the second phase is the call to the [RegisterPoisKey](/developer/cess-sdk/sdk-golang/chain_related/sminer/registerpoiskey.md) interface.

```golang
// RegnstkSminer registers as a storage miner,
// which is the first stage of storage miner registration.
//
//   - earnings: earnings account
//   - endpoint: communications endpoint
//   - staking: number of staking, the unit is CESS
//   - tibCount: the size of declaration space, in TiB
//
// Return:
//   - string: block hash
//   - error: error message
func (c *ChainClient) RegnstkSminer(earnings string, endpoint []byte, staking uint64, tibCount uint32) (string, error)
```

For example code, please refer to [run.go](https://github.com/CESSProject/cess-miner/blob/main/cmd/console/run.go)


---

# Agent Instructions: 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:

```
GET https://doc.cess.network/developer/cess-sdk/sdk-golang/chain_related/sminer/regnstksminer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
