plutus-contract-1.2.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

Methods

toJSON :: FlowGraph -> Value

toEncoding :: FlowGraph -> Encoding

toJSONList :: [FlowGraph] -> Value

toEncodingList :: [FlowGraph] -> Encoding

type Rep FlowGraph Source # 
Instance details

Defined in Wallet.Graph

type Rep FlowGraph = D1 ('MetaData "FlowGraph" "Wallet.Graph" "plutus-contract-1.2.0.0-FH8LC9wh7UV4Nmv68NHXrC" '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

Methods

toJSON :: TxRef -> Value

toEncoding :: TxRef -> Encoding

toJSONList :: [TxRef] -> Value

toEncodingList :: [TxRef] -> Encoding

type Rep TxRef Source # 
Instance details

Defined in Wallet.Graph

type Rep TxRef = D1 ('MetaData "TxRef" "Wallet.Graph" "plutus-contract-1.2.0.0-FH8LC9wh7UV4Nmv68NHXrC" '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

Methods

toJSON :: UtxOwner -> Value

toEncoding :: UtxOwner -> Encoding

toJSONList :: [UtxOwner] -> Value

toEncodingList :: [UtxOwner] -> Encoding

type Rep UtxOwner Source # 
Instance details

Defined in Wallet.Graph

type Rep UtxOwner = D1 ('MetaData "UtxOwner" "Wallet.Graph" "plutus-contract-1.2.0.0-FH8LC9wh7UV4Nmv68NHXrC" '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

Methods

toJSON :: UtxoLocation -> Value

toEncoding :: UtxoLocation -> Encoding

toJSONList :: [UtxoLocation] -> Value

toEncodingList :: [UtxoLocation] -> Encoding

type Rep UtxoLocation Source # 
Instance details

Defined in Wallet.Graph

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