Evolution SDK

ProtocolVersion.ts

ProtocolVersion overview


Table of contents


conversion

fromCBORBytes

Convert CBOR bytes to ProtocolVersion (unsafe)

Signature

export declare const fromCBORBytes: {
  (options?: CBOR.CodecOptions): (bytes: Uint8Array) => ProtocolVersion
  (bytes: Uint8Array, options?: CBOR.CodecOptions): ProtocolVersion
}

Added in v2.0.0

fromCBORHex

Convert CBOR hex string to ProtocolVersion (unsafe)

Signature

export declare const fromCBORHex: {
  (options?: CBOR.CodecOptions): (hex: string) => ProtocolVersion
  (hex: string, options?: CBOR.CodecOptions): ProtocolVersion
}

Added in v2.0.0

toCBORBytes

Convert ProtocolVersion to CBOR bytes (unsafe)

Signature

export declare const toCBORBytes: {
  (options?: CBOR.CodecOptions): (version: ProtocolVersion) => Uint8Array
  (version: ProtocolVersion, options?: CBOR.CodecOptions): Uint8Array
}

Added in v2.0.0

toCBORHex

Convert ProtocolVersion to CBOR hex string (unsafe)

Signature

export declare const toCBORHex: {
  (options?: CBOR.CodecOptions): (version: ProtocolVersion) => string
  (version: ProtocolVersion, options?: CBOR.CodecOptions): string
}

Added in v2.0.0

model

ProtocolVersion (class)

ProtocolVersion class based on Conway CDDL specification

CDDL: protocol_version = [major_version : uint32, minor_version : uint32]

Signature

export declare class ProtocolVersion

Added in v2.0.0

toJSON (method)

Signature

toJSON()

toString (method)

Signature

toString(): string

[Inspectable.NodeInspectSymbol] (method)

Signature

[Inspectable.NodeInspectSymbol](): unknown

[Equal.symbol] (method)

Signature

[Equal.symbol](that: unknown): boolean

[Hash.symbol] (method)

Signature

[Hash.symbol](): number

schemas

FromCBORBytes

CBOR bytes transformation schema for ProtocolVersion.

Signature

export declare const FromCBORBytes: (
  options?: CBOR.CodecOptions
) => Schema.transform<
  Schema.transformOrFail<
    typeof Schema.Uint8ArrayFromSelf,
    Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
    never
  >,
  Schema.transform<
    Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>,
    Schema.SchemaClass<ProtocolVersion, ProtocolVersion, never>
  >
>

Added in v2.0.0

FromCBORHex

CBOR hex transformation schema for ProtocolVersion.

Signature

export declare const FromCBORHex: (
  options?: CBOR.CodecOptions
) => Schema.transform<
  Schema.Schema<Uint8Array, string, never>,
  Schema.transform<
    Schema.transformOrFail<
      typeof Schema.Uint8ArrayFromSelf,
      Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
      never
    >,
    Schema.transform<
      Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>,
      Schema.SchemaClass<ProtocolVersion, ProtocolVersion, never>
    >
  >
>

Added in v2.0.0

FromCDDL

CDDL schema for ProtocolVersion. protocol_version = [major_version : uint32, minor_version : uint32]

Signature

export declare const FromCDDL: Schema.transform<
  Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>,
  Schema.SchemaClass<ProtocolVersion, ProtocolVersion, never>
>

Added in v2.0.0

testing

arbitrary

FastCheck arbitrary for generating random ProtocolVersion instances

Signature

export declare const arbitrary: FastCheck.Arbitrary<ProtocolVersion>

Added in v2.0.0

utils

CDDLSchema

Signature

export declare const CDDLSchema: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>