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: () => TransactionWitnessSetAdded in v2.0.0
fromNativeScripts
Create a TransactionWitnessSet with only native scripts.
Signature
export declare const fromNativeScripts: (scripts: Array<NativeScripts.NativeScript>) => TransactionWitnessSetAdded in v2.0.0
fromVKeyWitnesses
Create a TransactionWitnessSet with only VKey witnesses.
Signature
export declare const fromVKeyWitnesses: (witnesses: Array<VKeyWitness>) => TransactionWitnessSetAdded in v2.0.0
encoding
toCBORBytes
Convert a TransactionWitnessSet to CBOR bytes, as in FromCBORBytes.
Signature
export declare const toCBORBytes: (
data: TransactionWitnessSet,
options?: CBOR.TxCodecOptions | CBOR.CodecOptions
) => anyAdded in v2.0.0
toCBORBytesWithFormat
Convert a TransactionWitnessSet to CBOR bytes using an explicit root format tree.
Datums and redeemers the format tree covers keep their captured format. A
datum or redeemer added to a decoded witness set is written as
toCBORBytes writes it under the default options.
A key the format tree lacks, such as the vkey witnesses key added to an unsigned transaction, goes at its ascending position when the decoded keys ascend, and after them otherwise.
Signature
export declare const toCBORBytesWithFormat: (data: TransactionWitnessSet, format: CBOR.CBORFormat) => Uint8ArrayAdded in v2.0.0
toCBORHex
Convert a TransactionWitnessSet to CBOR hex string, as in toCBORBytes.
Signature
export declare const toCBORHex: (
data: TransactionWitnessSet,
options?: CBOR.TxCodecOptions | CBOR.CodecOptions
) => stringAdded in v2.0.0
toCBORHexWithFormat
Convert a TransactionWitnessSet to CBOR hex string using an explicit root
format tree, as in toCBORBytesWithFormat.
Signature
export declare const toCBORHexWithFormat: (data: TransactionWitnessSet, format: CBOR.CBORFormat) => stringAdded 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
VKeyWitness (class)
VKey witness for Ed25519 signatures.
CDDL: vkeywitness = [ vkey, ed25519_signature ]
Signature
export declare class VKeyWitnessAdded in v2.0.0
toJSON (method)
Signature
toJSON()Added in v2.0.0
toString (method)
Signature
toString(): stringAdded in v2.0.0
[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknownAdded in v2.0.0
[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): booleanAdded in v2.0.0
[Hash.symbol] (method)
Signature
[Hash.symbol](): numberAdded in v2.0.0
parsing
fromCBORBytes
Parse a TransactionWitnessSet from CBOR bytes.
Signature
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => TransactionWitnessSetAdded in v2.0.0
fromCBORBytesWithFormat
Parse a TransactionWitnessSet from CBOR bytes and return the root format tree.
Signature
export declare const fromCBORBytesWithFormat: (bytes: Uint8Array) => CBOR.DecodedWithFormat<TransactionWitnessSet>Added in v2.0.0
fromCBORHex
Parse a TransactionWitnessSet from CBOR hex string.
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => TransactionWitnessSetAdded in v2.0.0
fromCBORHexWithFormat
Parse a TransactionWitnessSet from CBOR hex string and return the root format tree.
Signature
export declare const fromCBORHexWithFormat: (hex: string) => CBOR.DecodedWithFormat<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.declare<Map<bigint, CBOR.CBOR>, Map<bigint, CBOR.CBOR>, readonly [], never>Added in v2.0.0
FromCBORBytes
CBOR bytes transformation schema for TransactionWitnessSet. Datums and
redeemer data are written with the plutusData options, the rest with the
ledger options, the layout Redeemers.toScriptDataHash hashes. Plain
options are read as CBOR.toTxCodecOptions reads them.
Signature
export declare const FromCBORBytes: (
options?: CBOR.TxCodecOptions | CBOR.CodecOptions
) => Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.SchemaClass<TransactionWitnessSet, TransactionWitnessSet, never>,
never
>Added in v2.0.0
FromCBORHex
CBOR hex transformation schema for TransactionWitnessSet, as in
FromCBORBytes.
Signature
export declare const FromCBORHex: (
options?: CBOR.TxCodecOptions | CBOR.CodecOptions
) => Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.SchemaClass<TransactionWitnessSet, TransactionWitnessSet, never>,
never
>
>Added in v2.0.0
FromCDDL
CDDL transformation schema for TransactionWitnessSet.
Signature
export declare const FromCDDL: Schema.transformOrFail<
Schema.declare<Map<bigint, CBOR.CBOR>, Map<bigint, CBOR.CBOR>, readonly [], never>,
Schema.SchemaClass<TransactionWitnessSet, TransactionWitnessSet, never>,
never
>Added in v2.0.0
utils
PlutusScript (type alias)
Signature
export type PlutusScript = typeof PlutusScript.TypeTransactionWitnessSet (class)
Signature
export declare class TransactionWitnessSettoJSON (method)
Signature
toJSON()Added in v2.0.0
toString (method)
Signature
toString(): stringAdded in v2.0.0
[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknownAdded in v2.0.0
[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): booleanAdded in v2.0.0
[Hash.symbol] (method)
Signature
[Hash.symbol](): numberAdded in v2.0.0