plutus-contract-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Wallet.Graph

Description

Support for visualisation of a blockchain as a graph.

Synopsis

Documentation

txnFlows :: [PubKey] -> Blockchain -> [FlowLink] Source #

Compute the FlowLinks for a Blockchain given a set of known PubKeys.

graph :: [FlowLink] -> FlowGraph Source #

Construct a graph from a list of FlowLinks.

data FlowGraph Source #

The flow graph, consisting of a set of nodes (TxRefs) and edges (FlowLinks).

Instances

Instances details
Show FlowGraph Source # 
Instance details

Defined in Wallet.Graph

Generic FlowGraph Source # 
Instance details

Defined in Wallet.Graph

Associated Types

type Rep FlowGraph :: Type -> Type Source #

ToJSON FlowGraph Source # 
Instance details

Defined in Wallet.Graph

type Rep FlowGraph Source # 
Instance details

Defined in Wallet.Graph

type Rep FlowGraph = D1 ('MetaData "FlowGraph" "Wallet.Graph" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "FlowGraph" 'PrefixI 'True) (S1 ('MetaSel ('Just "flowGraphLinks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FlowLink]) :*: S1 ('MetaSel ('Just "flowGraphNodes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxRef])))

data FlowLink Source #

A link in the flow graph.

Instances

data TxRef Source #

A wrapper around the first 8 digits of a TxId.

Instances

Instances details
Eq TxRef Source # 
Instance details

Defined in Wallet.Graph

Methods

(==) :: TxRef -> TxRef -> Bool Source #

(/=) :: TxRef -> TxRef -> Bool Source #

Ord TxRef Source # 
Instance details

Defined in Wallet.Graph

Show TxRef Source # 
Instance details

Defined in Wallet.Graph

Generic TxRef Source # 
Instance details

Defined in Wallet.Graph

Associated Types

type Rep TxRef :: Type -> Type Source #

Methods

from :: TxRef -> Rep TxRef x Source #

to :: Rep TxRef x -> TxRef Source #

ToJSON TxRef Source # 
Instance details

Defined in Wallet.Graph

type Rep TxRef Source # 
Instance details

Defined in Wallet.Graph

type Rep TxRef = D1 ('MetaData "TxRef" "Wallet.Graph" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'True) (C1 ('MetaCons "TxRef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data UtxOwner Source #

The owner of an unspent transaction output.

Instances

Instances details
Eq UtxOwner Source # 
Instance details

Defined in Wallet.Graph

Ord UtxOwner Source # 
Instance details

Defined in Wallet.Graph

Show UtxOwner Source # 
Instance details

Defined in Wallet.Graph

Generic UtxOwner Source # 
Instance details

Defined in Wallet.Graph

Associated Types

type Rep UtxOwner :: Type -> Type Source #

ToJSON UtxOwner Source # 
Instance details

Defined in Wallet.Graph

type Rep UtxOwner Source # 
Instance details

Defined in Wallet.Graph

type Rep UtxOwner = D1 ('MetaData "UtxOwner" "Wallet.Graph" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "PubKeyOwner" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PubKey)) :+: (C1 ('MetaCons "ScriptOwner" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherOwner" 'PrefixI 'False) (U1 :: Type -> Type)))

data UtxoLocation Source #

The location of a transaction in a blockchain specified by two indices: the index of the containing block in the chain, and the index of the transaction within the block.

Instances

Instances details
Eq UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

Ord UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

Show UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

Generic UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

Associated Types

type Rep UtxoLocation :: Type -> Type Source #

ToJSON UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

type Rep UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

type Rep UtxoLocation = D1 ('MetaData "UtxoLocation" "Wallet.Graph" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "UtxoLocation" 'PrefixI 'True) (S1 ('MetaSel ('Just "utxoLocBlock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "utxoLocBlockIdx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))