hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.API.ServerOutputFilterSpec

Description

Tests for the ?address= output filter applied by WSServer. ServerSpec covers the server-side wiring that reaches it.

Synopsis

Documentation

spec :: Spec Source #

Fixtures

aliceKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey) Source #

bobKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey) Source #

carolKeys :: (VerificationKey PaymentKey, SigningKey PaymentKey) Source #

aliceAddress :: AddressInEra Source #

bobAddress :: AddressInEra Source #

carolAddress :: AddressInEra Source #

txPayingTo :: [AddressInEra] -> Tx Source #

A transaction paying 2 Ada to each of the given addresses, unsigned.

aliceSpendsTo :: AddressInEra -> Tx Source #

Signed by Alice and paying only to the given address, so her witness is all the filter has to go on.

snapshotConfirmed :: [Tx] -> ServerOutput Tx Source #

Helpers

shouldPassFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation Source #

shouldDropFor :: HasCallStack => ServerOutput Tx -> AddressInEra -> Expectation Source #

shouldPass :: HasCallStack => ServerOutput Tx -> Text -> Expectation Source #

shouldDrop :: HasCallStack => ServerOutput Tx -> Text -> Expectation Source #

matches :: ServerOutput Tx -> Text -> Bool Source #

bech32Of :: AddressInEra -> Text Source #