TransactionOutput.ts
TransactionOutput overview
Table of contents
- arbitrary
- decoding
- encoding
- model
- schemas
- transformation
- transformer
- utils
arbitrary
arbitrary
Signature
export declare const arbitrary: FastCheck.Arbitrary<ShelleyTransactionOutput | BabbageTransactionOutput>Added in v2.0.0
decoding
fromCBORBytes
Parse TransactionOutput from CBOR bytes.
Signature
export declare const fromCBORBytes: (
bytes: Uint8Array,
options?: CBOR.CodecOptions
) => ShelleyTransactionOutput | BabbageTransactionOutputAdded in v2.0.0
fromCBORHex
Parse TransactionOutput from CBOR hex.
Signature
export declare const fromCBORHex: (
hex: string,
options?: CBOR.CodecOptions
) => ShelleyTransactionOutput | BabbageTransactionOutputAdded in v2.0.0
encoding
toCBORBytes
Convert TransactionOutput to CBOR bytes.
Signature
export declare const toCBORBytes: (data: TransactionOutput, options?: CBOR.CodecOptions) => anyAdded in v2.0.0
toCBORHex
Convert TransactionOutput to CBOR hex.
Signature
export declare const toCBORHex: (data: TransactionOutput, options?: CBOR.CodecOptions) => stringAdded in v2.0.0
model
BabbageTransactionOutput (class)
Babbage-era transaction output format
CDDL:
babbage_transaction_output =
{0 : address, 1 : value, ? 2 : datum_option, ? 3 : script_ref}Signature
export declare class BabbageTransactionOutputAdded 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](): numberShelleyTransactionOutput (class)
Shelley-era transaction output format
CDDL:
shelley_transaction_output = [address, amount : value, ? Bytes32]Signature
export declare class ShelleyTransactionOutputAdded 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](): numberschemas
TransactionOutput
Union type for transaction outputs
CDDL:
transaction_output = shelley_transaction_output / babbage_transaction_outputSignature
export declare const TransactionOutput: Schema.Union<[typeof ShelleyTransactionOutput, typeof BabbageTransactionOutput]>Added in v2.0.0
transformation
FromBabbageTransactionOutputCDDLSchema
CDDL schema for Babbage transaction outputs
Signature
export declare const FromBabbageTransactionOutputCDDLSchema: Schema.transformOrFail<
Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
Schema.SchemaClass<BabbageTransactionOutput, BabbageTransactionOutput, never>,
never
>Added in v2.0.0
FromShelleyTransactionOutputCDDLSchema
CDDL schema for Shelley transaction outputs
Signature
export declare const FromShelleyTransactionOutputCDDLSchema: Schema.transformOrFail<
Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>,
Schema.SchemaClass<ShelleyTransactionOutput, ShelleyTransactionOutput, never>,
never
>Added in v2.0.0
transformer
FromCBORBytes
CBOR bytes transformation schema for TransactionOutput.
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.Union<
[
Schema.transformOrFail<
Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>,
Schema.SchemaClass<ShelleyTransactionOutput, ShelleyTransactionOutput, never>,
never
>,
Schema.transformOrFail<
Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
Schema.SchemaClass<BabbageTransactionOutput, BabbageTransactionOutput, never>,
never
>
]
>
>Added in v2.0.0
FromCBORHex
CBOR hex transformation schema for TransactionOutput.
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.Union<
[
Schema.transformOrFail<
Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>,
Schema.SchemaClass<ShelleyTransactionOutput, ShelleyTransactionOutput, never>,
never
>,
Schema.transformOrFail<
Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
Schema.SchemaClass<BabbageTransactionOutput, BabbageTransactionOutput, never>,
never
>
]
>
>
>Added in v2.0.0
FromCDDL
CDDL schema for transaction outputs
Signature
export declare const FromCDDL: Schema.Union<
[
Schema.transformOrFail<
Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>,
Schema.SchemaClass<ShelleyTransactionOutput, ShelleyTransactionOutput, never>,
never
>,
Schema.transformOrFail<
Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
Schema.SchemaClass<BabbageTransactionOutput, BabbageTransactionOutput, never>,
never
>
]
>Added in v2.0.0
utils
CDDLSchema
Signature
export declare const CDDLSchema: Schema.Union<
[
Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>,
Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>
]
>ShelleyTransactionOutputCDDL
Signature
export declare const ShelleyTransactionOutputCDDL: Schema.Tuple<
[
typeof Schema.Uint8ArrayFromSelf,
Schema.Union<
[
typeof Schema.BigIntFromSelf,
Schema.Tuple2<
typeof Schema.BigIntFromSelf,
Schema.SchemaClass<
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
ReadonlyMap<any, ReadonlyMap<any, bigint>>,
never
>
>
]
>,
Schema.Element<typeof Schema.Uint8ArrayFromSelf, "?">
]
>TransactionOutput (type alias)
Signature
export type TransactionOutput = typeof TransactionOutput.Type