> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/reference/stacks.js/stacks-bitcoin-staking/types/singlesigtxparams.md).

# SingleSigTxParams

Transaction parameters for a single-signature origin: the [TxParamsBase](/reference/stacks.js/stacks-bitcoin-staking/types/txparamsbase.md) fields plus the caller's `publicKey`. It is one side of the [TxParams](/reference/stacks.js/stacks-bitcoin-staking/types/txparams.md) union that every `build*` function accepts.

***

### Usage

```ts
import { buildStake } from '@stacks/bitcoin-staking';
import { Pc, TransactionSigner, broadcastTransaction, fetchNonce } from '@stacks/transactions';

const tx = await buildStake({
  signerManager: 'SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.my-signer-manager',
  amountUstx,
  numCycles: 6,
  startBurnHt,
  publicKey, // hex secp256k1 public key of the staker
  fee: 10_000n,
  nonce: await fetchNonce({ address: stakerAddress, network: 'mainnet' }),
  network: 'mainnet',
  postConditions: [Pc.principal(stakerAddress).willSendEq(amountUstx).ustxToLock()],
});

new TransactionSigner(tx).signOrigin(stakerPrivateKey);
const result = await broadcastTransaction({ transaction: tx, network: 'mainnet' });
```

#### Notes

* Builders treat the params as single-sig whenever `publicKey` is defined, and build a P2PKH spending condition from it.
* The builder returns an unsigned transaction. Sign it with the private key for `publicKey`, for example with [TransactionSigner](/reference/stacks.js/stacks-transactions/signing/transactionsigner.md).
* A transaction ID from [broadcastTransaction](/reference/stacks.js/stacks-transactions/network/broadcasttransaction.md) confirms submission, not success. A failed pox-5 assert is mined as `abort_by_response` with an `(err uN)` result, which [parsePox5Error](/reference/stacks.js/stacks-bitcoin-staking/errors/parsepox5error.md) reads.

[**Reference Link**](https://github.com/stx-labs/stacks.js/blob/6101c99efe5a9616ce7e16cef68e28fd10676e7e/packages/bitcoin-staking/src/types.ts#L24-L30)

***

### Definition

```ts
export interface SingleSigTxParams extends TxParamsBase {
  /** Compressed/uncompressed secp256k1 public key of the (single) caller. */
  publicKey: string;
  publicKeys?: never;
  numSignatures?: never;
}
```

***

### Properties

| Property        | Type     | Description                                                                                                                       |
| --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `publicKey`     | `string` | Hex-encoded secp256k1 public key of the origin, compressed or uncompressed                                                        |
| `publicKeys`    | `never`  | Must be absent. Multisig keys belong in [MultiSigTxParams](/reference/stacks.js/stacks-bitcoin-staking/types/multisigtxparams.md) |
| `numSignatures` | `never`  | Must be absent                                                                                                                    |

`fee`, `nonce`, `network`, `postConditions` and `postConditionMode` come from [TxParamsBase](/reference/stacks.js/stacks-bitcoin-staking/types/txparamsbase.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stacks.co/reference/stacks.js/stacks-bitcoin-staking/types/singlesigtxparams.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
