Member visibility
Filter class members by access level.
Prefix
The stable route prefix, e.g. 'approve'.
Prefix extends stringShape
The accumulated fields, filled in by the chain.
Shape extends CustomIdShape = {}public bool<Name, Nullable>(
name: Name,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<Nullish<boolean, Nullable>>
>
>Read a wire string back into values.
Throws two different errors. A wire minted before the shape changed throws the stale one. A corrupt wire, or one minted by a different definition, throws the invalid one. Use setCustomIdErrors to customize the two thrown Error classes.
public decode(wire: string): DecodedParams<Shape>wireThe customId string from the interaction.
public encode(values: DecodedParams<Shape>): stringvaluesOne value per field, typed by the chain.
Add an integer field with no bounds, for a value up to 2^53.
public int<Name, Nullable>(
name: Name,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<Nullish<number, Nullable>>
>
>public oneOf<Name, Choices, Nullable>(
name: Name,
choices: Choices,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<
Nullish<Choices[number], Nullable>
>
>
>True if this wire was minted from this customId's prefix, ignoring the shape hash.
Use it to pick which definition a click belongs to before decoding. decodeFor runs this loop for you across several definitions.
public snowflake<Name, Nullable>(
name: Name,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<Nullish<Snowflake, Nullable>>
>
>public someOf<Name, Choices, Nullable>(
name: Name,
choices: Choices,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<
Nullish<Choices[number][], Nullable>
>
>
>public str<Name, Nullable>(
name: Name,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<Nullish<string, Nullable>>
>
>public uuid<Name, Nullable>(
name: Name,
opts?: FieldOptions<Nullable>
): CustomId<
Prefix,
Shape &
Record<
Name,
CustomIdField<Nullish<string, Nullable>>
>
>