---
title: NumgenExpression type | Wartiva GraphQL API
description: NumgenExpression represents an nftables expression for generating numbers. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/numgen-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `NumgenExpression` type

NumgenExpression represents an nftables expression for generating numbers. This can be used for various purposes like creating unique identifiers, distributing load, or randomizing values.

## Fields

| Field Name | Description |
|---|---|
| `register` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | The register where the generated number will be stored. |
| `modulus` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The modulus to apply to the generated number (e.g., result = (number + offset) % modulus). |
| `type` - [`NumgenType!`](https://wartiva.com/api-docs/types/numgen-type.html) | The type of number generation to perform (random or incremental). |
| `offset` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | An offset value added to the generated number before applying the modulus. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{
  "register": "VERDICT",
  "modulus": "1073741824",
  "type": "RANDOM",
  "offset": "1073741824"
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
