Evolution SDK

TransactionWitnessSet.ts

TransactionWitnessSet overview


Table of contents


arbitrary

arbitrary

FastCheck arbitrary for generating random TransactionWitnessSet instances.

Signature

export declare const arbitrary: FastCheck.Arbitrary<TransactionWitnessSet>

Added in v2.0.0

constructors

empty

Create an empty TransactionWitnessSet.

Signature

export declare const empty: () => TransactionWitnessSet

Added in v2.0.0

fromNativeScripts

Create a TransactionWitnessSet with only native scripts.

Signature

export declare const fromNativeScripts: (scripts: Array<NativeScripts.NativeScript>) => TransactionWitnessSet

Added in v2.0.0

fromVKeyWitnesses

Create a TransactionWitnessSet with only VKey witnesses.

Signature

export declare const fromVKeyWitnesses: (witnesses: Array<VKeyWitness>) => TransactionWitnessSet

Added in v2.0.0

encoding

toCBORBytes

Convert a TransactionWitnessSet to CBOR bytes.

Signature

export declare const toCBORBytes: (data: TransactionWitnessSet, options?: CBOR.CodecOptions) => any

Added in v2.0.0

toCBORHex

Convert a TransactionWitnessSet to CBOR hex string.

Signature

export declare const toCBORHex: (data: TransactionWitnessSet, options?: CBOR.CodecOptions) => string

Added in v2.0.0

model

PlutusScript

Plutus script reference with version tag.

CDDL: plutus_script =
  [ 0, plutus_v1_script ]
/ [ 1, plutus_v2_script ]
/ [ 2, plutus_v3_script ]

Signature

export declare const PlutusScript: Schema.Union<
  [typeof PlutusV1.PlutusV1, typeof PlutusV2.PlutusV2, typeof PlutusV3.PlutusV3]
>

Added in v2.0.0

TransactionWitnessSet (class)

TransactionWitnessSet based on Conway CDDL specification.

CDDL: transaction_witness_set = {
  ? 0 : nonempty_set<vkeywitness>
  ? 1 : nonempty_set<native_script>
  ? 2 : nonempty_set<bootstrap_witness>
  ? 3 : nonempty_set<plutus_v1_script>
  ? 4 : nonempty_set<plutus_data>
  ? 5 : redeemers
  ? 6 : nonempty_set<plutus_v2_script>
  ? 7 : nonempty_set<plutus_v3_script>
}

nonempty_set<a0> = #6.258([+ a0])/ [+ a0]

Signature

export declare class TransactionWitnessSet

Added in v2.0.0

toJSON (method)

Signature

toJSON()

Added in v2.0.0

toString (method)

Signature

toString(): string

Added in v2.0.0

[Inspectable.NodeInspectSymbol] (method)

Signature

[Inspectable.NodeInspectSymbol](): unknown

Added in v2.0.0

[Equal.symbol] (method)

Signature

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

Added in v2.0.0

[Hash.symbol] (method)

Signature

[Hash.symbol](): number

Added in v2.0.0

VKeyWitness (class)

VKey witness for Ed25519 signatures.

CDDL: vkeywitness = [ vkey, ed25519_signature ]

Signature

export declare class VKeyWitness

Added in v2.0.0

toJSON (method)

Signature

toJSON()

Added in v2.0.0

toString (method)

Signature

toString(): string

Added in v2.0.0

[Inspectable.NodeInspectSymbol] (method)

Signature

[Inspectable.NodeInspectSymbol](): unknown

Added in v2.0.0

[Equal.symbol] (method)

Signature

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

Added in v2.0.0

[Hash.symbol] (method)

Signature

[Hash.symbol](): number

Added in v2.0.0

parsing

fromCBORBytes

Parse a TransactionWitnessSet from CBOR bytes.

Signature

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

Added in v2.0.0

fromCBORHex

Parse a TransactionWitnessSet from CBOR hex string.

Signature

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

Added in v2.0.0

schemas

CDDLSchema

CDDL schema for TransactionWitnessSet encoded as a CBOR map with integer keys. Keys and values follow Conway-era CDDL:

  0: nonempty_set<vkeywitness>
  1: nonempty_set<native_script>
  2: nonempty_set<bootstrap_witness>
  3: nonempty_set<plutus_v1_script>
  4: nonempty_set<plutus_data>
  5: redeemers (array of [tag, index, data, ex_units])
  6: nonempty_set<plutus_v2_script>
  7: nonempty_set<plutus_v3_script>

nonempty_set<a0> = #6.258([+ a0]) / [+ a0]

Signature

export declare const CDDLSchema: Schema.MapFromSelf<
  typeof Schema.BigIntFromSelf,
  Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
>

Added in v2.0.0

FromCDDL

CDDL transformation schema for TransactionWitnessSet.

Signature

export declare const FromCDDL: Schema.transformOrFail<
  Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
  Schema.SchemaClass<TransactionWitnessSet, TransactionWitnessSet, never>,
  never
>

Added in v2.0.0

utils

FromCBORBytes

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.transformOrFail<
    Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
    Schema.SchemaClass<TransactionWitnessSet, TransactionWitnessSet, never>,
    never
  >
>

FromCBORHex

Signature

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

PlutusScript (type alias)

Signature

export type PlutusScript = typeof PlutusScript.Type