# SignatureType

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight-ntwrk/compact-runtime v0.21.0**](https://docs.midnight.network/api-reference/compact-runtime.md)

***

[@midnight-ntwrk/compact-runtime](https://docs.midnight.network/api-reference/compact-runtime/globals.md) / SignatureType

# Type Alias: SignatureType

```
type SignatureType = 

  | {

  tag: "Boolean";

}

  | {

  tag: "Field";

}

  | {

  tag: "JubjubScalar";

}

  | {

  tag: "JubjubPoint";

}

  | {

  tag: "Secp256k1Base";

}

  | {

  tag: "Secp256k1Scalar";

}

  | {

  tag: "Secp256k1Point";

}

  | {

  maxval: string;

  tag: "Uint";

}

  | {

  length: number;

  tag: "Bytes";

}

  | {

  tag: "Opaque";

  tsType: string;

}

  | {

  length: number;

  tag: "Vector";

  type: SignatureType;

}

  | {

  tag: "Tuple";

  types: readonly SignatureType[];

}

  | {

  elements: readonly string[];

  name: string;

  tag: "Enum";

}

  | {

  elements: readonly NamedSignatureType[];

  name: string;

  tag: "Struct";

}

  | {

  name: string;

  tag: "Alias";

  type: SignatureType;

}

  | {

  circuits: InterfaceDescriptor;

  name: string;

  tag: "Contract";

};
```

A Compact type as it appears in a circuit signature: a static description, compared structurally. `CompactType` in compact-types.ts is the codec for a *value* of one of these.

## Type Declaration[​](#type-declaration "Direct link to Type Declaration")

```
{

  tag: "Boolean";

}
```

### tag[​](#tag "Direct link to tag")

```
readonly tag: "Boolean";
```

```
{

  tag: "Field";

}
```

### tag[​](#tag-1 "Direct link to tag")

```
readonly tag: "Field";
```

```
{

  tag: "JubjubScalar";

}
```

### tag[​](#tag-2 "Direct link to tag")

```
readonly tag: "JubjubScalar";
```

```
{

  tag: "JubjubPoint";

}
```

### tag[​](#tag-3 "Direct link to tag")

```
readonly tag: "JubjubPoint";
```

```
{

  tag: "Secp256k1Base";

}
```

### tag[​](#tag-4 "Direct link to tag")

```
readonly tag: "Secp256k1Base";
```

```
{

  tag: "Secp256k1Scalar";

}
```

### tag[​](#tag-5 "Direct link to tag")

```
readonly tag: "Secp256k1Scalar";
```

```
{

  tag: "Secp256k1Point";

}
```

### tag[​](#tag-6 "Direct link to tag")

```
readonly tag: "Secp256k1Point";
```

```
{

  maxval: string;

  tag: "Uint";

}
```

### maxval[​](#maxval "Direct link to maxval")

```
readonly maxval: string;
```

### tag[​](#tag-7 "Direct link to tag")

```
readonly tag: "Uint";
```

`maxval` is the maximum representable value as a decimal string, not a width. `Uint<128>` carries 2\*\*128-1, which is not exactly representable as a JavaScript number.

```
{

  length: number;

  tag: "Bytes";

}
```

### length[​](#length "Direct link to length")

```
readonly length: number;
```

### tag[​](#tag-8 "Direct link to tag")

```
readonly tag: "Bytes";
```

```
{

  tag: "Opaque";

  tsType: string;

}
```

### tag[​](#tag-9 "Direct link to tag")

```
readonly tag: "Opaque";
```

### tsType[​](#tstype "Direct link to tsType")

```
readonly tsType: string;
```

```
{

  length: number;

  tag: "Vector";

  type: SignatureType;

}
```

### length[​](#length-1 "Direct link to length")

```
readonly length: number;
```

### tag[​](#tag-10 "Direct link to tag")

```
readonly tag: "Vector";
```

### type[​](#type "Direct link to type")

```
readonly type: SignatureType;
```

```
{

  tag: "Tuple";

  types: readonly SignatureType[];

}
```

### tag[​](#tag-11 "Direct link to tag")

```
readonly tag: "Tuple";
```

### types[​](#types "Direct link to types")

```
readonly types: readonly SignatureType[];
```

```
{

  elements: readonly string[];

  name: string;

  tag: "Enum";

}
```

### elements[​](#elements "Direct link to elements")

```
readonly elements: readonly string[];
```

### name[​](#name "Direct link to name")

```
readonly name: string;
```

### tag[​](#tag-12 "Direct link to tag")

```
readonly tag: "Enum";
```

```
{

  elements: readonly NamedSignatureType[];

  name: string;

  tag: "Struct";

}
```

### elements[​](#elements-1 "Direct link to elements")

```
readonly elements: readonly NamedSignatureType[];
```

### name[​](#name-1 "Direct link to name")

```
readonly name: string;
```

### tag[​](#tag-13 "Direct link to tag")

```
readonly tag: "Struct";
```

```
{

  name: string;

  tag: "Alias";

  type: SignatureType;

}
```

### name[​](#name-2 "Direct link to name")

```
readonly name: string;
```

### tag[​](#tag-14 "Direct link to tag")

```
readonly tag: "Alias";
```

### type[​](#type-1 "Direct link to type")

```
readonly type: SignatureType;
```

Only a `new type` declaration produces this; a transparent alias is erased at emission, since it is not a distinct type.

```
{

  circuits: InterfaceDescriptor;

  name: string;

  tag: "Contract";

}
```

### circuits[​](#circuits "Direct link to circuits")

```
readonly circuits: InterfaceDescriptor;
```

### name[​](#name-3 "Direct link to name")

```
readonly name: string;
```

### tag[​](#tag-15 "Direct link to tag")

```
readonly tag: "Contract";
```
