Evolution SDK

Transaction.ts

Transaction overview


Table of contents


model

Transaction (class)

Transaction based on Conway CDDL specification

CDDL: transaction = [transaction_body, transaction_witness_set, bool, auxiliary_data / nil]

Signature

export declare class Transaction

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

utils

CDDLSchema

Conway CDDL schema for Transaction tuple structure.

CDDL: transaction = [transaction_body, transaction_witness_set, bool, auxiliary_data / nil]

Signature

export declare const CDDLSchema: Schema.Tuple<
  [
    Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
    Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
    typeof Schema.Boolean,
    Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
  ]
>

FromCBORBytes

CBOR bytes transformation schema for Transaction.

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.Tuple<
      [
        Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
        Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
        typeof Schema.Boolean,
        Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
      ]
    >,
    Schema.SchemaClass<Transaction, Transaction, never>,
    never
  >
>

FromCBORHex

CBOR hex transformation schema for Transaction.

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.Tuple<
      [
        Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
        Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
        typeof Schema.Boolean,
        Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
      ]
    >,
    Schema.SchemaClass<Transaction, Transaction, never>,
    never
  >
>

FromCDDL

Transform between CDDL tuple and Transaction class.

Signature

export declare const FromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
      Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
      typeof Schema.Boolean,
      Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>
    ]
  >,
  Schema.SchemaClass<Transaction, Transaction, never>,
  never
>

arbitrary

Signature

export declare const arbitrary: FastCheck.Arbitrary<Transaction>

fromCBORBytes

Signature

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

fromCBORHex

Signature

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

toCBORBytes

Signature

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

toCBORHex

Signature

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