> 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/txparamsbase.md).

# TxParamsBase

Transaction fields shared by every `build*` function in this package: fee, nonce, network, and optional post conditions. You pass them through [SingleSigTxParams](/reference/stacks.js/stacks-bitcoin-staking/types/singlesigtxparams.md) or [MultiSigTxParams](/reference/stacks.js/stacks-bitcoin-staking/types/multisigtxparams.md), which both extend `TxParamsBase`.

***

### Usage

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

const tx = await buildStake({
  signerManager: 'SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.my-signer-manager',
  amountUstx,
  numCycles: 6,
  startBurnHt,
  publicKey,
  // TxParamsBase fields
  fee: 10_000n, // micro-STX
  nonce: await fetchNonce({ address: stakerAddress, network: 'mainnet' }),
  network: 'mainnet',
  postConditions: [Pc.principal(stakerAddress).willSendEq(amountUstx).ustxToLock()],
});
```

#### Notes

* Builders attach no post conditions of their own and default to `'deny'` mode. A call that moves an asset, locks STX, or performs a PoX action (`unstake`, `unstake-sbtc`, `update-bond-registration`, `announce-l1-early-exit`) aborts with `abort_by_post_condition` unless you pass matching `postConditions` or set `postConditionMode: 'allow'`.
* Builders neither estimate `fee` nor fetch `nonce`. Read the nonce with [fetchNonce](/reference/stacks.js/stacks-transactions/network/fetchnonce.md).
* `network` also sets the contract address: builders call `pox-5` on the network's `bootAddress`, `SP000000000000000000002Q6VF78` on mainnet and `ST000000000000000000002AMW42H` on testnet. An unknown network name throws `Unknown network name: <name>`.

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

***

### Definition

```ts
export interface TxParamsBase {
  fee: IntegerType;
  nonce: IntegerType;
  network: StacksNetworkName | StacksNetwork;
  /**
   * Post-conditions to attach. Required for calls that move assets from the
   * caller under deny mode, e.g. `register-for-bond` with an sBTC lockup.
   */
  postConditions?: PostCondition[];
  /** Post-condition mode. Defaults to the wire default (`deny`). */
  postConditionMode?: PostConditionModeName;
}
```

***

### Properties

| Property            | Type                                 | Description                                                                                                                                               |
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fee`               | `IntegerType`                        | Transaction fee in micro-STX                                                                                                                              |
| `nonce`             | `IntegerType`                        | Nonce of the origin account                                                                                                                               |
| `network`           | `StacksNetworkName \| StacksNetwork` | A name such as `'mainnet'` or `'testnet'`, or a [StacksNetwork](/reference/stacks.js/stacks-network/network/stacksnetwork.md) object                      |
| `postConditions`    | `PostCondition[]` (optional)         | [Post conditions](/reference/stacks.js/stacks-transactions/types/postcondition.md) to attach to the transaction                                           |
| `postConditionMode` | `PostConditionModeName` (optional)   | `'allow'`, `'deny'` or `'originator'`. See [PostConditionMode](/reference/stacks.js/stacks-transactions/types/postconditionmode.md). Defaults to `'deny'` |


---

# 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/txparamsbase.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.
