Evolution SDK

NonZeroInt64.ts

NonZeroInt64 overview


Table of contents


arbitrary

arbitrary

FastCheck arbitrary for generating random NonZeroInt64 instances.

Signature

export declare const arbitrary: FastCheck.Arbitrary<bigint>

Added in v2.0.0

constants

NEG_INT64_MIN

Constants for NonZeroInt64 validation. negInt64 = -9223372036854775808 .. -1 posInt64 = 1 .. 9223372036854775807 nonZeroInt64 = negInt64/ posInt64

Signature

export declare const NEG_INT64_MIN: -9223372036854775808n

Added in v2.0.0

model

NonZeroInt64 (type alias)

Type alias for NonZeroInt64 representing non-zero signed 64-bit integers. Used in minting operations where zero amounts are not allowed.

Signature

export type NonZeroInt64 = typeof NonZeroInt64.Type

Added in v2.0.0

ordering

compare

Compare two NonZeroInt64 values.

Signature

export declare const compare: (a: NonZeroInt64, b: NonZeroInt64) => -1 | 0 | 1

Added in v2.0.0

predicates

is

Check if a value is a valid NonZeroInt64.

Signature

export declare const is: (u: unknown, overrideOptions?: ParseOptions | number) => u is bigint

Added in v2.0.0

isNegative

Check if a NonZeroInt64 is negative.

Signature

export declare const isNegative: (value: NonZeroInt64) => boolean

Added in v2.0.0

isPositive

Check if a NonZeroInt64 is positive.

Signature

export declare const isPositive: (value: NonZeroInt64) => boolean

Added in v2.0.0

schemas

NegInt64Schema

Schema for validating negative 64-bit integers (-9223372036854775808 to -1).

Signature

export declare const NegInt64Schema: Schema.refine<bigint, typeof Schema.BigInt>

Added in v2.0.0

NonZeroInt64

Schema for NonZeroInt64 representing non-zero 64-bit signed integers. nonZeroInt64 = negInt64/ posInt64

Signature

export declare const NonZeroInt64: Schema.Union<
  [Schema.refine<bigint, typeof Schema.BigInt>, Schema.refine<bigint, typeof Schema.BigInt>]
>

Added in v2.0.0

PosInt64Schema

Schema for validating positive 64-bit integers (1 to 9223372036854775807).

Signature

export declare const PosInt64Schema: Schema.refine<bigint, typeof Schema.BigInt>

Added in v2.0.0

transformation

abs

Get the absolute value of a NonZeroInt64.

Signature

export declare const abs: (value: NonZeroInt64) => NonZeroInt64

Added in v2.0.0

negate

Negate a NonZeroInt64.

Signature

export declare const negate: (value: NonZeroInt64) => NonZeroInt64

Added in v2.0.0

utils

NEG_INT64_MAX

Signature

export declare const NEG_INT64_MAX: -1n

POS_INT64_MAX

Signature

export declare const POS_INT64_MAX: 9223372036854775807n

POS_INT64_MIN

Signature

export declare const POS_INT64_MIN: 1n