SignatureType
For the complete documentation index, see llms.txt
@midnight-ntwrk/compact-runtime v0.20.0
@midnight-ntwrk/compact-runtime / 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
{
tag: "Boolean";
}
tag
readonly tag: "Boolean";
{
tag: "Field";
}
tag
readonly tag: "Field";
{
tag: "JubjubScalar";
}
tag
readonly tag: "JubjubScalar";
{
tag: "JubjubPoint";
}
tag
readonly tag: "JubjubPoint";
{
tag: "Secp256k1Base";
}
tag
readonly tag: "Secp256k1Base";
{
tag: "Secp256k1Scalar";
}
tag
readonly tag: "Secp256k1Scalar";
{
tag: "Secp256k1Point";
}
tag
readonly tag: "Secp256k1Point";
{
maxval: string;
tag: "Uint";
}
maxval
readonly maxval: string;
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
readonly length: number;
tag
readonly tag: "Bytes";
{
tag: "Opaque";
tsType: string;
}
tag
readonly tag: "Opaque";
tsType
readonly tsType: string;
{
length: number;
tag: "Vector";
type: SignatureType;
}
length
readonly length: number;
tag
readonly tag: "Vector";
type
readonly type: SignatureType;
{
tag: "Tuple";
types: readonly SignatureType[];
}
tag
readonly tag: "Tuple";
types
readonly types: readonly SignatureType[];
{
elements: readonly string[];
name: string;
tag: "Enum";
}
elements
readonly elements: readonly string[];
name
readonly name: string;
tag
readonly tag: "Enum";
{
elements: readonly NamedSignatureType[];
name: string;
tag: "Struct";
}
elements
readonly elements: readonly NamedSignatureType[];
name
readonly name: string;
tag
readonly tag: "Struct";
{
name: string;
tag: "Alias";
type: SignatureType;
}
name
readonly name: string;
tag
readonly tag: "Alias";
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
readonly circuits: InterfaceDescriptor;
name
readonly name: string;
tag
readonly tag: "Contract";