cardano-transactions-1.0.0: Library utilities for constructing and signing Cardano transactions.

Safe HaskellNone
LanguageHaskell2010

Data.UTxO.Transaction.Cardano.Byron

Contents

Synopsis

Initialization

mkInit Source #

Arguments

:: Word32

A protocol magic id

-> Init Byron 

Construct a payment Init for Byron from primitive types.

examples:

>>> mkInit 764824073 == mainnetMagic
True
>>> mkInit 1097911063 == testnetMagic
True

Since: 1.0.0

mainnetMagic :: Init Byron Source #

Pre-defined Init magic for Byron MainNet.

Since: 1.0.0

testnetMagic :: Init Byron Source #

Pre-defined Init magic for Byron TestNet.

Since: 1.0.0

Constructing Primitives

mkInput Source #

Arguments

:: Word32

Input index.

-> ByteString

Input transaction id. See also: fromBase16.

-> Maybe (Input Byron) 

Construct a payment Input for Byron from primitive types.

example:

>>> mkInput 14 =<< fromBase16 "3b402651...aad1c0b7"
Just (Input ...)

Since: 1.0.0

mkOutput Source #

Arguments

:: Natural

Output value, in Lovelace (1 Ada = 1e6 Lovelace).

-> ByteString

Output Address. See also: fromBase58.

-> Maybe (Output Byron) 

Construct a payment Output for Byron from primitive types.

example:

>>> mkOutput 42 =<< fromBase58 "Ae2tdPwU...DnXy319f"
Just (Output ...)

Since: 1.0.0

mkSignKey Source #

Arguments

:: ByteString

A extended address private key and its chain code. The key must be 96 bytes long, internally made of two concatenated parts:

BYTES = PRV | CC
PRV   = 64OCTET  # a 64 bytes Ed25519 extended private key
CC    = 32OCTET  # a 32 bytes chain code

See also: fromBase16.

-> Maybe (SignKey Byron) 

Construct a SignKey for Byron from primitive types.

example:

>>> mkSignKey =<< fromBase16 "3b402651...aad1c0b7"
Just (SignKey ...)

Since: 1.0.0