> 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-transactions/types/postconditiontype.md).

# PostConditionType

Enum representing the type of a post-condition. Used internally for serialization.

***

### Usage

```ts
import { Pc, PostConditionType } from '@stacks/transactions';

const pc = Pc.principal('STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6')
  .willSendEq(10000)
  .ustx();

pc.type; // 'stx-postcondition'
PostConditionType.STX; // 0x00, the wire value that tag serializes to
```

[**Reference Link**](https://github.com/stx-labs/stacks.js/blob/b7f0ed3f87cd4c5bfb7ab3c4bd8787c2018e3cec/packages/transactions/src/constants.ts)

***

### Definition

```ts
enum PostConditionType {
  STX = 0x00,
  Fungible = 0x01,
  NonFungible = 0x02,
  Staking = 0x03,
  PoX = 0x04,
}
```

***

### Values

| Value         | Number | Description                                                                                                                               |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `STX`         | `0x00` | STX token post-condition                                                                                                                  |
| `Fungible`    | `0x01` | Fungible token (SIP-010) post-condition                                                                                                   |
| `NonFungible` | `0x02` | Non-fungible token (SIP-009) post-condition                                                                                               |
| `Staking`     | `0x03` | Guards staking STX or modifying staked STX for a principal. Mirrors the `STX` shape: principal, a `FungibleConditionCode`, and an amount. |
| `PoX`         | `0x04` | Guards PoX state changes that do not alter locking status. Carries a principal and a `PoxConditionCode`, with no amount.                  |

See [PostCondition](/reference/stacks.js/stacks-transactions/types/postcondition.md) for the object shape behind each of these.

***

### Availability

| Member                        | Available from                                 |
| ----------------------------- | ---------------------------------------------- |
| `MaybeSent` (SIP-040)         | `@stacks/transactions` 7.4.0, Stacks epoch 3.4 |
| `Staking` and `PoX` (SIP-045) | `@stacks/transactions` 7.5.0, Stacks epoch 4.0 |

{% hint style="info" %}
Staking and PoX post-conditions are specified in [SIP-045 §3.4.3](https://github.com/stacksgov/sips/blob/main/sips/sip-045/sip-045-pox-5-bitcoin-staking.md). The `@stacks/transactions` JSDoc labels these SIP-044; the two SIPs activated together.
{% endhint %}

***

### Related condition codes

The comparator paired with a post-condition depends on its type.

`STX`, `Fungible`, and `Staking` all use `FungibleConditionCode`:

```ts
enum FungibleConditionCode {
  Equal = 0x01,
  Greater = 0x02,
  GreaterEqual = 0x03,
  Less = 0x04,
  LessEqual = 0x05,
}
```

`NonFungible` uses `NonFungibleConditionCode`:

```ts
enum NonFungibleConditionCode {
  Sends = 0x10,
  DoesNotSend = 0x11,
  MaybeSent = 0x12,
}
```

`MaybeSent` was added by [SIP-040](https://github.com/stacksgov/sips/blob/main/sips/sip-040/sip-040-post-conds.md). It always passes, and still counts as covering that NFT instance under `Deny` or `Originator` mode.

`PoX` uses `PoxConditionCode`:

```ts
enum PoxConditionCode {
  WillNotPerform = 0x30,
  MayPerform = 0x31,
  WillPerform = 0x32,
}
```


---

# 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-transactions/types/postconditiontype.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.
