# RegnstkAssignStaking

This is the interface for storage miner registration, it is only used if your staking account is different from your signature account. This interface and the [RegnstkSminer](/developer/cess-sdk/sdk-golang/chain_related/sminer/regnstksminer.md) interface are in the same first stage of miner registration, but you can only call one of them, there are two stages of miner registration, the second stage is to call the [RegisterPoisKey](/developer/cess-sdk/sdk-golang/chain_related/sminer/registerpoiskey.md) interface.

```golang
// RegnstkAssignStaking is registered as a storage miner, unlike RegnstkSminer,
// needs to be actively staking by the staking account, which is the first stage
// of storage miner registration.
//
//   - earnings: earnings account
//   - endpoint: communications endpoint
//   - stakingAcc: staking account
//   - tibCount: the size of declaration space, in TiB
//
// Return:
//   - string: block hash
//   - error: error message
func (c *ChainClient) RegnstkAssignStaking(earnings string, endpoint []byte, stakingAcc string, 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/regnstkassignstaking.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.
