├── backend
├── static
├── frontend.jsexe
├── frontendJs
│ └── frontend.jsexe
├── src
│ ├── Paths.hs
│ ├── Backend.hs
│ └── ParseConfig.hs
├── src-bin
│ └── main.hs
└── backend.cabal
├── config
├── common
│ ├── route
│ └── example
├── mainnet
│ ├── conway-genesis.json
│ ├── topology.json
│ ├── shelley-genesis.json
│ └── config.json
├── preprod
│ ├── conway-genesis.json
│ ├── topology.json
│ ├── shelley-genesis.json
│ └── config.json
├── preview
│ ├── conway-genesis.json
│ ├── topology.json
│ ├── shelley-genesis.json
│ └── config.json
├── sanchonet
│ ├── conway-genesis.json
│ ├── topology.json
│ ├── shelley-genesis.json
│ ├── byron-genesis.json
│ └── config.json
├── backend
│ ├── bank.cardano.sk
│ ├── bank.cardano.vk
│ └── hydra
│ │ └── genesis-shelley.json
└── readme.md
├── static
├── main.css
├── obelisk.jpg
├── api.html
├── wallet.js
└── api.js
├── cabal.project
├── dep
├── aeson
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── entropy
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── hydra
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── qrcode
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── reflex
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── vessel
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── cardano-node
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── flake-compat
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── snap-core
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── aeson-gadt-th
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── reflex-gadt-api
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── secp256k1-haskell
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── constraints-extras
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── hspec-webdriver-clone
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── juicy.pixels.ghcjs
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── bytestring-aeson-orphans
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
└── cardano-transaction-builder
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── .obelisk
└── impl
│ ├── default.nix
│ ├── github.json
│ └── thunk.nix
├── hydra-pay
├── src-bin
│ └── main.hs
├── src
│ ├── HydraPay.hs
│ ├── HydraPay
│ │ ├── Watch.hs
│ │ ├── Cardano
│ │ │ └── Hydra
│ │ │ │ └── Tools.hs
│ │ ├── Path.hs
│ │ ├── Bank.hs
│ │ ├── Transaction.hs
│ │ ├── Database
│ │ │ └── Workers.hs
│ │ └── Config.hs
│ └── Cardano
│ │ ├── Api
│ │ └── Extras.hs
│ │ └── Transaction
│ │ ├── CardanoApi.hs
│ │ └── Extras.hs
└── hydra-pay.cabal
├── cardano-project
├── dep
│ ├── heist
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── qrcode
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── vessel
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── entropy
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── rhyolite
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── snap-core
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── aeson-gadt-th
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── reflex-gadt-api
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── constraints-extras
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── haskell-hexstring
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── hspec-webdriver-clone
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── juicy.pixels.ghcjs
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── logging-effect-colors
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ ├── logging-effect-syslog
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
│ └── commutative-semigroups
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
├── .obelisk
│ └── impl
│ │ ├── default.nix
│ │ ├── github.json
│ │ └── thunk.nix
├── cardano-overlays
│ ├── dep
│ │ ├── iohk-nix
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ ├── terminal-size
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ ├── plutus-ghcjs-cross
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ └── hackage-overlay-ghcjs
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ ├── cardano-packages
│ │ └── dep
│ │ │ ├── aeson
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── bech32
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── flat
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── fmt
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── goblins
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── io-sim
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── jsaddle
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── plutus
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-base
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-node
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── criterion
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── ekg-json
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── ghcjs-base
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── hs-memory
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── hw-aeson
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── persistent
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── row-types
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── typerep-map
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── Win32-network
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── base64-bytestring
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-addresses
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-crypto
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-ledger
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-prelude
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-sl-x509
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── cardano-wallet
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── ghcjs-base-stub
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── haskell-hedgehog
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── hedgehog-extras
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── ouroboros-network
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── purescript-bridge
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── typed-protocols
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── optparse-applicative
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ ├── servant-purescript
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ │ │ └── iohk-monitoring-framework
│ │ │ ├── default.nix
│ │ │ ├── github.json
│ │ │ └── thunk.nix
│ ├── cardano-wallet-coin-selection
│ │ ├── dep
│ │ │ └── cardano-wallet-coin-selection
│ │ │ │ ├── default.nix
│ │ │ │ ├── github.json
│ │ │ │ └── thunk.nix
│ │ └── default.nix
│ └── default.nix
└── extras.nix
├── livedoc-devnet
├── config
│ ├── devnet
│ │ ├── byron-delegate.key
│ │ ├── vrf.skey
│ │ ├── opcert.cert
│ │ ├── byron-delegation.cert
│ │ ├── genesis-byron.json
│ │ ├── kes.skey
│ │ ├── genesis-shelley.json
│ │ └── cardano-node.json
│ └── credentials
│ │ ├── faucet.sk
│ │ └── faucet.vk
└── bin
│ └── prepare-devnet.sh
├── common
├── src
│ └── Common
│ │ ├── Api.hs
│ │ ├── Helpers.hs
│ │ └── Route.hs
└── common.cabal
├── frontend
├── src-bin
│ └── main.hs
└── frontend.cabal
├── push-docker.sh
├── hydra-pay-core
├── src
│ └── HydraPay
│ │ ├── Cardano
│ │ └── Hydra
│ │ │ ├── ChainConfig.hs
│ │ │ ├── Status.hs
│ │ │ ├── RunningHead.hs
│ │ │ ├── Api
│ │ │ └── ClientInput.hs
│ │ │ └── Api.hs
│ │ ├── Types.hs
│ │ ├── PaymentChannel.hs
│ │ └── Orphans.hs
└── hydra-pay-core.cabal
├── shell.nix
├── .gitignore
├── release.nix
├── default.nix
└── CONTRIBUTING.md
/backend/static:
--------------------------------------------------------------------------------
1 | ../static
--------------------------------------------------------------------------------
/config/common/route:
--------------------------------------------------------------------------------
1 | http://localhost:8000
--------------------------------------------------------------------------------
/static/main.css:
--------------------------------------------------------------------------------
1 | p {
2 | color: red;
3 | }
--------------------------------------------------------------------------------
/backend/frontend.jsexe:
--------------------------------------------------------------------------------
1 | ../frontend-js/bin/frontend.jsexe
--------------------------------------------------------------------------------
/config/common/example:
--------------------------------------------------------------------------------
1 | This string comes from config/common/example
--------------------------------------------------------------------------------
/config/mainnet/conway-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "genDelegs": {}
3 | }
4 |
--------------------------------------------------------------------------------
/config/preprod/conway-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "genDelegs": {}
3 | }
4 |
--------------------------------------------------------------------------------
/config/preview/conway-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "genDelegs": {}
3 | }
4 |
--------------------------------------------------------------------------------
/config/sanchonet/conway-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "genDelegs": {}
3 | }
--------------------------------------------------------------------------------
/backend/frontendJs/frontend.jsexe:
--------------------------------------------------------------------------------
1 | ../../frontend-js/bin/frontend.jsexe
--------------------------------------------------------------------------------
/cabal.project:
--------------------------------------------------------------------------------
1 | optional-packages:
2 | *
3 | write-ghc-environment-files: never
4 |
--------------------------------------------------------------------------------
/dep/aeson/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/entropy/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/hydra/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/qrcode/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/reflex/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/vessel/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/.obelisk/impl/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/cardano-node/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/flake-compat/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/snap-core/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/aeson-gadt-th/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/reflex-gadt-api/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/secp256k1-haskell/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/hydra-pay/src-bin/main.hs:
--------------------------------------------------------------------------------
1 | import HydraPay
2 |
3 | main :: IO ()
4 | main = runClient
5 |
--------------------------------------------------------------------------------
/cardano-project/dep/heist/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/qrcode/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/vessel/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/constraints-extras/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/hspec-webdriver-clone/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/juicy.pixels.ghcjs/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/static/obelisk.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/obsidiansystems/hydra-pay/HEAD/static/obelisk.jpg
--------------------------------------------------------------------------------
/cardano-project/.obelisk/impl/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/entropy/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/rhyolite/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/snap-core/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/bytestring-aeson-orphans/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/dep/cardano-transaction-builder/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/aeson-gadt-th/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/reflex-gadt-api/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/constraints-extras/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/haskell-hexstring/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/hspec-webdriver-clone/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/juicy.pixels.ghcjs/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-colors/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-syslog/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/iohk-nix/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/dep/commutative-semigroups/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/terminal-size/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/plutus-ghcjs-cross/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/aeson/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/bech32/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/flat/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/fmt/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/goblins/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/io-sim/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/jsaddle/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/plutus/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/hackage-overlay-ghcjs/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-base/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-node/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/criterion/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ekg-json/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hs-memory/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hw-aeson/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/persistent/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/row-types/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typerep-map/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/Win32-network/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/base64-bytestring/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-addresses/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-crypto/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-ledger/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-prelude/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-sl-x509/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-wallet/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base-stub/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/haskell-hedgehog/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hedgehog-extras/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ouroboros-network/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/purescript-bridge/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typed-protocols/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/optparse-applicative/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/servant-purescript/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay.hs:
--------------------------------------------------------------------------------
1 | module HydraPay (module Export) where
2 |
3 | import HydraPay.Instance as Export
4 | import HydraPay.Client as Export
5 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/iohk-monitoring-framework/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/byron-delegate.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/obsidiansystems/hydra-pay/HEAD/livedoc-devnet/config/devnet/byron-delegate.key
--------------------------------------------------------------------------------
/static/api.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Demo API
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-wallet-coin-selection/dep/cardano-wallet-coin-selection/default.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | import (import ./thunk.nix)
--------------------------------------------------------------------------------
/common/src/Common/Api.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 |
3 | module Common.Api where
4 |
5 | commonStuff :: String
6 | commonStuff = "Here is a string defined in Common.Api"
7 |
--------------------------------------------------------------------------------
/config/mainnet/topology.json:
--------------------------------------------------------------------------------
1 | {
2 | "Producers": [
3 | {
4 | "addr": "relays-new.cardano-mainnet.iohk.io",
5 | "port": 3001,
6 | "valency": 2
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/config/backend/bank.cardano.sk:
--------------------------------------------------------------------------------
1 | {
2 | "type": "PaymentSigningKeyShelley_ed25519",
3 | "description": "Payment Signing Key",
4 | "cborHex": "5820081880763fc8b6a754eb4ba2f52f177d53cd723813ece764cabf6bf565935f5c"
5 | }
6 |
--------------------------------------------------------------------------------
/config/backend/bank.cardano.vk:
--------------------------------------------------------------------------------
1 | {
2 | "type": "PaymentVerificationKeyShelley_ed25519",
3 | "description": "Payment Verification Key",
4 | "cborHex": "582005a6ea0d2ed478bed1f1d440faf70e2ee4c927233c81d9777d7aeb2ece5b8cea"
5 | }
6 |
--------------------------------------------------------------------------------
/dep/hydra/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "hydra",
4 | "private": false,
5 | "rev": "1e13b60a7b21c5ccd6c36e3cf220547f5d443cef",
6 | "sha256": "0djrzy9vigpi1y7izshc3li0rxmvbd5d5fk06ya001b9dbhjqgid"
7 | }
8 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/credentials/faucet.sk:
--------------------------------------------------------------------------------
1 | {
2 | "type": "PaymentSigningKeyShelley_ed25519",
3 | "description": "Payment Signing Key",
4 | "cborHex": "5820a5e4238b67ebb1108c52a01ac850bbce82c915d77bad94331892f3edf612883c"
5 | }
6 |
--------------------------------------------------------------------------------
/dep/vessel/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "vessel",
4 | "private": false,
5 | "rev": "03b1465abeb2dea16d32feb0963f11d0ed00f2f8",
6 | "sha256": "18vyh4ds2mng9lmn435dpbf9rj3fh9z1rimk4f2s3war9j4j5wnq"
7 | }
8 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/credentials/faucet.vk:
--------------------------------------------------------------------------------
1 | {
2 | "type": "PaymentVerificationKeyShelley_ed25519",
3 | "description": "Payment Verification Key",
4 | "cborHex": "5820ce13cd433cdcb3dfb00c04e216956aeb622dcd7f282b03304d9fc9de804723b2"
5 | }
6 |
--------------------------------------------------------------------------------
/dep/aeson-gadt-th/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "aeson-gadt-th",
4 | "private": false,
5 | "rev": "71a315a4873c2875ad737a3320320849bdcf8a2a",
6 | "sha256": "1sjl0a0ig0xfssl4bglakk1b7sj8wqz8hwbg7k2fk10qi7z5hb50"
7 | }
8 |
--------------------------------------------------------------------------------
/dep/aeson/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskell",
3 | "repo": "aeson",
4 | "branch": "aeson-1.5",
5 | "private": false,
6 | "rev": "78e838df44288ac7d7ac2cd77863d2c026d86dbb",
7 | "sha256": "181v1nz05jq992wgmz6ns7iwqx0c5w003hv5ki1kvc9zlg5dh3vf"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/qrcode/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "qrcode",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "f33abef0451982ae7769b24e9031753ef2c4d826",
7 | "sha256": "044bi6fnrzpzam0zyd6yijpkphjnn3z751nnxb3zz2w93wzi6nkd"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/aeson-gadt-th/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "aeson-gadt-th",
4 | "private": false,
5 | "rev": "71a315a4873c2875ad737a3320320849bdcf8a2a",
6 | "sha256": "1sjl0a0ig0xfssl4bglakk1b7sj8wqz8hwbg7k2fk10qi7z5hb50"
7 | }
8 |
--------------------------------------------------------------------------------
/dep/flake-compat/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "edolstra",
3 | "repo": "flake-compat",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
7 | "sha256": "1prd9b1xx8c0sfwnyzkspplh30m613j42l1k789s521f4kv4c2z2"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/reflex/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "reflex-frp",
3 | "repo": "reflex",
4 | "branch": "release/0.8.2.0",
5 | "private": false,
6 | "rev": "823afd9424234cbe0134051f09a6710e54509cec",
7 | "sha256": "1zh8v28issyh8sww9aw6y4dqd2qql25nrxxzxg9ky0vrwmhw295c"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/snap-core/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "snapframework",
3 | "repo": "snap-core",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "2dc0cab7d4ec48cc690898700c7e9f9db8d1d54d",
7 | "sha256": "1k5gwhgf489c44mv38wawv3nwl7dxr7zrsg1112s0adbavsjdbxn"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/heist/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "snapframework",
3 | "repo": "heist",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "32e2e11bec9973e60c2348e4c3fc73e5821cdb61",
7 | "sha256": "1gc2jz1vzjv41qmjs52wbvrsy3z3vg1l8bpkdyjz1i10gj7yavip"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/vessel/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "vessel",
4 | "branch": "pzp",
5 | "private": false,
6 | "rev": "b9c9db63a9f5c2ceab352c58972146a622d5a04d",
7 | "sha256": "0rrr1wqqpbhqpgclwl2qzdpjsv5inpp5lc7qgg66sjlglw44ys9y"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/cardano-node/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "cardano-node",
4 | "branch": "v8.1.2",
5 | "private": false,
6 | "rev": "d2d90b48c5577b4412d5c9c9968b55f8ab4b9767",
7 | "sha256": "1qpmlfxdfx2dg12109cyn75ybcwxjz0wk451pzcalfdzxhvpqibp"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/qrcode/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "qrcode",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "f33abef0451982ae7769b24e9031753ef2c4d826",
7 | "sha256": "044bi6fnrzpzam0zyd6yijpkphjnn3z751nnxb3zz2w93wzi6nkd"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/entropy/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "entropy",
4 | "branch": "aa/nonwindow-contexts",
5 | "private": false,
6 | "rev": "ddda007c44390d0ec8cad58810710864dee60ddd",
7 | "sha256": "00b7cqdqbjf953r5gmwmkn2mn36zdxqwx90xih925cni94vi4vw9"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/secp256k1-haskell/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskoin",
3 | "repo": "secp256k1-haskell",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "3df963ab6ae14ec122691a97af09a7331511a387",
7 | "sha256": "1phnj7wzprrgdhji80rh16savmqq1z9q3z5yi72x8w5v42lf5f2y"
8 | }
9 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/vrf.skey:
--------------------------------------------------------------------------------
1 | {
2 | "type": "VrfSigningKey_PraosVRF",
3 | "description": "VRF Signing Key",
4 | "cborHex": "5840899795b70e9f34b737159fe21a6170568d6031e187f0cc84555c712b7c29b45cb882007593ef70f86e5c0948561a3b8e8851529a4f98975f2b24e768dda38ce2"
5 | }
6 |
--------------------------------------------------------------------------------
/.obelisk/impl/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "obelisk",
4 | "branch": "dylang/update-nix_develop",
5 | "private": false,
6 | "rev": "495d83dbc2f127b6f6435b3b1c29acee36b42572",
7 | "sha256": "1ks8c7m5idpzzsv6via0k9dvk12r2q1vss96qa4wdmhdxkwpmlmx"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-colors/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "logging-effect-colors",
4 | "private": false,
5 | "rev": "52d0ce7415adacadf470cc01c9ec4fadfeba7c39",
6 | "sha256": "1xq6mn65iz94snbs9i9s5mdwl6n0yx4cbra2ldp77wji0gdh8qi5"
7 | }
8 |
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-syslog/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "logging-effect-syslog",
4 | "private": false,
5 | "rev": "353fb7cb276f54b8cd72bf37127f070fb15b242e",
6 | "sha256": "0h98wsfxy6qxnwxy78a1y71ha7dlp3jil20iqzxmdhh1bxcf4cby"
7 | }
8 |
--------------------------------------------------------------------------------
/cardano-project/dep/snap-core/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "snapframework",
3 | "repo": "snap-core",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "2dc0cab7d4ec48cc690898700c7e9f9db8d1d54d",
7 | "sha256": "1k5gwhgf489c44mv38wawv3nwl7dxr7zrsg1112s0adbavsjdbxn"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/hspec-webdriver-clone/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "luigy",
3 | "repo": "hspec-webdriver-clone",
4 | "branch": "hspec-2.8",
5 | "private": false,
6 | "rev": "2cbe58872304d2332dfc61efaa9e0432862459d7",
7 | "sha256": "1hm8cgw28v6g5xi25i3h1rmac7p4kh340qd5dx0ndjyxjl1lvb0p"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/juicy.pixels.ghcjs/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "juicy.pixels.ghcjs",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "a1c516493c674dba64e8eadb8a65b829477f302d",
7 | "sha256": "06dm7kw5p1df0j0mf2wp9yyqxxzx9lih1y3l2ym8dcl1cklrnx57"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/reflex-gadt-api/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "reflex-frp",
3 | "repo": "reflex-gadt-api",
4 | "branch": "release/0.2.2.1",
5 | "private": false,
6 | "rev": "c5c84a5878e64eb91f919bfc0bbfa863d078302d",
7 | "sha256": "0mqxdv45b0qq6p5ji2z9h93354gd546d9b1z429jn134yvzg78vc"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/rhyolite/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "rhyolite",
4 | "branch": "so/hydra-pin",
5 | "private": false,
6 | "rev": "77b4d6aa7219c0ee2ccab347f716ddc8cdef0848",
7 | "sha256": "0m6nxfa92bwkx2k6wpdgya1fqjq7xr5w951ai1xww70ajnadcphr"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/.obelisk/impl/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "obelisk",
4 | "branch": "release/1.1.0.0",
5 | "private": false,
6 | "rev": "8e942c022ee08ed278bba8f13fdd3be76fc8d8a7",
7 | "sha256": "07y1997mh9ycvdmfwm7l1fpscc238bnjyrqpf9jjka4d52aqkw6j"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/entropy/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "entropy",
4 | "branch": "aa/nonwindow-contexts",
5 | "private": false,
6 | "rev": "ddda007c44390d0ec8cad58810710864dee60ddd",
7 | "sha256": "00b7cqdqbjf953r5gmwmkn2mn36zdxqwx90xih925cni94vi4vw9"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/reflex-gadt-api/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "reflex-frp",
3 | "repo": "reflex-gadt-api",
4 | "branch": "develop",
5 | "private": false,
6 | "rev": "6ea140875f0b5a0b467fde674965ac3ecb48b60f",
7 | "sha256": "10k71lbws0p2sih5f4pp7n034iji0wj8dc8inmmj2dg8ahkab8ij"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/constraints-extras/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "constraints-extras",
4 | "branch": "release/0.3.2.0",
5 | "private": false,
6 | "rev": "42835fd9e1b4b3c4a72cd1237c04789f01c92dd0",
7 | "sha256": "0z7yfxxi4jywzhlkphs8ss3hd7fll8c90bbl6nr2bj63c87jx6sw"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/flat/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "Quid2",
3 | "repo": "flat",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8",
7 | "sha256": "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/fmt/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "cdornan",
3 | "repo": "fmt",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "272c5b2d1c420ea1164067db47dfab952dbec854",
7 | "sha256": "0ymmia5i0r733zl534jddc7q8l515gm5yl8fvxy0xsvddl0z8mcm"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/iohk-nix/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "iohk-nix",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "db2c75a09c696271194bb3ef25ec8e9839b594b7",
7 | "sha256": "1g4cnxglbqhl1nnmi7w8gc1y3779y5l29jaz78a9jrrd8rqq55rp"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/haskell-hexstring/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "haskell-hexstring",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "7a8a4a2765da5767cbe39cdf7f406c6b0f084554",
7 | "sha256": "1ji81zbflw07fjp4zazxc2h55b47laji24m0xnmxvmwyic8zlq8k"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/juicy.pixels.ghcjs/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "juicy.pixels.ghcjs",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "a1c516493c674dba64e8eadb8a65b829477f302d",
7 | "sha256": "06dm7kw5p1df0j0mf2wp9yyqxxzx9lih1y3l2ym8dcl1cklrnx57"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/aeson/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskell",
3 | "repo": "aeson",
4 | "branch": "aeson-1.5",
5 | "private": false,
6 | "rev": "78e838df44288ac7d7ac2cd77863d2c026d86dbb",
7 | "sha256": "181v1nz05jq992wgmz6ns7iwqx0c5w003hv5ki1kvc9zlg5dh3vf"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/jsaddle/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "ghcjs",
3 | "repo": "jsaddle",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "00b206288c2cd019b56ff9f0b72a065f67ffb242",
7 | "sha256": "179q0j4wmn28h1ny2p8qgpr25krl4v6dn3xmbn8zkvylkz4f3m42"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/terminal-size/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "angerman",
3 | "repo": "terminal-size",
4 | "branch": "patch-1",
5 | "private": false,
6 | "rev": "0f805a63492e94718753aacf425d4a63641d8d14",
7 | "sha256": "08brqsv3d3kwmgnblz82q18gbazm446pafd4c2gcqcvfckgqcp76"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/hspec-webdriver-clone/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "luigy",
3 | "repo": "hspec-webdriver-clone",
4 | "branch": "hspec-2.8",
5 | "private": false,
6 | "rev": "2cbe58872304d2332dfc61efaa9e0432862459d7",
7 | "sha256": "1hm8cgw28v6g5xi25i3h1rmac7p4kh340qd5dx0ndjyxjl1lvb0p"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/cardano-transaction-builder/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "cardano-transaction-builder",
4 | "branch": "dango",
5 | "private": false,
6 | "rev": "c7a0ebda86bf6a148adf58dfe29a28e66506535b",
7 | "sha256": "0kv4xpqjjj5j0w59nzf9sy7d0iwj5900aslkgmlflcc6js4bspyn"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/criterion/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskell",
3 | "repo": "criterion",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "333d1913a7b10099d347da83922828f5f0a0e88f",
7 | "sha256": "17i3c49svm1rpcyif05sp9lfv8h3snq64n0s8zx9y32axcyl5q4b"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "ghcjs",
3 | "repo": "ghcjs-base",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "fbaae59b05b020e91783df122249095e168df53f",
7 | "sha256": "0ixx6swp3g03w32dvryls5wfa5m7b0ps5jsxj48fv7a7ml0859y7"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/io-sim/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "io-sim",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "f4183f274d88d0ad15817c7052df3a6a8b40e6dc",
7 | "sha256": "0vb2pd9hl89v2y5hrhrsm69yx0jf98vppjmfncj2fraxr3p3lldw"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/row-types/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "target",
3 | "repo": "row-types",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "f49248b6f175cc43fcc801e26c07a2f90e29b3c5",
7 | "sha256": "0hsil3pwjns6zn35wrfzbl06ac6a5x2a9y27rn4g4rf9gyn7fzw0"
8 | }
9 |
--------------------------------------------------------------------------------
/dep/bytestring-aeson-orphans/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "bytestring-aeson-orphans",
4 | "branch": "release/0.1.0.0",
5 | "private": false,
6 | "rev": "ca7818097360480b28745e56f7580ab0505a7c95",
7 | "sha256": "1i4pdgv72x8idyq3limjvj25innw1pl4nd1m55ag29c5kcd9ap8q"
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/src-bin/main.hs:
--------------------------------------------------------------------------------
1 | import Frontend
2 | import Common.Route
3 | import Obelisk.Frontend
4 | import Obelisk.Route.Frontend
5 | import Reflex.Dom
6 |
7 | main :: IO ()
8 | main = do
9 | let Right validFullEncoder = checkEncoder fullRouteEncoder
10 | run $ runFrontend validFullEncoder frontend
11 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/bech32/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "bech32",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "804423946a12a094af8ffbc7d11dc59773cca168",
7 | "sha256": "1qgsjbbib33959p07w4451lrf7xs81r690y4zcmcn8kvxnc9lpzb"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ekg-json/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "vshabanov",
3 | "repo": "ekg-json",
4 | "branch": "aeson-2.0",
5 | "private": false,
6 | "rev": "00ebe7211c981686e65730b7144fbf5350462608",
7 | "sha256": "1zvjm3pb38w0ijig5wk5mdkzcszpmlp5d4zxvks2jk1rkypi8gsm"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/goblins/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "goblins",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba",
7 | "sha256": "17c88rbva3iw82yg9srlxjv2ia5wjb9cyqw44hik565f5v9svnyg"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hs-memory/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "vincenthz",
3 | "repo": "hs-memory",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "f868c5baf54c98278556d38933537a410afe1dab",
7 | "sha256": "12nvrsrb1pdkif8nykiaby4sksry3kxq1j89z6x67h66232h5ril"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hw-aeson/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskell-works",
3 | "repo": "hw-aeson",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "6dc309ff4260c71d9a18c220cbae8aa1dfe2a02e",
7 | "sha256": "08zxzkk1fy8xrvl46lhzmpyisizl0nzl1n00g417vc0l170wsr9j"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/persistent/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "yesodweb",
3 | "repo": "persistent",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "a7abfc66919458b584cff228f71e8a2994944d87",
7 | "sha256": "0cvb2rayc434v56m28hzwp8gpzf7k9qmbzcmgrj4l0002nzm1psa"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/plutus/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "plutus",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "a56c96598b4b25c9e28215214d25189331087244",
7 | "sha256": "12d6bndmj0dxl6xlaqmf78326yp5hw093bmybmqfpdkvk4mgz03j"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typerep-map/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "kowainik",
3 | "repo": "typerep-map",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "41838d2c1b3626bc2e7ae560bf85d3280b1cda20",
7 | "sha256": "1w5vwf12z3blpnq5sw9br2bi8w81hmzxizcz69x1z6q38cqygzrz"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/commutative-semigroups/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "ObsidianSystems",
3 | "repo": "commutative-semigroups",
4 | "branch": "develop",
5 | "private": false,
6 | "rev": "1ff90095ee058b067913efc8ebcad90f605fa5b3",
7 | "sha256": "04abn9h0miz0kbzjhg2z9pppxjncswkcp9q72pikgv0izc0ckic5"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/dep/constraints-extras/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "constraints-extras",
4 | "branch": "release/0.3.2.0",
5 | "private": false,
6 | "rev": "42835fd9e1b4b3c4a72cd1237c04789f01c92dd0",
7 | "sha256": "0z7yfxxi4jywzhlkphs8ss3hd7fll8c90bbl6nr2bj63c87jx6sw"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/plutus-ghcjs-cross/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "plutus",
4 | "branch": "hkm/ghcjs-cross",
5 | "private": false,
6 | "rev": "2bec8ac9a4dfc13525e2d5be70c5e1916b32f806",
7 | "sha256": "0sml32krmpzsmjzlsc4m4lnajvz1zpb7mav6nzippca180jv53iw"
8 | }
9 |
--------------------------------------------------------------------------------
/push-docker.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Uses obsidiansys/hydra-pay:REVISION by default:
4 | VERSION=${1:-$(git rev-parse HEAD)}
5 | NAME="obsidiansys/hydra-pay"
6 |
7 | docker load < $(nix-build release.nix -A dockerImage --no-out-link --argstr version $VERSION --argstr name $NAME)
8 | docker push $NAME:$VERSION
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-base/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-base",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "0f3a867493059e650cda69e20a5cbf1ace289a57",
7 | "sha256": "0p0az3sbkhb7njji8xxdrfb0yx2gc8fmrh872ffm8sfip1w29gg1"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/hackage-overlay-ghcjs/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "hackage-overlay-ghcjs",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "d20f6eac87c752de810a9e2e952f2922e53ccee4",
7 | "sha256": "1kdy4va2rcvmnxdg94kc2dw8m1v1aryh588q4s8h99d8whr115ns"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/Win32-network/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "Win32-network",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "3825d3abf75f83f406c1f7161883c438dac7277d",
7 | "sha256": "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/base64-bytestring/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "haskell",
3 | "repo": "base64-bytestring",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "931182a63a0817bf9847e720fcf7a79cf07c85fc",
7 | "sha256": "01mvicn0vz5s8i5685j5c84rlan7m11z06r6cnwfq2qn6p4szmaa"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-crypto/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-crypto",
4 | "branch": "develop",
5 | "private": false,
6 | "rev": "f73079303f663e028288f9f4a9e08bcca39a923e",
7 | "sha256": "1n87i15x54s0cjkh3nsxs4r1x016cdw1fypwmr68936n3xxsjn6q"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-ledger/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-ledger",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "c7c63dabdb215ebdaed8b63274965966f2bf408f",
7 | "sha256": "1cn1z3dh5dy5yy42bwfd8rg25mg8qp3m55gyfsl563wgw4q1nd6d"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-prelude/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-prelude",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555",
7 | "sha256": "00h10l5mmiza9819p9v5q5749nb9pzgi20vpzpy1d34zmh6gf1cj"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-sl-x509/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-sl-x509",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "12925934c533b3a6e009b61ede555f8f26bac037",
7 | "sha256": "1kma25g8sl6m3pgsihja7fysmv6vjdfc0x7dyky9g5z156sh8z7i"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-wallet/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-wallet",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "a08d46f37375cc4ece45ee32fd7df6a722f49253",
7 | "sha256": "0qq1xfp2a0vw0as8ms90imwlzbhqxmi9jiisfvlwz18lsanmqhn0"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/haskell-hedgehog/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "hedgehogqa",
3 | "repo": "haskell-hedgehog",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "20c4774163925c341ee689105f4ac7701cd578cf",
7 | "sha256": "137camqb8vmrkgylzyx6v9l2rxm3hbavw82m4kq7039jpr356pvc"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hedgehog-extras/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "hedgehog-extras",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "714ee03a5a786a05fc57ac5d2f1c2edce4660d85",
7 | "sha256": "1qa4mm36xynaf17990ijmzww0ij8hjrc0vw5nas6d0zx6q9hb978"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typed-protocols/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "typed-protocols",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "181601bc3d9e9d21a671ce01e0b481348b3ca104",
7 | "sha256": "1lr97b2z7l0rpsmmz92rsv27qzd5vavz10cf7n25svya4kkiysp5"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-node/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "cardano-node",
4 | "branch": "1.35.3-configs",
5 | "private": false,
6 | "rev": "ea6d78c775d0f70dde979b52de022db749a2cc32",
7 | "sha256": "01vp5p0d96zywbn094hds0xsi41p802c7538hb8p5w10ld7cg446"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ouroboros-network/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "ouroboros-network",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "cb9eba406ceb2df338d8384b35c8addfe2067201",
7 | "sha256": "066llskxzjgcs13lwlvklb28azb9kd9b77j61x8fvrj1rlf5njfw"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/purescript-bridge/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "purescript-bridge",
4 | "branch": "master",
5 | "private": false,
6 | "rev": "6a92d7853ea514be8b70bab5e72077bf5a510596",
7 | "sha256": "13j64vv116in3c204qsl1v0ajphac9fqvsjp7x3zzfr7n7g61drb"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base-stub/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "ghcjs-base-stub",
4 | "branch": "aeson2-support",
5 | "private": false,
6 | "rev": "c75ef785eaf8ff9f13d4155872203a82427e1e18",
7 | "sha256": "0awri1mp3djszrh6xkglkz2ly5gbppm6vlm5raygprb6kjw22bla"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/optparse-applicative/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "optparse-applicative",
4 | "branch": "main",
5 | "private": false,
6 | "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a",
7 | "sha256": "1gvsrg925vynwgqwplgjmp53vj953qyh3wbdf34pw21c8r47w35r"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/servant-purescript/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "servant-purescript",
4 | "branch": "purs012",
5 | "private": false,
6 | "rev": "a0c7c7e37c95564061247461aef4be505a853538",
7 | "sha256": "177na04jf6wf18kandzsah40lw3xswmmccpr3hkb8wb4hypcffnf"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-addresses/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "cardano-addresses",
4 | "branch": "3.11.0-ghcjs-compat",
5 | "private": false,
6 | "rev": "91008d2d8670da68411f8f1d4dda3c6ddbc203b3",
7 | "sha256": "01pgpykzljblv1z8br4lnbsw4agvjzxx9dp2pz6qxzvcsjnrzki5"
8 | }
9 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/iohk-monitoring-framework/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "input-output-hk",
3 | "repo": "iohk-monitoring-framework",
4 | "branch": "develop",
5 | "private": false,
6 | "rev": "066f7002aac5a0efc20e49643fea45454f226caa",
7 | "sha256": "0s6x4in11k5ba7nl7la896g28sznf9185xlqg9c604jqz58vj9nj"
8 | }
9 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Cardano/Hydra/ChainConfig.hs:
--------------------------------------------------------------------------------
1 | {-# Language TemplateHaskell #-}
2 | module HydraPay.Cardano.Hydra.ChainConfig where
3 |
4 | import Control.Lens
5 |
6 | data HydraChainConfig = HydraChainConfig
7 | { _hydraChainConfig_ledgerGenesis :: FilePath
8 | , _hydraChainConfig_ledgerProtocolParams :: FilePath
9 | }
10 |
11 | makeLenses ''HydraChainConfig
12 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-wallet-coin-selection/dep/cardano-wallet-coin-selection/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "owner": "obsidiansystems",
3 | "repo": "cardano-wallet",
4 | "branch": "v2022-07-01_extract-coin-selection_shelley-compat",
5 | "private": false,
6 | "rev": "fc4ae8b7d9e9a470c8550613227bec75f70e9c73",
7 | "sha256": "1qxy89p2yaka19pjrfwpva62lh7gp7awlpmdgg14gaalw7qjgzxf"
8 | }
9 |
--------------------------------------------------------------------------------
/config/readme.md:
--------------------------------------------------------------------------------
1 | ### Config
2 |
3 | Obelisk projects should contain a config folder with the following subfolders: common, frontend, and backend.
4 |
5 | Things that should never be transmitted to the frontend belong in backend/ (e.g., email credentials)
6 |
7 | Frontend-only configuration belongs in frontend/.
8 |
9 | Shared configuration files (e.g., the route config) belong in common/
10 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/opcert.cert:
--------------------------------------------------------------------------------
1 | {
2 | "type": "NodeOperationalCertificate",
3 | "description": "",
4 | "cborHex": "828458204cd49bb05e9885142fe7af1481107995298771fd1a24e72b506a4d600ee2b3120000584089fc9e9f551b2ea873bf31643659d049152d5c8e8de86be4056370bccc5fa62dd12e3f152f1664e614763e46eaa7a17ed366b5cef19958773d1ab96941442e0b58205a3d778e76741a009e29d23093cfe046131808d34d7c864967b515e98dfc3583"
5 | }
6 |
--------------------------------------------------------------------------------
/shell.nix:
--------------------------------------------------------------------------------
1 | {}:
2 | let
3 | project = import ./. {};
4 | pkgs = project.obelisk.nixpkgs;
5 | in
6 | pkgs.mkShell {
7 | name = "hydra-pay";
8 | buildInputs = [
9 | project.cardano-node.cardano-cli
10 | project.cardano-node.cardano-node
11 | project.hydra.hydra-node
12 | project.hydra.hydra-tools-static
13 | ];
14 | inputsFrom = [
15 | (import ./. {}).shells.ghc
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/byron-delegation.cert:
--------------------------------------------------------------------------------
1 | { "omega": 0
2 | , "issuerPk":
3 | "NclXQiNNEpaaLdSxP3VFeOPIfSuFqBcNtmv8/7fftBKtgW1Aig7UqHJ/czsywkWFFVmBYPRnGjXspUl3wEMvuQ=="
4 | , "delegatePk":
5 | "24ejRK+kCDs1g4f3PcodFEUFVgNFWtfmuoEtVQf8/Ii2j2ruXHebJmZZPrwtAdbJYwDiSEvsHr95+BAF1ifGsA=="
6 | , "cert":
7 | "498c72e35ef30cd4657b48bfcc0a84a555a67981e3b6104a0d1708ab84510367d81e1ba3f47619565b1ee1098e31dcb8eb648d8030e061b568de113fdf3d6a09"
8 | }
--------------------------------------------------------------------------------
/config/preprod/topology.json:
--------------------------------------------------------------------------------
1 | {
2 | "localRoots": [
3 | {
4 | "accessPoints": [],
5 | "advertise": false,
6 | "valency": 1
7 | }
8 | ],
9 | "publicRoots": [
10 | {
11 | "accessPoints": [
12 | {
13 | "address": "preprod-node.world.dev.cardano.org",
14 | "port": 30000
15 | }
16 | ],
17 | "advertise": false
18 | }
19 | ],
20 | "useLedgerAfterSlot": 4642000
21 | }
22 |
--------------------------------------------------------------------------------
/config/preview/topology.json:
--------------------------------------------------------------------------------
1 | {
2 | "localRoots": [
3 | {
4 | "accessPoints": [],
5 | "advertise": false,
6 | "valency": 1
7 | }
8 | ],
9 | "publicRoots": [
10 | {
11 | "accessPoints": [
12 | {
13 | "address": "preview-node.world.dev.cardano.org",
14 | "port": 30002
15 | }
16 | ],
17 | "advertise": false
18 | }
19 | ],
20 | "useLedgerAfterSlot": 322000
21 | }
22 |
--------------------------------------------------------------------------------
/config/sanchonet/topology.json:
--------------------------------------------------------------------------------
1 | {
2 | "localRoots": [
3 | {
4 | "accessPoints": [],
5 | "advertise": false,
6 | "valency": 1
7 | }
8 | ],
9 | "publicRoots": [
10 | {
11 | "accessPoints": [
12 | {
13 | "address": "sanchonet-node.world.dev.cardano.org",
14 | "port": 30004
15 | }
16 | ],
17 | "advertise": false
18 | }
19 | ],
20 | "useLedgerAfterSlot": 32000
21 | }
22 |
--------------------------------------------------------------------------------
/static/wallet.js:
--------------------------------------------------------------------------------
1 | let api = null;
2 |
3 | window.setup_wallet = async () => {
4 | api = await cardano.LodeWallet.enable();
5 | }
6 |
7 | window.send_cbor = async (payload) =>
8 | {
9 | if (api == null)
10 | {
11 | await window.setup_wallet();
12 | }
13 |
14 | if (api != null)
15 | {
16 | console.log("Doing the thing");
17 | const addrs = await api.getUsedAddresses();
18 | await api.signData(addrs[0], payload);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/dep/aeson/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/qrcode/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/reflex/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/vessel/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/backend/src/Paths.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 | module Paths where
3 |
4 | import System.Which (staticWhich, staticWhichNix)
5 |
6 | hydraToolsPath :: FilePath
7 | hydraToolsPath = $(staticWhich "hydra-tools")
8 |
9 | realpathPath :: FilePath
10 | realpathPath = $(staticWhich "realpath")
11 |
12 | dirnamePath :: FilePath
13 | dirnamePath = $(staticWhich "dirname")
14 |
15 | livedocDevnetScriptPath :: FilePath
16 | livedocDevnetScriptPath = $(staticWhichNix "prepare-devnet.sh")
17 |
--------------------------------------------------------------------------------
/dep/entropy/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/snap-core/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/aeson-gadt-th/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/heist/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/constraints-extras/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/hspec-webdriver-clone/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/juicy.pixels.ghcjs/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/dep/secp256k1-haskell/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/entropy/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/qrcode/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/snap-core/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/aeson-gadt-th/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/constraints-extras/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/haskell-hexstring/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/juicy.pixels.ghcjs/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/iohk-nix/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/commutative-semigroups/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/hspec-webdriver-clone/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-colors/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/logging-effect-syslog/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/terminal-size/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/plutus-ghcjs-cross/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/aeson/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/bech32/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/flat/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/fmt/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/io-sim/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/plutus/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/dep/hackage-overlay-ghcjs/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/criterion/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ekg-json/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/goblins/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hs-memory/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hw-aeson/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/jsaddle/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/persistent/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/row-types/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typerep-map/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .attr-cache
2 | .cabal-sandbox
3 | *.hi
4 | *.o
5 | cabal.project.local
6 | cabal.sandbox.config
7 | ctags
8 | dist-newstyle/
9 | dist/
10 | ghcid-output.txt
11 | profile/
12 | result
13 | result-*
14 | tags
15 | TAGS
16 | static.out
17 | /devnet/
18 | /.env
19 | /credentials/
20 | /db/
21 | /tmp/
22 | /config/backend/api-key
23 | /keystore/
24 | /node-logs/
25 | /bank.addr
26 | /cardano-node-db/
27 | /hydra-head-persistence/
28 | /hydra-node-logs/
29 | /hydra-pay-db/
30 | /log/
31 | /logs/
32 | /proxy-keys/
33 | /worker-thread.error.log
34 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/Win32-network/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-base/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-crypto/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-ledger/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-node/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-prelude/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-sl-x509/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-wallet/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ghcjs-base-stub/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/haskell-hedgehog/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/hedgehog-extras/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/typed-protocols/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/base64-bytestring/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/cardano-addresses/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/optparse-applicative/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/ouroboros-network/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/purescript-bridge/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/servant-purescript/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-packages/dep/iohk-monitoring-framework/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/backend/src-bin/main.hs:
--------------------------------------------------------------------------------
1 | import Backend
2 | import Frontend
3 | import Obelisk.Backend
4 | import Snap.Internal.Http.Server.Config
5 | import ParseConfig
6 | import Data.ByteString.UTF8 as BSU
7 |
8 | main :: IO ()
9 | main =
10 | let backendConfig conf' =
11 | BackendConfig
12 | (runSnapWithConfig conf')
13 | defaultStaticAssets
14 | defaultGhcjsWidgets
15 | in do
16 | cfg <- getHydraCLIConfig
17 | runBackendWith (backendConfig ((setPort (_port cfg) $ setBind (BSU.fromString . _bind $ cfg) defaultConfig))) backend frontend
18 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-wallet-coin-selection/dep/cardano-wallet-coin-selection/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import {}).fetchFromGitHub {
6 | inherit owner repo rev sha256 fetchSubmodules private;
7 | };
8 | json = builtins.fromJSON (builtins.readFile ./github.json);
9 | in fetch json
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Cardano/Hydra/Status.hs:
--------------------------------------------------------------------------------
1 | -- |
2 |
3 | module HydraPay.Cardano.Hydra.Status where
4 |
5 | import Data.Aeson
6 | import GHC.Generics
7 |
8 | data HydraHeadStatus
9 | = HydraHeadStatus_Unknown
10 | | HydraHeadStatus_Created
11 | | HydraHeadStatus_Initialized
12 | | HydraHeadStatus_Open
13 | | HydraHeadStatus_Closed
14 | | HydraHeadStatus_Finalized
15 | | HydraHeadStatus_Error
16 | | HydraHeadStatus_Done
17 | deriving (Show, Eq, Ord, Read, Generic, Enum)
18 |
19 | instance ToJSON HydraHeadStatus
20 | instance FromJSON HydraHeadStatus
21 |
--------------------------------------------------------------------------------
/dep/hydra/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/.obelisk/impl/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/dep/cardano-node/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/dep/flake-compat/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/dep/reflex-gadt-api/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/vessel/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/.obelisk/impl/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/rhyolite/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/dep/bytestring-aeson-orphans/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/dep/cardano-transaction-builder/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/cardano-project/dep/reflex-gadt-api/thunk.nix:
--------------------------------------------------------------------------------
1 | # DO NOT HAND-EDIT THIS FILE
2 | let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3 | if !fetchSubmodules && !private then builtins.fetchTarball {
4 | url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5 | } else (import (builtins.fetchTarball {
6 | url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7 | sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8 | }) {}).fetchFromGitHub {
9 | inherit owner repo rev sha256 fetchSubmodules private;
10 | };
11 | json = builtins.fromJSON (builtins.readFile ./github.json);
12 | in fetch json
--------------------------------------------------------------------------------
/backend/src/Backend.hs:
--------------------------------------------------------------------------------
1 | module Backend where
2 |
3 | import HydraPay
4 | import HydraPay.PortRange
5 | import HydraPay.Database
6 | import HydraPay.Logging
7 | import HydraPay.Cardano.Hydra
8 | import HydraPay.Utils
9 |
10 | import Common.Route
11 |
12 | import qualified HydraPay.Database as Db
13 |
14 | import Control.Exception
15 | import Control.Lens
16 | import Control.Monad
17 | import Network.WebSockets as WS
18 | import Network.WebSockets.Snap as WS
19 | import Obelisk.Route
20 | import Obelisk.Backend
21 | import Reflex.Dom.GadtApi.WebSocket
22 |
23 | import qualified Cardano.Api as Api
24 | import qualified Data.Aeson as Aeson
25 |
26 | backend :: Backend BackendRoute FrontendRoute
27 | backend = Backend
28 | { _backend_run = \serve -> do
29 | runPreviewInstance
30 | , _backend_routeEncoder = fullRouteEncoder
31 | }
32 |
--------------------------------------------------------------------------------
/static/api.js:
--------------------------------------------------------------------------------
1 | console.log("Demo API");
2 |
3 | let socket = new WebSocket("ws://localhost:8000/hydra/api");
4 | let count = 0;
5 |
6 | socket.onopen = e => {
7 | console.log("Opened");
8 | getDevnetAddresses(2);
9 | };
10 |
11 | socket.onmessage = event => {
12 | console.log("Message: ", event.data);
13 | };
14 |
15 | socket.onclose = event => {
16 | console.log("Close");
17 | };
18 |
19 | socket.onerror = error => {
20 | console.log("Error");
21 | };
22 |
23 | function getDevnetAddresses(amount)
24 | {
25 | let payload = { tag: "GetDevnetAddresses", contents: 3 };
26 | let taggedPayload = { tagged_payload: payload, tagged_id: 0 };
27 |
28 | console.log("Payload: ", JSON.stringify(payload));
29 | console.log("Tagged Payload: ", JSON.stringify(taggedPayload));
30 | socket.send(JSON.stringify(taggedPayload));
31 | }
32 |
33 | // getDevnetAddresses(2);
34 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Watch.hs:
--------------------------------------------------------------------------------
1 | module HydraPay.Watch where
2 |
3 | import Control.Monad
4 | import Control.Concurrent
5 | import Control.Monad.IO.Class
6 | import Reflex
7 | import Reflex.FSNotify hiding (wrapWatch, watchDir)
8 | import qualified System.FSNotify as FS
9 |
10 | wrapWatch
11 | :: (MonadIO m, TriggerEvent t m)
12 | => (FS.WatchManager -> pathinfo -> FS.Action -> IO a)
13 | -> FS.WatchConfig
14 | -> pathinfo
15 | -> m (Event t FSEvent, ThreadId)
16 | wrapWatch f cfg path = do
17 | (ev, fire) <- newTriggerEvent
18 | threadId <- liftIO $ forkIO $ FS.withManagerConf cfg $ \mgr -> do
19 | _ <- f mgr path fire
20 | forever $ threadDelay $ 1000 * 1000
21 | pure (ev, threadId)
22 |
23 | watchDir
24 | :: (TriggerEvent t m, MonadIO m)
25 | => FS.WatchConfig
26 | -> FilePath
27 | -> FS.ActionPredicate
28 | -> m (Event t FSEvent, ThreadId)
29 | watchDir cfg path evFilter = wrapWatch (\mgr p action -> FS.watchDir mgr p evFilter action) cfg path
30 |
--------------------------------------------------------------------------------
/livedoc-devnet/bin/prepare-devnet.sh:
--------------------------------------------------------------------------------
1 | # Prepare a "devnet" directory holding credentials, a dummy topology and
2 | # "up-to-date" genesis files. If the directory exists, it is wiped out.
3 | set -e
4 |
5 | BASEDIR=$(realpath $(dirname $(realpath $0))/..)
6 | TARGETDIR="devnet"
7 |
8 | [ -d "$TARGETDIR" ] && { echo "Cleaning up directory $TARGETDIR" ; rm -r $TARGETDIR ; }
9 |
10 | cp -rf "$BASEDIR/config/devnet/" "$TARGETDIR"
11 |
12 | chmod +w -R "$TARGETDIR"
13 |
14 | cp -rf "$BASEDIR/config/credentials" "$TARGETDIR"
15 | chmod +w -R "$TARGETDIR/credentials"
16 |
17 | cp -rf "$BASEDIR/config/protocol-parameters.json" "$TARGETDIR/hydra-protocol-parameters.json"
18 | echo '{"Producers": []}' > "$TARGETDIR/topology.json"
19 | sed -i "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" "$TARGETDIR/genesis-byron.json" && \
20 | sed -i "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" "$TARGETDIR/genesis-shelley.json"
21 |
22 | find $TARGETDIR -type f -exec chmod 0400 {} \;
23 | mkdir "$TARGETDIR/ipc"
24 | echo "Prepared devnet"
25 |
--------------------------------------------------------------------------------
/common/src/Common/Helpers.hs:
--------------------------------------------------------------------------------
1 | -- |
2 |
3 | module Common.Helpers where
4 |
5 | import System.Exit (ExitCode(..))
6 | import Data.Text (Text, pack)
7 |
8 | tShow :: Show a => a -> Text
9 | tShow = pack . show
10 |
11 | headMay :: [a] -> Maybe a
12 | headMay (a:_) = Just a
13 | headMay _ = Nothing
14 |
15 | seconds :: Int -> Int
16 | seconds = (* 1000000)
17 |
18 | -- | Turn a process call like 'readCreateProcessWithExitCode' or 'readProcessWithExitCode' into
19 | -- an Either where success when the ExitCode is ExitSuccess
20 | processAdapter :: Monad m => m (ExitCode, String, String) -> m (Either String String)
21 | processAdapter action = do
22 | (exitCode, out, err) <- action
23 | pure $ case exitCode of
24 | ExitSuccess -> Right out
25 | _ -> Left err
26 |
27 | eitherToMaybe :: Either a b -> Maybe b
28 | eitherToMaybe = either (const Nothing) Just
29 |
30 | mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d
31 | mapBoth f _ (Left x) = Left (f x)
32 | mapBoth _ f (Right x) = Right (f x)
33 |
34 | mapLeft :: (a -> c) -> Either a b -> Either c b
35 | mapLeft f = mapBoth f id
36 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Cardano/Hydra/Tools.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 |
3 | module HydraPay.Cardano.Hydra.Tools where
4 |
5 | import System.Which
6 | import System.Process
7 | import System.Directory
8 | import System.FilePath
9 |
10 | import Control.Monad.IO.Class
11 | import Control.Monad.Trans.Except
12 |
13 | import Data.Text (Text)
14 | import qualified Data.Text as T
15 | import Data.Bifunctor
16 |
17 | import HydraPay.Utils
18 |
19 | hydraToolsPath :: FilePath
20 | hydraToolsPath = $(staticWhich "hydra-tools")
21 |
22 | -- | Generates a pair of hydra keys given a incomplete path like path/to/patternname, it will create path/to/patternname.{vk|sk}
23 | -- the interface mimics the underlying hydra-tools command line, and thus is limited to path/to/patternname.{vk|sk}
24 | hydraKeyGen :: MonadIO m => String -> m (Either Text (FilePath, FilePath))
25 | hydraKeyGen filePattern = fmap (first T.pack) $ runExceptT $ do
26 | liftIO $ createDirectoryIfMissing True $ takeDirectory filePattern
27 | _ <- ExceptT $ eitherReadProcess $ proc hydraToolsPath ["gen-hydra-key", "--output-file", filePattern]
28 | pure (filePattern <> ".vk", filePattern <> ".sk")
29 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/cardano-wallet-coin-selection/default.nix:
--------------------------------------------------------------------------------
1 | # Overlay for having a patched cardano-wallet that only exposes modules
2 | # that are relevant to Coin Selection and building with ghcjs.
3 | { haskellLib, pkgs
4 | }:
5 |
6 | let deps = pkgs.thunkSet ./dep;
7 | in self: super: {
8 |
9 | cardano-wallet-coin-selection = (haskellLib.disableCabalFlag (self.callCabal2nix "cardano-wallet-coin-selection" (deps.cardano-wallet-coin-selection + "/lib/core") {}) "scrypt").override { scrypt = null; };
10 | cardano-wallet = self.callCabal2nix "cardano-wallet" (deps.cardano-wallet-coin-selection + "/lib/shelley") {};
11 | cardano-wallet-test-utils = self.callCabal2nix "cardano-wallet-test-utils" (deps.cardano-wallet-coin-selection + "/lib/test-utils") {};
12 | cardano-numeric = self.callCabal2nix "cardano-numeric" (deps.cardano-wallet-coin-selection + "/lib/numeric") {};
13 | text-class = self.callCabal2nix "text-class" (deps.cardano-wallet-coin-selection + "/lib/text-class") {};
14 | strict-non-empty-containers = self.callCabal2nix "strict-non-empty-containers" (deps.cardano-wallet-coin-selection + "/lib/strict-non-empty-containers") {};
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/common/common.cabal:
--------------------------------------------------------------------------------
1 | name: common
2 | version: 0.1
3 | cabal-version: >= 1.10
4 | build-type: Simple
5 |
6 | library
7 | hs-source-dirs: src
8 | build-depends: base
9 | , obelisk-route
10 | , mtl
11 | , text
12 | , reflex-gadt-api
13 | , aeson
14 | , aeson-gadt-th
15 | , constraints-extras
16 | , containers
17 | , time
18 | , lens
19 | , attoparsec
20 |
21 | default-extensions:
22 | DeriveGeneric
23 | FlexibleContexts
24 | FlexibleInstances
25 | GADTs
26 | LambdaCase
27 | MultiParamTypeClasses
28 | OverloadedStrings
29 | QuantifiedConstraints
30 | RecursiveDo
31 | ScopedTypeVariables
32 | TypeFamilies
33 | UndecidableInstances
34 |
35 | exposed-modules:
36 | Common.Api
37 | Common.Route
38 | Common.Helpers
39 |
40 | Hydra.Types
41 | Hydra.ServerOutput
42 | Hydra.ClientInput
43 | Hydra.Snapshot
44 | -- HydraPay.Api
45 | -- HydraPay.Config
46 |
47 | ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
48 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/genesis-byron.json:
--------------------------------------------------------------------------------
1 | {
2 | "protocolConsts": {
3 | "k": 2160,
4 | "protocolMagic": 42
5 | },
6 | "startTime": 1657186415,
7 | "blockVersionData": {
8 | "scriptVersion": 0,
9 | "slotDuration": "250",
10 | "maxBlockSize": "2000000",
11 | "maxHeaderSize": "2000000",
12 | "maxTxSize": "4096",
13 | "maxProposalSize": "700",
14 | "mpcThd": "20000000000000",
15 | "heavyDelThd": "300000000000",
16 | "updateVoteThd": "1000000000000",
17 | "updateProposalThd": "100000000000000",
18 | "updateImplicit": "10000",
19 | "softforkRule": {
20 | "initThd": "900000000000000",
21 | "minThd": "600000000000000",
22 | "thdDecrement": "50000000000000"
23 | },
24 | "txFeePolicy": {
25 | "summand": "155381000000000",
26 | "multiplier": "43000000000"
27 | },
28 | "unlockStakeEpoch": "18446744073709551615"
29 | },
30 | "bootStakeholders": {
31 | "7a4519c93d7be4577dd85bd524c644e6b809e44eae0457b43128c1c7": 1
32 | },
33 | "heavyDelegation": {},
34 | "nonAvvmBalances": {},
35 | "avvmDistr": {}
36 | }
37 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/kes.skey:
--------------------------------------------------------------------------------
1 | {
2 | "type": "KesSigningKey_ed25519_kes_2^6",
3 | "description": "KES Signing Key",
4 | "cborHex": "590260a199f16b11da6c7f5c1e0f1eb0b9bbe278d3d8f35bfd50d0951c2ff94d0344cd57df5f64c9bac1dd60b4482f9c636168f40737d526625a2ec82f22ec0c72de0013f86ef743a7bba0286db6ddf3d85bf8e49ddbf14d9d3b7ee22f4857c77b740948f84f2e72f6bcf91f405e34ea50a2c53fa4876b43cfce2bcfe87c06a903de8bb33d968ca7930b67d0c23f5cb2d74e422d773ba80e388de384691000d6ba8a9b4dc7d3187f76048fbef9a52b72d80d835bb76eced7c0e0cdc5b58869b73c095dffa01db4ff51765afcead565395a5ed1cf74e5f2134d61076fece21aacd080bbbfaab94125401d7bbc74eafc7e7e3a2235f59dc03d6e332e53d558493a1e22213b92c77b1328ff1b83855da704fc366bf4415490602481d1939136eeaf252c65184912a779d9d94a90e32b72c1877ef60b6d79e707ce5a762acb4bed46436efe4fe62aae50b39068cc508a09427c92791cbcbea44318529cc68d297ca24e1b73b2394c385ec63fcd85ed56eec3de48860a1ec950aad4f91cbf741dbd7bf1d3c278875bd20e31ff5372339f6aa5280ad9b8bf3514889ac44600fe57ca0b535d6dc6b0b981e079595aad186ee0be9b07e837391ab165e4ca406601c876a86e246a3f53311e21199cccc0b080f28d18f4dc6987731e10e4ade00df7c6921c5ef3022b6f49a29ba307a2c8f4bd2ba42fcfa0aad68a2f0ad31fff69a99d3471f9036d3f5817a3edfeff7fc3c14e1151d767aaa043481cfd1a6ee55e8e5d7853ecdaf9da2bb36c716beae8d706bc648a790d4697e1d044a11a49f305ab8bc64a094bd81bda7395fe6f77dd5557c39919dd9bb9cf22a87fe47408ae3ec2247007d015a5"
5 | }
6 |
--------------------------------------------------------------------------------
/hydra-pay/src/Cardano/Api/Extras.hs:
--------------------------------------------------------------------------------
1 | -- | Utils that should really be part of cardano-api
2 |
3 | module Cardano.Api.Extras where
4 |
5 | import qualified Cardano.Api as Api
6 | import qualified Data.Map as Map
7 | import Data.Text (Text)
8 | import qualified Data.Text as T
9 |
10 | txOutToTxOutValue :: Api.TxOut ctx era -> Api.TxOutValue era
11 | txOutToTxOutValue (Api.TxOut _ v _ _) = v
12 |
13 | utxoValue :: Api.UTxO era -> Api.Value
14 | utxoValue (Api.UTxO m) = foldMap (Api.txOutValueToValue . txOutToTxOutValue) $ Map.elems m
15 |
16 | showLovelaceAsAda :: Api.Lovelace -> Text
17 | showLovelaceAsAda l =
18 | let (whole, decimals) = showLovelaceAsAda' l
19 | in whole <> "." <> decimals
20 |
21 | showLovelaceAsAda' :: Api.Lovelace -> (Text, Text)
22 | showLovelaceAsAda' l = (showWithCommas whole, T.pack (show dec))
23 | where
24 | decimals :: Int
25 | decimals = 6
26 |
27 | whole, dec :: Integer
28 | (whole, dec) = fromIntegral l `quotRem` (10^decimals)
29 |
30 | showWithCommas :: Integer -> Text
31 | showWithCommas = T.reverse . T.intercalate "," . T.chunksOf 3 . T.reverse . T.pack . show
32 |
33 | unsafeToAddressAny :: Text -> Api.AddressAny
34 | unsafeToAddressAny txt =
35 | case Api.deserialiseAddress Api.AsAddressAny txt of
36 | Nothing -> error $ "Could not deserialise address: " <> show txt
37 | Just addr -> addr
38 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Types.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 |
3 | module HydraPay.Types where
4 |
5 | import Data.Int
6 | import Data.Text (Text)
7 | import HydraPay.Utils
8 | import Control.Lens
9 | import qualified Cardano.Api as Api
10 |
11 | newtype TxId =
12 | TxId { unTxId :: Text }
13 | deriving (Eq, Show)
14 |
15 | data TxInput = TxInput
16 | { _txInput_hash :: TxId
17 | , _txInput_slot :: Int32
18 | }
19 | deriving (Eq, Show)
20 |
21 | newtype ProxyAddress = ProxyAddress { unProxyAddress :: Api.AddressAny }
22 | deriving (Eq, Ord, Show)
23 |
24 | class ToAddress a where
25 | toAddress :: a -> Api.AddressAny
26 |
27 | instance ToAddress Api.AddressAny where
28 | toAddress = id
29 |
30 | instance ToAddress ProxyAddress where
31 | toAddress = unProxyAddress
32 |
33 | instance Api.HasTypeProxy ProxyAddress where
34 | data AsType ProxyAddress = AsAddressAny
35 | proxyToAsType _ = AsAddressAny
36 |
37 | instance Api.SerialiseAddress ProxyAddress where
38 | serialiseAddress = Api.serialiseAddress . unProxyAddress
39 | deserialiseAddress _ t = fmap ProxyAddress $ Api.deserialiseAddress Api.AsAddressAny t
40 |
41 | makeLenses ''TxInput
42 |
43 | mkTxInput :: TxId -> Int32 -> TxInput
44 | mkTxInput = TxInput
45 |
46 | txInputToText :: TxInput -> Text
47 | txInputToText (TxInput (TxId hash) slot) = hash <> "#" <> tShow slot
48 |
--------------------------------------------------------------------------------
/hydra-pay/src/Cardano/Transaction/CardanoApi.hs:
--------------------------------------------------------------------------------
1 | -- | Some helpers to provide conversion from/to cardano-api to
2 | -- cardano-transaction-builder data types.
3 |
4 | module Cardano.Transaction.CardanoApi where
5 |
6 | import Cardano.Transaction (UTxO(..))
7 | import Data.Map (Map)
8 | import qualified Cardano.Api as Api
9 | import qualified Cardano.Transaction as Tx
10 | import qualified Data.Map as Map
11 | import qualified Data.Text as T
12 |
13 | fromCardanoApiUTxO :: Api.UTxO Api.BabbageEra -> [Tx.UTxO]
14 | fromCardanoApiUTxO (Api.UTxO m) = Map.elems $ Map.mapWithKey go m
15 | where
16 | go (Api.TxIn txId (Api.TxIx txIndex)) (Api.TxOut _ val _ _) =
17 | Tx.UTxO
18 | { utxoIndex = fromIntegral txIndex
19 | , utxoTx = T.unpack $ Api.serialiseToRawBytesHexText txId
20 | , utxoValue = fromCardanoApiValue $ Api.txOutValueToValue val
21 | , utxoDatum = Tx.UTxO_NoDatum
22 | }
23 |
24 | fromCardanoApiValue :: Api.Value -> Tx.Value
25 | fromCardanoApiValue v = Tx.Value $ Map.unionsWith (Map.unionWith (+)) $ uncurry fromValueList <$> valList
26 | where
27 | fromValueList :: Api.AssetId -> Api.Quantity -> Map String (Map String Integer)
28 | fromValueList a (Api.Quantity q) = case a of
29 | Api.AdaAssetId -> Map.singleton "" $ Map.singleton "" q
30 | Api.AssetId p n -> Map.singleton (show p) $ Map.singleton (show n) q
31 | valList = Api.valueToList v
32 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Cardano/Hydra/RunningHead.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 |
3 | module HydraPay.Cardano.Hydra.RunningHead where
4 |
5 | import Control.Concurrent
6 | import Control.Concurrent.STM
7 | import Data.Map (Map)
8 | import System.IO
9 | import System.Process
10 |
11 | import HydraPay.Types
12 | import HydraPay.Cardano.Hydra.Api
13 | import HydraPay.PortRange
14 |
15 | -- | A running Hydra Head
16 | data RunningHydraHead = RunningHydraHead
17 | { _hydraHead_handles :: Map ProxyAddress HydraNode
18 | }
19 |
20 | type ProcessInfo = (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
21 |
22 | data HydraNode = HydraNode
23 | { _hydraNode_port :: Port
24 | , _hydraNode_apiPort :: Port
25 | , _hydraNode_processInfo :: TMVar ProcessInfo
26 | , _hydraNode_communicationThread :: TMVar ThreadId
27 | , _hydraNode_status :: TVar HydraNodeStatus
28 | , _hydraNode_runnerThread :: ThreadId
29 | , _hydraNode_inputs :: TBQueue ClientInput
30 | , _hydraNode_outputs :: TChan ServerOutput
31 | }
32 |
33 | data HydraNodeStatus
34 | = HydraNodeStatus_Unavailable
35 | | HydraNodeStatus_Replaying
36 | | HydraNodeStatus_Replayed
37 | | HydraNodeStatus_PeersConnected
38 | | HydraNodeStatus_Closed
39 | deriving (Eq, Show)
40 |
41 | data HydraNodeRequest = HydraNodeRequest
42 | { _hydraNodeRequest_id :: Int
43 | , _hydraNodeRequest_clientInput :: ClientInput
44 | , _hydraNodeRequest_mailbox :: TMVar ServerOutput
45 | }
46 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Path.hs:
--------------------------------------------------------------------------------
1 | -- | Paths used by app.
2 |
3 | module HydraPay.Path where
4 |
5 | bankAddrPath :: FilePath
6 | bankAddrPath = "./bank.addr"
7 |
8 | bankVkPath :: FilePath
9 | bankVkPath = "./config/backend/bank.cardano.vk"
10 |
11 | bankSkPath :: FilePath
12 | bankSkPath = "./config/backend/bank.cardano.sk"
13 |
14 | hydraChainGenesisShelley :: FilePath
15 | hydraChainGenesisShelley = "config/backend/hydra/genesis-shelley.json"
16 |
17 | hydraChainProtocolParameters :: FilePath
18 | hydraChainProtocolParameters = "config/backend/hydra/protocol-parameters.json"
19 |
20 | hydraPayDb :: FilePath
21 | hydraPayDb = "hydra-pay-db"
22 |
23 | mkNodeDb :: FilePath -> FilePath
24 | mkNodeDb prefix = prefix <> "-node-db"
25 |
26 | previewChainConfig :: FilePath
27 | previewChainConfig = "config/preview/config.json"
28 |
29 | previewChainTopology :: FilePath
30 | previewChainTopology = "config/preview/topology.json"
31 |
32 | sanchonetChainConfig :: FilePath
33 | sanchonetChainConfig = "config/sanchonet/config.json"
34 |
35 | sanchonetChainTopology :: FilePath
36 | sanchonetChainTopology = "config/sanchonet/topology.json"
37 |
38 | preprodChainConfig :: FilePath
39 | preprodChainConfig = "config/preprod/config.json"
40 |
41 | preprodChainTopology :: FilePath
42 | preprodChainTopology = "config/preprod/topology.json"
43 |
44 | mainnetChainConfig :: FilePath
45 | mainnetChainConfig = "config/mainnet/config.json"
46 |
47 | mainnetChainTopology :: FilePath
48 | mainnetChainTopology = "config/mainnet/topology.json"
49 |
--------------------------------------------------------------------------------
/hydra-pay-core/hydra-pay-core.cabal:
--------------------------------------------------------------------------------
1 | name: hydra-pay-core
2 | version: 1.1.2
3 | cabal-version: >=1.10
4 | build-type: Simple
5 |
6 | library
7 | hs-source-dirs: src
8 | build-depends:
9 | aeson
10 | , aeson-gadt-th
11 | , base
12 | , beam-core
13 | , bytestring
14 | , cardano-addresses
15 | , cardano-api
16 | , cardano-ledger-core
17 | , constraints-extras
18 | , containers
19 | , directory
20 | , hexstring
21 | , lens
22 | , mtl
23 | , network
24 | , process
25 | , stm
26 | , text
27 | , time
28 | , transformers
29 |
30 | default-extensions:
31 | ConstraintKinds
32 | DataKinds
33 | DeriveGeneric
34 | DerivingStrategies
35 | FlexibleContexts
36 | FlexibleInstances
37 | GADTs
38 | LambdaCase
39 | MultiParamTypeClasses
40 | OverloadedStrings
41 | QuantifiedConstraints
42 | RankNTypes
43 | RecursiveDo
44 | ScopedTypeVariables
45 | TypeApplications
46 | TypeFamilies
47 | UndecidableInstances
48 |
49 | exposed-modules:
50 | HydraPay.Cardano.Hydra.Api
51 | HydraPay.Cardano.Hydra.Status
52 | HydraPay.Cardano.Hydra.Api.ClientInput
53 | HydraPay.Cardano.Hydra.ChainConfig
54 | HydraPay.Cardano.Hydra.RunningHead
55 | HydraPay.Logging
56 | HydraPay.Orphans
57 | HydraPay.PaymentChannel
58 | HydraPay.PortRange
59 | HydraPay.Types
60 | HydraPay.Utils
61 |
62 | ghc-options:
63 | -Wall -Wredundant-constraints -Wincomplete-uni-patterns
64 | -Wincomplete-record-updates -O -fno-show-valid-hole-fits
65 |
--------------------------------------------------------------------------------
/frontend/frontend.cabal:
--------------------------------------------------------------------------------
1 | name: frontend
2 | version: 0.1
3 | cabal-version: >= 1.10
4 | build-type: Simple
5 |
6 | library
7 | hs-source-dirs: src
8 | build-depends: base
9 | , common
10 | , obelisk-frontend
11 | , obelisk-route
12 | , jsaddle
13 | , aeson-pretty
14 | , reflex-dom-core
15 | , obelisk-executable-config-lookup
16 | , obelisk-generated-static
17 | , text
18 | , reflex-gadt-api
19 | , string-interpolate
20 | , containers
21 | , aeson
22 | , bytestring
23 | , witherable
24 | , transformers
25 | , time
26 | , lens
27 | , random
28 | default-extensions:
29 | RecursiveDo
30 | RankNTypes
31 | FlexibleContexts
32 | PartialTypeSignatures
33 | ScopedTypeVariables
34 | OverloadedStrings
35 | TypeFamilies
36 | RecursiveDo
37 | LambdaCase
38 | exposed-modules:
39 | Frontend
40 | ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
41 |
42 | executable frontend
43 | main-is: main.hs
44 | hs-source-dirs: src-bin
45 | build-depends: base
46 | , common
47 | , obelisk-frontend
48 | , obelisk-route
49 | , reflex-dom
50 | , obelisk-generated-static
51 | , frontend
52 | ghc-options: -threaded -O -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -fno-show-valid-hole-fits
53 | if impl(ghcjs)
54 | ghc-options: -dedupe
55 | cpp-options: -DGHCJS_BROWSER
56 | if os(darwin)
57 | ghc-options: -dynamic
58 |
--------------------------------------------------------------------------------
/backend/src/ParseConfig.hs:
--------------------------------------------------------------------------------
1 | module ParseConfig where
2 |
3 | import Options.Applicative
4 | import Data.Maybe (fromMaybe)
5 | import HydraPay.Config
6 |
7 | -- | Obelisk's 'ob run' passes a "--quiet". This parser
8 | -- transformer ignores "--quiet".
9 | ignoreObeliskRunArgs :: Parser a -> Parser a
10 | ignoreObeliskRunArgs p =
11 | (\_ a -> a) <$> switch (long "quiet" <> hidden) <*> p
12 |
13 |
14 | -- | Unless specified otherwise the default is 'ManagedDevnet'.
15 | hydraPayConfigParser :: Parser HydraPayConfig
16 | hydraPayConfigParser =
17 | ignoreObeliskRunArgs
18 | $ HydraPayConfig
19 | <$> (fromMaybe ManagedDevnetMode <$> optional netConfigParser)
20 | <*> (fromMaybe 8000 <$> optional (option auto (long "port" <> help "Port to use for the WebSocket endpoint and live documentation page")))
21 | <*> (fromMaybe "0.0.0.0" <$> optional (strOption (long "bind" <> help "Address or hostname to bind to")))
22 |
23 | netConfigParser :: Parser HydraPayMode
24 | netConfigParser =
25 | flag' ManagedDevnetMode (long "manage-devnet" <> help "Have Hydra Pay start a Cardano devnet. The socket and configuration can be found in the livedoc-devnet directory while it's running.")
26 | <|> (uncurry ConfiguredMode <$> nodeParamsParser)
27 |
28 | nodeParamsParser :: Parser (CardanoNodeParams, HydraNodeParams)
29 | nodeParamsParser =
30 | (,)
31 | <$>
32 | (CardanoNodeParams
33 | <$> option auto (long "testnet-magic")
34 | <*> strOption (long "node-socket")
35 | <*> strOption (long "ledger-genesis"))
36 | <*>
37 | (HydraNodeParams
38 | <$> strOption (long "hydra-scripts-tx-id")
39 | <*> strOption (long "hydra-ledger-protocol-parameters")
40 | <*> strOption (long "hydra-ledger-genesis"))
41 |
42 | getHydraCLIConfig :: IO HydraPayConfig
43 | getHydraCLIConfig = execParser (info (hydraPayConfigParser <**> helper) fullDesc)
44 |
--------------------------------------------------------------------------------
/release.nix:
--------------------------------------------------------------------------------
1 | (builtins.mapAttrs (system: _: (import ./. { inherit system; }).hydra-pay)
2 | { "x86_64-linux" = null;
3 | })
4 | //
5 | (let
6 | self = import ./. {};
7 | obelisk = import ./.obelisk/impl {
8 | system = builtins.currentSystem;
9 | };
10 | nixpkgs = obelisk.nixpkgs;
11 | pkgs = import {};
12 |
13 | configs = pkgs.stdenv.mkDerivation
14 | {
15 | name = "configs";
16 | src = ./config;
17 |
18 | installPhase = ''
19 | mkdir -p $out
20 | cp -r * $out
21 | '';
22 | };
23 | in
24 | {
25 | dockerImage = args@{ version ? "latest", name ? "obsidiansys/hydra-pay" }:
26 | pkgs.dockerTools.buildImage ({
27 | name = name;
28 | tag = version;
29 |
30 | keepContentsDirlinks = true;
31 |
32 | copyToRoot = pkgs.buildEnv {
33 | name = "root";
34 | paths = [ self.hydra-pay nixpkgs.bashInteractive nixpkgs.iana-etc
35 | nixpkgs.cacert];
36 | pathsToLink = [ "/bin" ];
37 | };
38 |
39 | runAsRoot = ''
40 | #!${nixpkgs.runtimeShell}
41 | ${nixpkgs.dockerTools.shadowSetup}
42 | mkdir -p hydra-pay/config
43 | ln -sft /hydra-pay/config '${configs}'/*
44 | groupadd -r hydra-pay
45 | useradd -r -g hydra-pay hydra-pay
46 | chown -R hydra-pay:hydra-pay /hydra-pay
47 | '';
48 |
49 | config = {
50 | Env = [
51 | ("PATH=" + builtins.concatStringsSep(":")(
52 | [
53 | "/hydrapay"
54 | "/bin"
55 | ]
56 | ++
57 | map (pkg: "${pkg}/bin") nixpkgs.stdenv.initialPath # put common tools in path so docker exec is useful
58 | ))
59 | "LANG=C.UTF-8"
60 | "NETWORK=preprod"
61 | ];
62 |
63 | Cmd = [ "sh" "-c" "/bin/hydra-pay instance $NETWORK" ];
64 | WorkingDir = "/hydra-pay";
65 | Expose = 8010;
66 | User = "hydra-pay:hydra-pay";
67 | };
68 | });
69 | })
70 |
--------------------------------------------------------------------------------
/config/sanchonet/shelley-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "activeSlotsCoeff": 5.0e-2,
3 | "epochLength": 86400,
4 | "genDelegs": {
5 | "c1ad22cabb342cbb83ce3859708232f4945ccb669e9b5f932cffc0ed": {
6 | "delegate": "405357b552c397e81f73dcb5a0da0828fe29610bd25197d86130df34",
7 | "vrf": "458215df6c07abc66e80082caa7a189dc2f4995ad4b4b5f09481a55d8d0692d2"
8 | },
9 | "c264bca994a3a5deee5a1d9b92a3d7e9d6cbdb81f2f6989bb7f7b437": {
10 | "delegate": "d9d9d0f0e1f25c4af4d80cb2d62878b611d8b3a8e1ef548d01f246d7",
11 | "vrf": "624f1bf3b2f978e0c95644f26228b307d7acca7fc7eb3d88fb6f107e0aa1198c"
12 | },
13 | "d4bf7eb45b72dffa5ac33d5c902fe409e4e611f2e9a52fb0d09784c3": {
14 | "delegate": "806eb0c17d9b0fe6d99acbabe7be76ef72bf9de96c5b58435e50837f",
15 | "vrf": "57e52289207a7128c29e0b7e96a02c731a961a5944329b363bed751ad8f377ee"
16 | }
17 | },
18 | "initialFunds": {},
19 | "maxKESEvolutions": 62,
20 | "maxLovelaceSupply": 45000000000000000,
21 | "networkId": "Testnet",
22 | "networkMagic": 4,
23 | "protocolParams": {
24 | "a0": 0.3,
25 | "decentralisationParam": 1.0,
26 | "eMax": 18,
27 | "extraEntropy": {
28 | "tag": "NeutralNonce"
29 | },
30 | "keyDeposit": 2000000,
31 | "maxBlockBodySize": 65536,
32 | "maxBlockHeaderSize": 1100,
33 | "maxTxSize": 16384,
34 | "minFeeA": 44,
35 | "minFeeB": 155381,
36 | "minPoolCost": 340000000,
37 | "minUTxOValue": 1000000,
38 | "nOpt": 150,
39 | "poolDeposit": 500000000,
40 | "protocolVersion": {
41 | "major": 6,
42 | "minor": 0
43 | },
44 | "rho": 3.0e-3,
45 | "tau": 0.2
46 | },
47 | "securityParam": 432,
48 | "slotLength": 1,
49 | "slotsPerKESPeriod": 129600,
50 | "staking": {
51 | "pools": {},
52 | "stake": {}
53 | },
54 | "systemStart": "2023-06-15T00:30:00Z",
55 | "updateQuorum": 3
56 | }
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Bank.hs:
--------------------------------------------------------------------------------
1 | -- | Bank is the middleman
2 |
3 | {-# LANGUAGE TemplateHaskell #-}
4 | module HydraPay.Bank where
5 |
6 | import HydraPay.Path
7 | import qualified Cardano.Api as Api
8 | import Cardano.Api.Extras
9 | import Control.Lens
10 | import Control.Monad
11 | import Control.Monad.IO.Class
12 | import Control.Monad.Trans.Except
13 | import qualified Data.Text.IO as T
14 | import System.Directory
15 |
16 | import HydraPay.Cardano.Cli
17 | import HydraPay.Cardano.Node
18 | import HydraPay.Logging
19 |
20 | -- Account we get money from
21 | data Bank = Bank
22 | { _bank_address :: Api.AddressAny
23 | , _bank_verificationKey :: FilePath
24 | , _bank_signingKey :: FilePath
25 | }
26 |
27 | -- | Create or fetch the existing bank address
28 | getBank :: (MonadIO m, HasLogger a, HasNodeInfo a) => a -> m Bank
29 | getBank a = liftIO $ do
30 | exists <- bankExists
31 | result <- runExceptT $ case exists of
32 | True -> do
33 | logInfo a "getBank" "Getting bank information from config"
34 | addr <- liftIO (doesFileExist bankAddrPath) >>= \case
35 | True -> do
36 | addr <- liftIO $ T.readFile bankAddrPath
37 | pure $ unsafeToAddressAny addr
38 | False -> do
39 | addr <- ExceptT $ runCardanoCli a $ buildAddress bankVkPath
40 | liftIO $ T.writeFile bankAddrPath $ Api.serialiseAddress addr
41 | logInfo a "getBank" "Bank address cached for faster startup"
42 | pure addr
43 | logInfo a "getBank" $ "Bank Address: " <> Api.serialiseAddress addr
44 | pure $ Bank addr bankVkPath bankSkPath
45 | False -> do
46 | logInfo a "getBank" "Generating new bank address"
47 | _ <- ExceptT $ runCardanoCli a $ keyGen $ keyGenFiles bankVkPath bankSkPath
48 | addr <- ExceptT $ runCardanoCli a $ buildAddress bankVkPath
49 | pure $ Bank addr bankVkPath bankSkPath
50 | case result of
51 | Left _ -> error "Failed to create bank credentials"
52 | Right info -> pure info
53 |
54 | bankExists :: MonadIO m => m Bool
55 | bankExists =
56 | liftIO $ foldM (\b a -> doesFileExist a >>= (\x -> pure $ b && x)) True [bankVkPath, bankSkPath]
57 |
58 | makeLenses ''Bank
59 |
--------------------------------------------------------------------------------
/cardano-project/cardano-overlays/default.nix:
--------------------------------------------------------------------------------
1 | { haskellLib, pkgs, lib }:
2 |
3 | let
4 | deps = pkgs.thunkSet ./dep;
5 | in rec {
6 |
7 | optionalExtension = cond: overlay: if cond then overlay else _: _: {};
8 | foldExtensions = lib.foldr lib.composeExtensions (_: _: {});
9 |
10 | combined = self: super: foldExtensions [
11 | cardanoPackages
12 | (optionalExtension (!(super.ghc.isGhcjs or false)) ghc)
13 | (optionalExtension (super.ghc.isGhcjs or false) ghcjs)
14 |
15 | (optionalExtension (with pkgs.stdenv; !(super.ghc.isGhcjs or false) && hostPlatform != buildPlatform) loadSplices-8_10)
16 |
17 | # (optionalExtension (pkgs.stdenv.hostPlatform.useAndroidPrebuilt or false) android)
18 | (optionalExtension true android)
19 | (optionalExtension (pkgs.stdenv.hostPlatform.isiOS or false) ios)
20 |
21 | ] self super;
22 |
23 | cardanoPackages = import ./cardano-packages {
24 | inherit haskellLib pkgs lib;
25 | };
26 |
27 | cardanoWalletCoinSelection = import ./cardano-wallet-coin-selection {
28 | inherit haskellLib pkgs;
29 | };
30 |
31 | ghc = self: super: {
32 | # cardano-crypto-class = haskellLib.addPkgconfigDepend super.cardano-crypto-class libsodium-vrf;
33 | # cardano-crypto-praos = haskellLib.addPkgconfigDepend super.cardano-crypto-praos libsodium-vrf;
34 | };
35 |
36 | ghcjs = import ./ghcjs.nix {
37 | inherit haskellLib pkgs lib;
38 | };
39 |
40 | loadSplices-8_10 = self: super: {
41 | flat = haskellLib.dontCheck super.flat;
42 | };
43 |
44 | android = self: super: {
45 | # this ensures same libsodium as ghc is used
46 | # cardano-crypto-class =
47 | # haskellLib.overrideCabal (super.cardano-crypto-class.override { libsodium = libsodium-vrf; }) (drv: {
48 | # buildTools = [pkgs.pkg-config];
49 | # });
50 | # # this ensures same libsodium as ghc is used
51 | # cardano-crypto-praos = haskellLib.overrideCabal (super.cardano-crypto-praos.override { libsodium = libsodium-vrf; }) (drv: {
52 | # buildTools = [pkgs.pkg-config];
53 | # });
54 |
55 | terminal-size = self.callCabal2nix "terminal-size" (pkgs.hackGet ./dep/terminal-size) {};
56 |
57 | };
58 |
59 | ios = self: super: {
60 |
61 | };
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/config/backend/hydra/genesis-shelley.json:
--------------------------------------------------------------------------------
1 | {
2 | "epochLength": 432000,
3 | "activeSlotsCoeff": 1.0,
4 | "slotLength": 0.1,
5 | "securityParam": 2160,
6 | "genDelegs": {},
7 | "initialFunds": {
8 | "00813c32c92aad21770ff8001de0918f598df8c06775f77f8e8839d2a0074a515f7f32bf31a4f41c7417a8136e8152bfb42f06d71b389a6896": 900000000000,
9 | "609783be7d3c54f11377966dfabc9284cd6c32fca1cd42ef0a4f1cc45b": 900000000000
10 | },
11 | "maxKESEvolutions": 60,
12 | "maxLovelaceSupply": 2000000000000,
13 | "networkId": "Testnet",
14 | "networkMagic": 42,
15 | "protocolParams": {
16 | "a0": 0.0,
17 | "decentralisationParam": 0,
18 | "eMax": 18,
19 | "extraEntropy": {
20 | "tag": "NeutralNonce"
21 | },
22 | "keyDeposit": 0,
23 | "maxBlockBodySize": 65536,
24 | "maxBlockHeaderSize": 1100,
25 | "maxTxSize": 16384,
26 | "minFeeA": 44,
27 | "minFeeB": 155381,
28 | "minPoolCost": 0,
29 | "minUTxOValue": 0,
30 | "nOpt": 100,
31 | "poolDeposit": 0,
32 | "protocolVersion": {
33 | "major": 7,
34 | "minor": 0
35 | },
36 | "rho": 0.1,
37 | "tau": 0.1
38 | },
39 | "slotsPerKESPeriod": 129600,
40 | "staking": {
41 | "pools": {
42 | "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60": {
43 | "cost": 0,
44 | "margin": 0.0,
45 | "metadata": null,
46 | "owners": [],
47 | "pledge": 0,
48 | "publicKey": "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60",
49 | "relays": [],
50 | "rewardAccount": {
51 | "credential": {
52 | "key hash": "b6ffb20cf821f9286802235841d4348a2c2bafd4f73092b7de6655ea"
53 | },
54 | "network": "Testnet"
55 | },
56 | "vrf": "fec17ed60cbf2ec5be3f061fb4de0b6ef1f20947cfbfce5fb2783d12f3f69ff5"
57 | }
58 | },
59 | "stake": {
60 | "074a515f7f32bf31a4f41c7417a8136e8152bfb42f06d71b389a6896": "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60"
61 | }
62 | },
63 | "systemStart": "2022-07-07T09:33:35Z",
64 | "updateQuorum": 2
65 | }
66 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/genesis-shelley.json:
--------------------------------------------------------------------------------
1 | {
2 | "epochLength": 432000,
3 | "activeSlotsCoeff": 1.0,
4 | "slotLength": 0.1,
5 | "securityParam": 2160,
6 | "genDelegs": {},
7 | "initialFunds": {
8 | "00813c32c92aad21770ff8001de0918f598df8c06775f77f8e8839d2a0074a515f7f32bf31a4f41c7417a8136e8152bfb42f06d71b389a6896": 900000000000,
9 | "609783be7d3c54f11377966dfabc9284cd6c32fca1cd42ef0a4f1cc45b": 900000000000
10 | },
11 | "maxKESEvolutions": 60,
12 | "maxLovelaceSupply": 2000000000000,
13 | "networkId": "Testnet",
14 | "networkMagic": 42,
15 | "protocolParams": {
16 | "a0": 0.0,
17 | "decentralisationParam": 0,
18 | "eMax": 18,
19 | "extraEntropy": {
20 | "tag": "NeutralNonce"
21 | },
22 | "keyDeposit": 0,
23 | "maxBlockBodySize": 65536,
24 | "maxBlockHeaderSize": 1100,
25 | "maxTxSize": 16384,
26 | "minFeeA": 44,
27 | "minFeeB": 155381,
28 | "minPoolCost": 0,
29 | "minUTxOValue": 0,
30 | "nOpt": 100,
31 | "poolDeposit": 0,
32 | "protocolVersion": {
33 | "major": 7,
34 | "minor": 0
35 | },
36 | "rho": 0.1,
37 | "tau": 0.1
38 | },
39 | "slotsPerKESPeriod": 129600,
40 | "staking": {
41 | "pools": {
42 | "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60": {
43 | "cost": 0,
44 | "margin": 0.0,
45 | "metadata": null,
46 | "owners": [],
47 | "pledge": 0,
48 | "publicKey": "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60",
49 | "relays": [],
50 | "rewardAccount": {
51 | "credential": {
52 | "key hash": "b6ffb20cf821f9286802235841d4348a2c2bafd4f73092b7de6655ea"
53 | },
54 | "network": "Testnet"
55 | },
56 | "vrf": "fec17ed60cbf2ec5be3f061fb4de0b6ef1f20947cfbfce5fb2783d12f3f69ff5"
57 | }
58 | },
59 | "stake": {
60 | "074a515f7f32bf31a4f41c7417a8136e8152bfb42f06d71b389a6896": "8a219b698d3b6e034391ae84cee62f1d76b6fbc45ddfe4e31e0d4b60"
61 | }
62 | },
63 | "systemStart": "2022-07-07T09:33:35Z",
64 | "updateQuorum": 2
65 | }
66 |
--------------------------------------------------------------------------------
/cardano-project/extras.nix:
--------------------------------------------------------------------------------
1 | args@{ rpSetup, obelisk, ... }:
2 | {
3 | haskellOverlaysPre = let deps = rpSetup.nixpkgs.thunkSet ./cardano-overlays/cardano-packages/dep; in [
4 | (self: super:
5 | let
6 | pkgs = self.callPackage ({ pkgs }: pkgs) {};
7 | haskellLib = pkgs.haskell.lib;
8 | in
9 | {
10 | time-compat = haskellLib.dontCheck super.time-compat;
11 | text-short = super.text-short;
12 | quickcheck-instances = haskellLib.doJailbreak super.quickcheck-instances;
13 |
14 | # https://github.com/input-output-hk/plutus/pull/4413
15 | # Stubs out unused functionality that breaks 32-bit build
16 | plutus-core = haskellLib.overrideCabal super.plutus-core (drv: {
17 | doCheck = false;
18 | doHaddock = false;
19 | doBenchmark = false;
20 | preConfigure = ''
21 | substituteInPlace plutus-core/src/GHC/Natural/Extras.hs \
22 | --replace "naturalToWord64Maybe n = intCastEq <$> naturalToWordMaybe n" "naturalToWord64Maybe _ = Nothing"
23 |
24 | substituteInPlace plutus-core/src/PlutusCore/Default/Universe.hs \
25 | --replace "intCastEq @Int @Int64" "const @Int64 @Int 0" \
26 | --replace "intCastEq @Int64 @Int" "const @Int @Int64 0"
27 | '';
28 | });
29 | plutus-tx = haskellLib.overrideCabal super.plutus-tx (drv: {
30 | configureFlags = (drv.configureFlags or []) ++ [
31 | # NOTE: see link for details
32 | # https://3.basecamp.com/4757487/buckets/24531883/messages/5274529248
33 | (if pkgs.stdenv.isDarwin
34 | then "--dependency=plutus-core:plutus-core-testlib=plutus-core-1.0.0.0-CG0eKwFyc06A6OsGzUyWcc-plutus-core-testlib"
35 | else "--dependency=plutus-core:plutus-core-testlib=plutus-core-1.0.0.0-ErmoQby7JQH3z6wFaYIRDg-plutus-core-testlib")
36 | ];
37 | });
38 | })
39 | ];
40 | haskellOverlaysPost = let deps = rpSetup.nixpkgs.thunkSet ./cardano-overlays/cardano-packages/dep; in (args.haskellOverlays or []) ++ (args.haskellOverlaysPost or []) ++ [
41 | (self: super:
42 | let
43 | pkgs = self.callPackage ({ pkgs }: pkgs) {};
44 | haskellLib = pkgs.haskell.lib;
45 | in
46 | {
47 | time-compat = haskellLib.dontCheck super.time-compat;
48 | })
49 | ];
50 | }
51 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Transaction.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE RecordWildCards #-}
2 | -- |
3 |
4 | module HydraPay.Transaction where
5 |
6 | import HydraPay.Types
7 | import Control.Lens ((^.), to)
8 | import Control.Monad
9 | import Control.Monad.IO.Class
10 | import qualified Cardano.Api as Api
11 | import Cardano.Transaction hiding (TxId)
12 | import Cardano.Transaction.Eval (evalEither)
13 | import Data.Int (Int32)
14 | import Data.String (fromString)
15 | import Data.Text (Text)
16 | import qualified Data.Text as T
17 | import qualified Data.Text.IO as T
18 | import System.Directory
19 | import System.IO
20 | import System.IO.Temp
21 |
22 | import HydraPay.Cardano.Node
23 |
24 | -- | cardano-cli needs the params in a file, so we just create a temp file we can use for that purpose
25 | withProtocolParamsFile :: T.Text -> (FilePath -> IO a) -> IO a
26 | withProtocolParamsFile pparams action = do
27 | createDirectoryIfMissing True tempTxDir
28 | withTempFile tempTxDir "params" $ \paramsPath handle -> do
29 | hClose handle
30 | T.writeFile paramsPath pparams
31 | action paramsPath
32 |
33 | fanoutToL1Address :: (MonadIO m, HasNodeInfo a) => a -> T.Text -> Api.AddressAny -> FilePath -> Api.AddressAny -> Int32 -> m (Either Text TxId)
34 | fanoutToL1Address a pparams fromAddr skPath toAddr amount = do
35 | liftIO $ withProtocolParamsFile pparams $ \paramsPath -> do
36 | let cfg = mkEvalConfig a paramsPath
37 | (fmap . fmap) (TxId . T.pack) $
38 | evalEither cfg (fanoutToL1AddressTx fromAddr skPath toAddr amount)
39 |
40 | fanoutToL1AddressTx :: Api.AddressAny -> FilePath -> Api.AddressAny -> Int32 -> Tx ()
41 | fanoutToL1AddressTx fromAddr skPath toAddr lovelace = do
42 | Output {..} <- output (addressString toAddr) (fromString $ show lovelace <> " lovelace")
43 | void $ selectInputs oValue fromStr
44 | changeAddress fromStr
45 | void $ balanceNonAdaAssets fromStr
46 | sign skPath
47 | where
48 | fromStr = addressString fromAddr
49 |
50 | tempTxDir :: FilePath
51 | tempTxDir = "tx"
52 |
53 | -- | Given node information and a path to the protocol parameters create an EvalConfig for running the Tx monad
54 | mkEvalConfig :: HasNodeInfo a => a -> FilePath -> EvalConfig
55 | mkEvalConfig a ppFp = EvalConfig Nothing (ni ^. nodeInfo_magic . to (Just . fromIntegral)) (Just ppFp) False (Just (ni ^. nodeInfo_socketPath))
56 | where
57 | ni = a ^. nodeInfo
58 |
59 | addressString :: ToAddress a => a -> String
60 | addressString = T.unpack . Api.serialiseAddress . toAddress
61 |
--------------------------------------------------------------------------------
/livedoc-devnet/config/devnet/cardano-node.json:
--------------------------------------------------------------------------------
1 | {
2 | "Protocol": "Cardano",
3 |
4 | "ByronGenesisFile": "genesis-byron.json",
5 | "ShelleyGenesisFile": "genesis-shelley.json",
6 | "AlonzoGenesisFile": "genesis-alonzo.json",
7 |
8 | "ApplicationName": "cardano-sl",
9 | "ApplicationVersion": 1,
10 | "MaxKnownMajorProtocolVersion": 2,
11 | "LastKnownBlockVersion-Alt": 0,
12 | "LastKnownBlockVersion-Major": 6,
13 | "LastKnownBlockVersion-Minor": 0,
14 |
15 | "TestShelleyHardForkAtEpoch": 0,
16 | "TestAllegraHardForkAtEpoch": 0,
17 | "TestMaryHardForkAtEpoch": 0,
18 | "TestAlonzoHardForkAtEpoch": 0,
19 | "TestBabbageHardForkAtEpoch": 0,
20 |
21 | "RequiresNetworkMagic": "RequiresNoMagic",
22 |
23 | "minSeverity": "Info",
24 | "defaultBackends": ["KatipBK"],
25 | "defaultScribes": [[ "StdoutSK", "stdout" ]],
26 | "setupBackends": ["KatipBK"],
27 | "setupScribes": [
28 | {
29 | "scFormat": "ScJson",
30 | "scKind": "StdoutSK",
31 | "scName": "stdout",
32 | "scRotation": null
33 | }
34 | ],
35 |
36 | "TurnOnLogMetrics": true,
37 | "TurnOnLogging": true,
38 |
39 | "TracingVerbosity": "NormalVerbosity",
40 | "TraceBlockFetchClient": false,
41 | "TraceBlockFetchDecisions": false,
42 | "TraceBlockFetchProtocol": false,
43 | "TraceBlockFetchProtocolSerialised": false,
44 | "TraceBlockFetchServer": false,
45 | "TraceChainDb": true,
46 | "TraceChainSyncBlockServer": false,
47 | "TraceChainSyncClient": false,
48 | "TraceChainSyncHeaderServer": false,
49 | "TraceChainSyncProtocol": false,
50 | "TraceDNSResolver": false,
51 | "TraceDNSSubscription": false,
52 | "TraceErrorPolicy": false,
53 | "TraceForge": true,
54 | "TraceHandshake": false,
55 | "TraceIpSubscription": false,
56 | "TraceLocalChainSyncProtocol": true,
57 | "TraceLocalErrorPolicy": false,
58 | "TraceLocalHandshake": false,
59 | "TraceLocalTxSubmissionProtocol": true,
60 | "TraceLocalTxSubmissionServer": true,
61 | "TraceMempool": true,
62 | "TraceMux": false,
63 | "TraceTxInbound": false,
64 | "TraceTxOutbound": false,
65 | "TraceTxSubmissionProtocol": false,
66 |
67 | "options": {
68 | "mapBackends": {
69 | "cardano.node.metrics": [ "EKGViewBK" ],
70 | "cardano.node.resources": [ "EKGViewBK" ]
71 | },
72 | "mapSubtrace": {
73 | "cardano.node.metrics": { "subtrace": "Neutral" }
74 | }
75 | },
76 |
77 | "TestEnableDevelopmentHardForkEras": true,
78 | "TestEnableDevelopmentNetworkProtocols": true
79 | }
80 |
--------------------------------------------------------------------------------
/common/src/Common/Route.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE ConstraintKinds #-}
2 | {-# LANGUAGE EmptyCase #-}
3 | {-# LANGUAGE TypeOperators #-}
4 | {-# LANGUAGE FlexibleContexts #-}
5 | {-# LANGUAGE FlexibleInstances #-}
6 | {-# LANGUAGE GADTs #-}
7 | {-# LANGUAGE LambdaCase #-}
8 | {-# LANGUAGE MultiParamTypeClasses #-}
9 | {-# LANGUAGE OverloadedStrings #-}
10 | {-# LANGUAGE RankNTypes #-}
11 | {-# LANGUAGE TemplateHaskell #-}
12 | {-# LANGUAGE TypeFamilies #-}
13 |
14 | module Common.Route where
15 |
16 | -- You will probably want these imports for composing Encoders.
17 | import Prelude hiding (id, (.))
18 |
19 | import Data.Text (Text)
20 | import Data.Functor.Identity
21 |
22 | import Obelisk.Route
23 | import Obelisk.Route.TH
24 |
25 | import Control.Monad.Except
26 |
27 | data BackendRoute :: * -> * where
28 | -- | Used to handle unparseable routes.
29 | BackendRoute_Missing :: BackendRoute ()
30 | BackendRoute_Api :: BackendRoute ()
31 | BackendRoute_HydraPay :: BackendRoute (R HydraPayRoute)
32 | -- You can define any routes that will be handled specially by the backend here.
33 | -- i.e. These do not serve the frontend, but do something different, such as serving static files.
34 |
35 | data HydraPayRoute :: * -> * where
36 | HydraPayRoute_Api :: HydraPayRoute ()
37 |
38 | hydraPayRouteEncoder ::( MonadError Text check
39 | , MonadError Text parse
40 | )
41 | => Encoder check parse (R HydraPayRoute) PageName
42 | hydraPayRouteEncoder = pathComponentEncoder $ \case
43 | HydraPayRoute_Api -> PathSegment "api" $ unitEncoder mempty
44 |
45 | data FrontendRoute :: * -> * where
46 | -- This is for managing Hydra Pay
47 | FrontendRoute_Monitor :: FrontendRoute ()
48 |
49 | -- This type is used to define frontend routes, i.e. ones for which the backend will serve the frontend.
50 |
51 | fullRouteEncoder
52 | :: Encoder (Either Text) Identity (R (FullRoute BackendRoute FrontendRoute)) PageName
53 | fullRouteEncoder = mkFullRouteEncoder
54 | (FullRoute_Backend BackendRoute_Missing :/ ())
55 | (\case
56 | BackendRoute_Missing -> PathSegment "missing" $ unitEncoder mempty
57 | BackendRoute_Api -> PathSegment "api" $ unitEncoder mempty
58 | BackendRoute_HydraPay -> PathSegment "hydra" hydraPayRouteEncoder
59 | )
60 | (\case
61 | FrontendRoute_Monitor -> PathEnd $ unitEncoder mempty
62 | )
63 |
64 | concat <$> mapM deriveRouteComponent
65 | [ ''BackendRoute
66 | , ''FrontendRoute
67 | , ''HydraPayRoute
68 | ]
69 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Cardano/Hydra/Api/ClientInput.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE NamedFieldPuns #-}
2 | {-# LANGUAGE GeneralizedNewtypeDeriving #-}
3 |
4 | module HydraPay.Cardano.Hydra.Api.ClientInput where
5 |
6 | import Control.Lens
7 | import Data.Map (Map)
8 | import Data.Maybe (isJust)
9 | import qualified Cardano.Api as Api
10 | import GHC.Generics
11 | import Data.Aeson as Aeson
12 | import Data.Text (Text)
13 | import qualified Data.Aeson.KeyMap as KeyMap
14 |
15 | data ClientInput
16 | = Init
17 | | Abort
18 | | Commit { utxo :: Value }
19 | | NewTx { transaction :: Value }
20 | | GetUTxO
21 | | Close
22 | | Contest
23 | | Fanout
24 | deriving (Generic, Show, Eq)
25 |
26 | instance FromJSON ClientInput
27 | instance ToJSON ClientInput
28 |
29 | data TxOutWithWitness = TxOutWithWitness
30 | { txOut :: Api.TxOut Api.CtxUTxO Api.BabbageEra
31 | , witness :: Maybe ()
32 | -- We aren't bothering with script info, we don't send any
33 | }
34 | deriving stock (Show, Eq, Generic)
35 |
36 | instance ToJSON TxOutWithWitness where
37 | toJSON TxOutWithWitness{txOut, witness} =
38 | case toJSON txOut of
39 | Object km
40 | | isJust witness ->
41 | Object $ km & "witness" `KeyMap.insert` toJSON witness
42 | x -> x
43 |
44 | instance FromJSON TxOutWithWitness where
45 | parseJSON v = do
46 | txOut <- parseJSON v
47 | flip (withObject "TxOutWithWitness") v $ \o -> do
48 | witness <- o .:? "witness"
49 | pure $ TxOutWithWitness{txOut, witness}
50 |
51 |
52 | -- type UTxO = UTxO' (Api.TxOut Api.CtxUTxO Api.BabbageEra)
53 |
54 | -- | Newtype with phantom types mostly required to work around the poor interface
55 | -- of 'Ledger.UTXO' and provide 'Monoid' and 'Foldable' instances to make utxo
56 | -- manipulation bareable.
57 | newtype UTxO' out = UTxO
58 | { toMap :: Map Api.TxIn out
59 | }
60 | deriving newtype
61 | ( Eq
62 | , Show
63 | , Functor
64 | , Foldable
65 | , Semigroup
66 | , Monoid
67 | , ToJSON
68 | , FromJSON
69 | )
70 |
71 | newtype DraftCommitTxRequest = DraftCommitTxRequest
72 | { utxoToCommit :: UTxO' TxOutWithWitness }
73 | -- ^ Ensure we encode a "tag"
74 | deriving stock (Eq, Show, Generic)
75 | deriving newtype (ToJSON, FromJSON)
76 |
77 | newtype DraftCommitTxResponse = DraftCommitTxResponse { commitTx :: Text }
78 | deriving (Generic)
79 |
80 | instance FromJSON DraftCommitTxResponse where
81 | parseJSON = withObject "DraftCommitTxResponse" $ \o -> do
82 | hex <- o .: "cborHex"
83 | pure $ DraftCommitTxResponse hex
84 |
85 | massageUtxo :: Api.UTxO Api.BabbageEra -> UTxO' TxOutWithWitness
86 | massageUtxo utxo =
87 | UTxO $ fmap (flip TxOutWithWitness Nothing) $ Api.unUTxO utxo
88 |
--------------------------------------------------------------------------------
/config/mainnet/shelley-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "activeSlotsCoeff": 0.05,
3 | "protocolParams": {
4 | "protocolVersion": {
5 | "minor": 0,
6 | "major": 2
7 | },
8 | "decentralisationParam": 1,
9 | "eMax": 18,
10 | "extraEntropy": {
11 | "tag": "NeutralNonce"
12 | },
13 | "maxTxSize": 16384,
14 | "maxBlockBodySize": 65536,
15 | "maxBlockHeaderSize": 1100,
16 | "minFeeA": 44,
17 | "minFeeB": 155381,
18 | "minUTxOValue": 1000000,
19 | "poolDeposit": 500000000,
20 | "minPoolCost": 340000000,
21 | "keyDeposit": 2000000,
22 | "nOpt": 150,
23 | "rho": 0.003,
24 | "tau": 0.20,
25 | "a0": 0.3
26 | },
27 | "genDelegs": {
28 | "ad5463153dc3d24b9ff133e46136028bdc1edbb897f5a7cf1b37950c": {
29 | "delegate": "d9e5c76ad5ee778960804094a389f0b546b5c2b140a62f8ec43ea54d",
30 | "vrf": "64fa87e8b29a5b7bfbd6795677e3e878c505bc4a3649485d366b50abadec92d7"
31 | },
32 | "b9547b8a57656539a8d9bc42c008e38d9c8bd9c8adbb1e73ad529497": {
33 | "delegate": "855d6fc1e54274e331e34478eeac8d060b0b90c1f9e8a2b01167c048",
34 | "vrf": "66d5167a1f426bd1adcc8bbf4b88c280d38c148d135cb41e3f5a39f948ad7fcc"
35 | },
36 | "60baee25cbc90047e83fd01e1e57dc0b06d3d0cb150d0ab40bbfead1": {
37 | "delegate": "7f72a1826ae3b279782ab2bc582d0d2958de65bd86b2c4f82d8ba956",
38 | "vrf": "c0546d9aa5740afd569d3c2d9c412595cd60822bb6d9a4e8ce6c43d12bd0f674"
39 | },
40 | "f7b341c14cd58fca4195a9b278cce1ef402dc0e06deb77e543cd1757": {
41 | "delegate": "69ae12f9e45c0c9122356c8e624b1fbbed6c22a2e3b4358cf0cb5011",
42 | "vrf": "6394a632af51a32768a6f12dac3485d9c0712d0b54e3f389f355385762a478f2"
43 | },
44 | "162f94554ac8c225383a2248c245659eda870eaa82d0ef25fc7dcd82": {
45 | "delegate": "4485708022839a7b9b8b639a939c85ec0ed6999b5b6dc651b03c43f6",
46 | "vrf": "aba81e764b71006c515986bf7b37a72fbb5554f78e6775f08e384dbd572a4b32"
47 | },
48 | "2075a095b3c844a29c24317a94a643ab8e22d54a3a3a72a420260af6": {
49 | "delegate": "6535db26347283990a252313a7903a45e3526ec25ddba381c071b25b",
50 | "vrf": "fcaca997b8105bd860876348fc2c6e68b13607f9bbd23515cd2193b555d267af"
51 | },
52 | "268cfc0b89e910ead22e0ade91493d8212f53f3e2164b2e4bef0819b": {
53 | "delegate": "1d4f2e1fda43070d71bb22a5522f86943c7c18aeb4fa47a362c27e23",
54 | "vrf": "63ef48bc5355f3e7973100c371d6a095251c80ceb40559f4750aa7014a6fb6db"
55 | }
56 | },
57 | "updateQuorum": 5,
58 | "networkId": "Mainnet",
59 | "initialFunds": {},
60 | "maxLovelaceSupply": 45000000000000000,
61 | "networkMagic": 764824073,
62 | "epochLength": 432000,
63 | "systemStart": "2017-09-23T21:44:51Z",
64 | "slotsPerKESPeriod": 129600,
65 | "slotLength": 1,
66 | "maxKESEvolutions": 62,
67 | "securityParam": 2160
68 | }
69 |
--------------------------------------------------------------------------------
/hydra-pay/hydra-pay.cabal:
--------------------------------------------------------------------------------
1 | name: hydra-pay
2 | version: 1.1.2
3 | cabal-version: >=1.10
4 | build-type: Simple
5 |
6 | library
7 | hs-source-dirs: src
8 | build-depends:
9 | aeson
10 | , base
11 | , beam-automigrate
12 | , beam-core
13 | , beam-postgres
14 | , bytestring
15 | , bytestring-aeson-orphans
16 | , cardano-api
17 | , cardano-transaction
18 | , containers
19 | , dependent-sum
20 | , directory
21 | , filepath
22 | , fsnotify
23 | , gargoyle-postgresql-connect
24 | , hydra-pay-core
25 | , lens
26 | , lens-aeson
27 | , managed
28 | , mtl
29 | , postgresql-simple
30 | , process
31 | , rhyolite-beam-db
32 | , rhyolite-beam-task-worker-backend
33 | , rhyolite-beam-task-worker-types
34 | , reflex
35 | , reflex-fsnotify
36 | , resource-pool
37 | , stm
38 | , temporary
39 | , text
40 | , time
41 | , transformers
42 | , typed-process
43 | , websockets
44 | , which
45 | , async
46 | , http-client
47 | , http-conduit
48 | , snap-server
49 | , websockets-snap
50 | , optparse-applicative
51 | , cardano-ledger-core
52 |
53 | default-extensions:
54 | ConstraintKinds
55 | DataKinds
56 | DeriveGeneric
57 | DerivingStrategies
58 | FlexibleContexts
59 | FlexibleInstances
60 | GADTs
61 | LambdaCase
62 | MultiParamTypeClasses
63 | OverloadedStrings
64 | QuantifiedConstraints
65 | RankNTypes
66 | RecursiveDo
67 | ScopedTypeVariables
68 | TypeApplications
69 | TypeFamilies
70 | UndecidableInstances
71 |
72 | exposed-modules:
73 | Cardano.Transaction.CardanoApi
74 | Cardano.Transaction.Extras
75 | Cardano.Api.Extras
76 | HydraPay
77 | HydraPay.Config
78 | HydraPay.Path
79 | HydraPay.Cardano.Cli
80 | HydraPay.Cardano.Hydra
81 | HydraPay.Cardano.Hydra.Tools
82 | HydraPay.Cardano.Node
83 | HydraPay.Database
84 | HydraPay.Database.Workers
85 | HydraPay.PaymentChannel.Postgres
86 | HydraPay.Proxy
87 | HydraPay.Bank
88 | HydraPay.Transaction
89 | HydraPay.Watch
90 | HydraPay.Worker
91 | HydraPay.State
92 | HydraPay.Api
93 | HydraPay.Instance
94 | HydraPay.Client
95 |
96 | ghc-options:
97 | -Wall -Wredundant-constraints -Wincomplete-uni-patterns
98 | -Wincomplete-record-updates -O -fno-show-valid-hole-fits
99 |
100 | executable hydra-pay
101 | main-is: main.hs
102 | hs-source-dirs: src-bin
103 | ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -threaded -fno-show-valid-hole-fits
104 | if impl(ghcjs)
105 | buildable: False
106 | build-depends: base
107 | , hydra-pay
108 |
--------------------------------------------------------------------------------
/backend/backend.cabal:
--------------------------------------------------------------------------------
1 | name: backend
2 | version: 0.1
3 | cabal-version: >= 1.10
4 | build-type: Simple
5 |
6 | library
7 | hs-source-dirs: src
8 | if impl(ghcjs)
9 | buildable: False
10 | build-depends: base
11 | , common
12 | , frontend
13 | , obelisk-backend
14 | , obelisk-route
15 | , process
16 | , async
17 | , which
18 | , monad-logger
19 | , logging-effect
20 | , prettyprinter
21 | , string-interpolate
22 | , containers
23 | , text
24 | , witherable
25 | , snap-core
26 | , io-streams
27 | , websockets-snap
28 | , websockets
29 | , some
30 | , directory
31 | , reflex-gadt-api
32 | , aeson
33 | , gargoyle-postgresql
34 | , gargoyle-postgresql-connect
35 | , gargoyle-postgresql-nix
36 | , gargoyle
37 | , resource-pool
38 | -- , postgresql-simple
39 | -- , beam-core
40 | -- , beam-postgres
41 | -- , beam-automigrate
42 | , bytestring
43 | , base64-bytestring
44 | , case-insensitive
45 | , lens
46 | , uuid
47 | , http-client
48 | , http-conduit
49 | , temporary
50 | , stm
51 | , monad-loops
52 | , mtl
53 | , transformers
54 | , time
55 | , time-compat
56 | , transformers
57 | , obelisk-executable-config-lookup
58 | , cryptonite
59 | , base64-bytestring
60 | , optparse-applicative
61 | , hydra-pay
62 | , cardano-api
63 | , hydra-pay-core
64 |
65 | default-extensions:
66 | OverloadedStrings
67 | LambdaCase
68 | GADTs
69 | ScopedTypeVariables
70 | OverloadedStrings
71 | FlexibleContexts
72 | QuasiQuotes
73 | DeriveGeneric
74 |
75 | exposed-modules:
76 | Backend
77 |
78 | other-modules:
79 | Paths
80 | ParseConfig
81 |
82 | ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -fno-show-valid-hole-fits
83 |
84 | executable backend
85 | main-is: main.hs
86 | hs-source-dirs: src-bin
87 | ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -O -threaded -fno-show-valid-hole-fits
88 | if impl(ghcjs)
89 | buildable: False
90 | build-depends: base
91 | , backend
92 | , common
93 | , frontend
94 | , obelisk-backend
95 | , snap-server
96 | , utf8-string
97 |
--------------------------------------------------------------------------------
/default.nix:
--------------------------------------------------------------------------------
1 | { system ? builtins.currentSystem
2 | , cardanoProject ? import ./cardano-project {
3 | inherit system;
4 | }
5 | }:
6 | with cardanoProject;
7 | with obelisk;
8 | let
9 | foldExtensions = lib.foldr lib.composeExtensions (_: _: {});
10 | deps = nixpkgs.thunkSet ./dep;
11 | flake-compat = import deps.flake-compat;
12 | hydra = (flake-compat {
13 | inherit system;
14 | src = deps.hydra;
15 | }).defaultNix.packages.${system};
16 | cardano-node = import deps.cardano-node {};
17 | pkgs = nixpkgs;
18 | livedoc-devnet-script = pkgs.runCommand "livedoc-devnet-script" { } ''
19 | cp -r ${./livedoc-devnet} $out
20 | '';
21 | p = project ./. ({ pkgs, ... }@args:
22 | let
23 | pd = cardanoProjectDef args;
24 | haskellLib = pkgs.haskell.lib;
25 | in
26 | pkgs.lib.recursiveUpdate pd {
27 | android.applicationId = "systems.obsidian.obelisk.examples.minimal";
28 | android.displayName = "Obelisk Minimal Example";
29 | ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
30 | ios.bundleName = "Obelisk Minimal Example";
31 |
32 | packages =
33 | {
34 | hydra-pay = ./hydra-pay;
35 | hydra-pay-core = ./hydra-pay-core;
36 | cardano-transaction = pkgs.hackGet ./dep/cardano-transaction-builder;
37 | bytestring-aeson-orphans = pkgs.hackGet ./dep/bytestring-aeson-orphans;
38 | };
39 |
40 | overrides = self: super: pd.overrides self super // {
41 | plutus-tx = haskellLib.dontCheck super.plutus-tx;
42 |
43 | bytestring-aeson-orphans = haskellLib.doJailbreak super.bytestring-aeson-orphans;
44 | aeson-gadt-th = haskellLib.doJailbreak (haskellLib.disableCabalFlag (self.callCabal2nix "aeson-gadt-th" deps.aeson-gadt-th {}) "build-readme");
45 | string-interpolate = haskellLib.doJailbreak (haskellLib.dontCheck super.string-interpolate);
46 |
47 | cardano-transaction = haskellLib.overrideCabal super.cardano-transaction (drv: {
48 | librarySystemDepends = (drv.librarySystemDepends or []) ++ [
49 | cardano-node.cardano-cli
50 | ];
51 | });
52 |
53 | backend = haskellLib.overrideCabal super.backend (drv: {
54 | librarySystemDepends = (drv.librarySystemDepends or []) ++ [
55 | cardano-node.cardano-node
56 | cardano-node.cardano-cli
57 | hydra.hydra-node
58 | hydra.hydra-tools-static
59 | ];
60 | });
61 |
62 | hydra-pay = haskellLib.overrideCabal super.hydra-pay (drv: {
63 | librarySystemDepends = (drv.librarySystemDepends or []) ++ [
64 | cardano-node.cardano-node
65 | cardano-node.cardano-cli
66 | hydra.hydra-node
67 | hydra.hydra-tools-static
68 | ];
69 | });
70 | };
71 | });
72 | in
73 | p // { hydra-pay = pkgs.haskell.lib.justStaticExecutables p.ghc.hydra-pay; inherit cardano-node hydra deps;}
74 |
--------------------------------------------------------------------------------
/config/preview/shelley-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "activeSlotsCoeff": 0.05,
3 | "epochLength": 86400,
4 | "genDelegs": {
5 | "12b0f443d02861948a0fce9541916b014e8402984c7b83ad70a834ce": {
6 | "delegate": "7c54a168c731f2f44ced620f3cca7c2bd90731cab223d5167aa994e6",
7 | "vrf": "62d546a35e1be66a2b06e29558ef33f4222f1c466adbb59b52d800964d4e60ec"
8 | },
9 | "3df542796a64e399b60c74acfbdb5afa1e114532fa36b46d6368ef3a": {
10 | "delegate": "c44bc2f3cc7e98c0f227aa399e4035c33c0d775a0985875fff488e20",
11 | "vrf": "4f9d334decadff6eba258b2df8ae1f02580a2628bce47ae7d957e1acd3f42a3c"
12 | },
13 | "93fd5083ff20e7ab5570948831730073143bea5a5d5539852ed45889": {
14 | "delegate": "82a02922f10105566b70366b07c758c8134fa91b3d8ae697dfa5e8e0",
15 | "vrf": "8a57e94a9b4c65ec575f35d41edb1df399fa30fdf10775389f5d1ef670ca3f9f"
16 | },
17 | "a86cab3ea72eabb2e8aafbbf4abbd2ba5bdfd04eea26a39b126a78e4": {
18 | "delegate": "10257f6d3bae913514bdc96c9170b3166bf6838cca95736b0e418426",
19 | "vrf": "1b54aad6b013145a0fc74bb5c2aa368ebaf3999e88637d78e09706d0cc29874a"
20 | },
21 | "b799804a28885bd49c0e1b99d8b3b26de0fac17a5cf651ecf0c872f0": {
22 | "delegate": "ebe606e22d932d51be2c1ce87e7d7e4c9a7d1f7df4a5535c29e23d22",
23 | "vrf": "b3fc06a1f8ee69ff23185d9af453503be8b15b2652e1f9fb7c3ded6797a2d6f9"
24 | },
25 | "d125812d6ab973a2c152a0525b7fd32d36ff13555a427966a9cac9b1": {
26 | "delegate": "e302198135fb5b00bfe0b9b5623426f7cf03179ab7ba75f945d5b79b",
27 | "vrf": "b45ca2ed95f92248fa0322ce1fc9f815a5a5aa2f21f1adc2c42c4dccfc7ba631"
28 | },
29 | "ef27651990a26449a40767d5e06cdef1670a3f3ff4b951d385b51787": {
30 | "delegate": "0e0b11e80d958732e587585d30978d683a061831d1b753878f549d05",
31 | "vrf": "b860ec844f6cd476c4fabb4aa1ca72d5c74d82f3835aed3c9515a35b6e048719"
32 | }
33 | },
34 | "initialFunds": {},
35 | "maxKESEvolutions": 62,
36 | "maxLovelaceSupply": 45000000000000000,
37 | "networkId": "Testnet",
38 | "networkMagic": 2,
39 | "protocolParams": {
40 | "protocolVersion": {
41 | "minor": 0,
42 | "major": 6
43 | },
44 | "decentralisationParam": 1,
45 | "eMax": 18,
46 | "extraEntropy": {
47 | "tag": "NeutralNonce"
48 | },
49 | "maxTxSize": 16384,
50 | "maxBlockBodySize": 65536,
51 | "maxBlockHeaderSize": 1100,
52 | "minFeeA": 44,
53 | "minFeeB": 155381,
54 | "minUTxOValue": 1000000,
55 | "poolDeposit": 500000000,
56 | "minPoolCost": 340000000,
57 | "keyDeposit": 2000000,
58 | "nOpt": 150,
59 | "rho": 0.003,
60 | "tau": 0.20,
61 | "a0": 0.3
62 | },
63 | "securityParam": 432,
64 | "slotLength": 1,
65 | "slotsPerKESPeriod": 129600,
66 | "systemStart": "2022-10-25T00:00:00Z",
67 | "updateQuorum": 5
68 | }
69 |
--------------------------------------------------------------------------------
/config/sanchonet/byron-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "avvmDistr": {},
3 | "blockVersionData": {
4 | "heavyDelThd": "300000000000",
5 | "maxBlockSize": "2000000",
6 | "maxHeaderSize": "2000000",
7 | "maxProposalSize": "700",
8 | "maxTxSize": "4096",
9 | "mpcThd": "20000000000000",
10 | "scriptVersion": 0,
11 | "slotDuration": "20000",
12 | "softforkRule": {
13 | "initThd": "900000000000000",
14 | "minThd": "600000000000000",
15 | "thdDecrement": "50000000000000"
16 | },
17 | "txFeePolicy": {
18 | "multiplier": "43946000000",
19 | "summand": "155381000000000"
20 | },
21 | "unlockStakeEpoch": "18446744073709551615",
22 | "updateImplicit": "10000",
23 | "updateProposalThd": "100000000000000",
24 | "updateVoteThd": "1000000000000"
25 | },
26 | "bootStakeholders": {
27 | "318488dc356f6034104804b2cb6a2dcc055202491386fb0d5af7c3ba": 1,
28 | "3a3c2ffaf066c8f211a1bdfd844f767ac453b1d94915e725c5867467": 1,
29 | "3ae8eabb4e0626cea0ba38d8303d59514dae9c307d93bad3d259e4a9": 1
30 | },
31 | "heavyDelegation": {
32 | "318488dc356f6034104804b2cb6a2dcc055202491386fb0d5af7c3ba": {
33 | "cert": "b80e06679023284236df3464dc6aab3f56f23cb721d5943c59632ac77004f76ae415b6d291606c7194509e1fefa0c8341eed269bd0e0e1433302b00912a4230c",
34 | "delegatePk": "9ELoyHN4GVtXrFzAJZApAVjrhwftqEFVoDXl9ebtTwpe/lG4b5ZkgH3DqwHE1hNJFRsnYs4zYzMmdbnoR7lfUA==",
35 | "issuerPk": "MHFL9SqIV6KuXSAvp08jHBRtHwNsDJMsCxbmXLorSbfLAORg7waqVL8NEaKU3Lb0FBIX5sHVC21i1M/c0jrnlA==",
36 | "omega": 0
37 | },
38 | "3a3c2ffaf066c8f211a1bdfd844f767ac453b1d94915e725c5867467": {
39 | "cert": "ce91b8e35b67de2236fa79b353d1c4ebd97ad4b4cc89056a1acfc217ece8e91fbffc4bf44604a96a1064c9997f6cd39b81284aadfac752056eafc6b5996a6509",
40 | "delegatePk": "Grpf6iTqd9aWc3QWvfthNv2l8Pp0X2tKpoIoPn0+Dy1+ow60UTu9i1j4KPjp1uzrnM4JoUcmkCGF507fPagO8w==",
41 | "issuerPk": "1FPA7qSOPVDlNZoQAuoB2dnm+tKI5td6+BO5sJ2rswVxuS6S6sjBFVfVz/VXfKTcEt/AKyffgzWXAtPCnhC1jw==",
42 | "omega": 0
43 | },
44 | "3ae8eabb4e0626cea0ba38d8303d59514dae9c307d93bad3d259e4a9": {
45 | "cert": "908dd25262598050d60cb24928a7059fea3726a1dd7764645edab654d3b4e37ba69acd4841454f70f0f643305ede0ef66dc0ea9747a2387da05d2af77963f30a",
46 | "delegatePk": "1zYduiReianx6HJHgQqtira7XY6M/Ol4tFj/O7TzTLcNfgazJm8pq5y6HAANwl91iL1pDZuIgFjzI+2i1Z6y2Q==",
47 | "issuerPk": "Pgj3IyTJDyxr+t5fcMuM3aPtyNCxOo4T9sr78BNbgWBGwlTGo0P6UtzNLyqloLsH8V6Lv6kYMdWELAiEyfCpkw==",
48 | "omega": 0
49 | }
50 | },
51 | "nonAvvmBalances": {
52 | "FHnt4NL7yPXqn7xha3WB99wYLxAc1FhceD3D1pQWaCthk9RYB46aGb6Tbq2KxV5": "0",
53 | "FHnt4NL7yPXwj8m191s48v1RZtQqA2sVHpamzStuXTuAnzYUSR6hRPqhYmW3MY4": "0",
54 | "FHnt4NL7yPXzVZ5xexcb7rWqCYWuFU7y6Pp4tLTiv6txhDcpQ2m7AFGMirsi1F1": "30000000000000000",
55 | "FHnt4NL7yPY27r794z4UiYJ3RwezucDRLX94Pzy6mYPNUNWboB71S9xUm2WEDrv": "0"
56 | },
57 | "protocolConsts": {
58 | "k": 432,
59 | "protocolMagic": 4
60 | },
61 | "startTime": 1686789000
62 | }
63 |
--------------------------------------------------------------------------------
/config/preprod/shelley-genesis.json:
--------------------------------------------------------------------------------
1 | {
2 | "activeSlotsCoeff": 0.05,
3 | "epochLength": 432000,
4 | "genDelegs": {
5 | "637f2e950b0fd8f8e3e811c5fbeb19e411e7a2bf37272b84b29c1a0b": {
6 | "delegate": "aae9293510344ddd636364c2673e34e03e79e3eefa8dbaa70e326f7d",
7 | "vrf": "227116365af2ed943f1a8b5e6557bfaa34996f1578eec667a5e2b361c51e4ce7"
8 | },
9 | "8a4b77c4f534f8b8cc6f269e5ebb7ba77fa63a476e50e05e66d7051c": {
10 | "delegate": "d15422b2e8b60e500a82a8f4ceaa98b04e55a0171d1125f6c58f8758",
11 | "vrf": "0ada6c25d62db5e1e35d3df727635afa943b9e8a123ab83785e2281605b09ce2"
12 | },
13 | "b00470cd193d67aac47c373602fccd4195aad3002c169b5570de1126": {
14 | "delegate": "b3b539e9e7ed1b32fbf778bf2ebf0a6b9f980eac90ac86623d11881a",
15 | "vrf": "0ff0ce9b820376e51c03b27877cd08f8ba40318f1a9f85a3db0b60dd03f71a7a"
16 | },
17 | "b260ffdb6eba541fcf18601923457307647dce807851b9d19da133ab": {
18 | "delegate": "7c64eb868b4ef566391a321c85323f41d2b95480d7ce56ad2abcb022",
19 | "vrf": "7fb22abd39d550c9a022ec8104648a26240a9ff9c88b8b89a6e20d393c03098e"
20 | },
21 | "ced1599fd821a39593e00592e5292bdc1437ae0f7af388ef5257344a": {
22 | "delegate": "de7ca985023cf892f4de7f5f1d0a7181668884752d9ebb9e96c95059",
23 | "vrf": "c301b7fc4d1b57fb60841bcec5e3d2db89602e5285801e522fce3790987b1124"
24 | },
25 | "dd2a7d71a05bed11db61555ba4c658cb1ce06c8024193d064f2a66ae": {
26 | "delegate": "1e113c218899ee7807f4028071d0e108fc790dade9fd1a0d0b0701ee",
27 | "vrf": "faf2702aa4893c877c622ab22dfeaf1d0c8aab98b837fe2bf667314f0d043822"
28 | },
29 | "f3b9e74f7d0f24d2314ea5dfbca94b65b2059d1ff94d97436b82d5b4": {
30 | "delegate": "fd637b08cc379ef7b99c83b416458fcda8a01a606041779331008fb9",
31 | "vrf": "37f2ea7c843a688159ddc2c38a2f997ab465150164a9136dca69564714b73268"
32 | }
33 | },
34 | "initialFunds": {},
35 | "maxKESEvolutions": 62,
36 | "maxLovelaceSupply": 45000000000000000,
37 | "networkId": "Testnet",
38 | "networkMagic": 1,
39 | "protocolParams": {
40 | "protocolVersion": {
41 | "minor": 0,
42 | "major": 2
43 | },
44 | "decentralisationParam": 1,
45 | "eMax": 18,
46 | "extraEntropy": {
47 | "tag": "NeutralNonce"
48 | },
49 | "maxTxSize": 16384,
50 | "maxBlockBodySize": 65536,
51 | "maxBlockHeaderSize": 1100,
52 | "minFeeA": 44,
53 | "minFeeB": 155381,
54 | "minUTxOValue": 1000000,
55 | "poolDeposit": 500000000,
56 | "minPoolCost": 340000000,
57 | "keyDeposit": 2000000,
58 | "nOpt": 150,
59 | "rho": 0.003,
60 | "tau": 0.20,
61 | "a0": 0.3
62 | },
63 | "securityParam": 2160,
64 | "slotLength": 1,
65 | "slotsPerKESPeriod": 129600,
66 | "staking": {
67 | "pools": {},
68 | "stake": {}
69 | },
70 | "systemStart": "2022-06-01T00:00:00Z",
71 | "updateQuorum": 5
72 | }
73 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Cardano/Hydra/Api.hs:
--------------------------------------------------------------------------------
1 | -- |
2 |
3 | module HydraPay.Cardano.Hydra.Api
4 | ( module HydraPay.Cardano.Hydra.Api
5 | , module X
6 | )
7 | where
8 |
9 | import GHC.Generics
10 | import Data.Aeson
11 | import Data.Set (Set)
12 | import Data.Text (Text)
13 | import Data.Time (UTCTime)
14 | import qualified Cardano.Api as Api
15 | import HydraPay.Cardano.Hydra.Api.ClientInput as X hiding (utxo, transaction)
16 |
17 | type HeadId = Text
18 | type HeadStatus = Value
19 | type NodeId = Value
20 | type Party = Value
21 | type SnapshotNumber = Value
22 | type ValidationError = Value
23 |
24 | data ServerOutput
25 | = PeerConnected {peer :: NodeId}
26 | | PeerDisconnected {peer :: NodeId}
27 | | HeadIsInitializing {headId :: HeadId, parties :: Set Party}
28 | | Committed {headId :: HeadId, party :: Party, utxo :: Api.UTxO Api.BabbageEra }
29 | | HeadIsOpen {headId :: HeadId, utxo :: Api.UTxO Api.BabbageEra}
30 | | HeadIsClosed
31 | { headId :: HeadId
32 | , snapshotNumber :: SnapshotNumber
33 | , contestationDeadline :: UTCTime
34 | -- ^ Nominal deadline until which contest can be submitted and after
35 | -- which fanout is possible. NOTE: Use this only for informational
36 | -- purpose and wait for 'ReadyToFanout' instead before sending 'Fanout'
37 | -- as the ledger of our cardano-node might not have progressed
38 | -- sufficiently in time yet and we do not re-submit transactions (yet).
39 | }
40 | | HeadIsContested {headId :: HeadId, snapshotNumber :: SnapshotNumber}
41 | | ReadyToFanout {headId :: HeadId}
42 | | HeadIsAborted {headId :: HeadId, utxo :: Api.UTxO Api.BabbageEra}
43 | | HeadIsFinalized {headId :: HeadId, utxo :: Api.UTxO Api.BabbageEra}
44 | | CommandFailed {clientInput :: ClientInput}
45 | | -- | Given transaction has been seen as valid in the Head. It is expected to
46 | -- eventually be part of a 'SnapshotConfirmed'.
47 | TxValid {headId :: HeadId, transaction :: Value}
48 | | -- | Given transaction was not not applicable to the given UTxO in time and
49 | -- has been dropped.
50 | TxInvalid {headId :: HeadId, utxo :: Api.UTxO Api.BabbageEra, transaction :: Value, validationError :: ValidationError}
51 | | -- | Given snapshot was confirmed and included transactions can be
52 | -- considered final.
53 | SnapshotConfirmed
54 | { headId :: HeadId
55 | , snapshot :: Value
56 | , signatures :: Value
57 | }
58 | | GetUTxOResponse {headId :: HeadId, utxo :: Api.UTxO Api.BabbageEra }
59 | | InvalidInput {reason :: String, input :: Value}
60 | | -- | A friendly welcome message which tells a client something about the
61 | -- node. Currently used for knowing what signing key the server uses (it
62 | -- only knows one), 'HeadStatus' and optionally (if 'HeadIsOpen' or
63 | -- 'SnapshotConfirmed' message is emitted) UTxO's present in the Hydra Head.
64 | Greetings {me :: Party, headStatus :: HeadStatus, snapshotUtxo :: Maybe Value}
65 | | PostTxOnChainFailed {postChainTx :: Value, postTxError :: Value}
66 | deriving (Generic, Show)
67 |
68 | instance ToJSON ServerOutput
69 | instance FromJSON ServerOutput
70 |
--------------------------------------------------------------------------------
/hydra-pay/src/Cardano/Transaction/Extras.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE RecordWildCards #-}
2 | -- |
3 |
4 | module Cardano.Transaction.Extras where
5 |
6 | import Cardano.Transaction
7 | import Control.Exception
8 | import Control.Monad.IO.Class
9 | import Control.Monad.Managed
10 | import Control.Monad.State
11 | import Control.Monad.Reader
12 | import qualified Data.ByteString.Lazy as BSL
13 | import qualified Data.ByteString.Lazy.Char8 as BSLC
14 | import System.Exit
15 | import System.FilePath ((>))
16 | import System.IO.Temp
17 | import System.Process.Typed
18 |
19 | evalRawNoSubmit :: EvalConfig -> Integer -> Tx () -> IO (String, BSL.ByteString)
20 | evalRawNoSubmit EvalConfig {..} fee (Tx m) =
21 | let
22 | runCardanoCli args = do
23 | print args
24 | (exitCode, outStr) <- readProcessInterleaved . setSocketPath ecSocketPath . proc cardanoCliPath $ args
25 | case exitCode of
26 | ExitSuccess -> pure $ BSLC.unpack outStr
27 | ExitFailure o -> do
28 | liftIO $ print o
29 | liftIO $ print outStr
30 | liftIO . throwIO . EvalException "cardano-cli" args . BSLC.unpack $ outStr
31 |
32 | in flip with pure $ do
33 | tempDir <- maybe (managed (withSystemTempDirectory "tx-builder")) pure ecOutputDir
34 | txBuilder <- liftIO . execStateT (runReaderT m (ChainInfo ecTestnet ecSocketPath)) $ mempty
35 | bodyFlags <- transactionBuilderToRawFlags tempDir ecProtocolParams ecUseRequiredSigners txBuilder fee
36 |
37 | liftIO $ do
38 | void $ runCardanoCli bodyFlags
39 | let
40 | bodyFile = toSigningBodyFlags tempDir
41 | -- get the txid
42 | txId <- fmap init $ runCardanoCli $ ["transaction", "txid"] <> bodyFile
43 |
44 | void . runCardanoCli . transactionBuilderToSignFlags tempDir ecTestnet $ txBuilder
45 |
46 | void $ runCardanoCli bodyFlags
47 | cbor <- BSL.readFile $ tempDir > "signed-body.txt"
48 | pure (txId, cbor)
49 |
50 | evalRawNoSign :: EvalConfig -> Integer -> Tx () -> IO (String, BSL.ByteString)
51 | evalRawNoSign EvalConfig {..} fee (Tx m) =
52 | let
53 | runCardanoCli args = do
54 | print args
55 | (exitCode, outStr) <- readProcessInterleaved . setSocketPath ecSocketPath . proc cardanoCliPath $ args
56 | case exitCode of
57 | ExitSuccess -> pure $ BSLC.unpack outStr
58 | ExitFailure o -> do
59 | liftIO $ print o
60 | liftIO $ print outStr
61 | liftIO . throwIO . EvalException "cardano-cli" args . BSLC.unpack $ outStr
62 |
63 | in flip with pure $ do
64 | tempDir <- maybe (managed (withSystemTempDirectory "tx-builder")) pure ecOutputDir
65 | txBuilder <- liftIO . execStateT (runReaderT m (ChainInfo ecTestnet ecSocketPath)) $ mempty
66 | bodyFlags <- transactionBuilderToRawFlags tempDir ecProtocolParams ecUseRequiredSigners txBuilder fee
67 |
68 | liftIO $ do
69 | void $ runCardanoCli bodyFlags
70 | let
71 | bodyFile = toSigningBodyFlags tempDir
72 | txId <- fmap init $ runCardanoCli $ ["transaction", "txid"] <> bodyFile
73 | void $ runCardanoCli bodyFlags
74 | cbor <- BSL.readFile $ tempDir > "body.txt"
75 | pure (txId, cbor)
76 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Guide
2 |
3 | Contributions and issue reports are encouraged and appreciated!
4 |
5 | - [Opening Issues](#opening-issues)
6 | - [Submitting Changes](#submitting-changes)
7 | - [Guidelines for Commit Messages](#guidelines-for-commit-messages)
8 | - [Guidelines for Pull Requests](#guidelines-for-pull-requests)
9 | - [Code Quality](#code-quality)
10 | - [Documentation](#documentation)
11 |
12 | ## Opening Issues
13 |
14 | Before opening an issue, please check whether your issue has already been reported. Assuming it has not:
15 |
16 | * Describe the issue you're encountering or the suggestion you're making
17 | * Include any relevant steps to reproduce or code samples you can. It's always easier for us to debug if we have something that demonstrates the error.
18 | * Let us know what version of Hydra Pay you were using. If you're using a github checkout, provide the git hash.
19 | * Describe how you're using Hydra Pay (i.e. development with obelisk, nix executable, docker container, etc.).
20 |
21 | ## Submitting Changes
22 |
23 | ### Guidelines for Commit Messages
24 |
25 | #### Summary Line
26 | The summary line of your commit message should summarize the changes being made. Commit messages should be written in the imperative mood and should describe what happens when the commit is applied.
27 |
28 | One way to think about it is that your commit message should be able to complete the sentence:
29 | "When applied, this commit will..."
30 |
31 | #### Body
32 | For breaking changes, new features, refactors, or other major changes, the body of the commit message should describe the motivation behind the change in greater detail and may include references to the issue tracker. The body shouldn't repeat code/comments from the diff.
33 |
34 | ### Guidelines for Pull Requests
35 |
36 | Wherever possible, pull requests should add a single feature or fix a single bug. Pull requests should not bundle several unrelated changes.
37 |
38 | ### Code Quality
39 |
40 | #### Warnings
41 |
42 | Your pull request should add no new warnings to the project. It should also generally not disable any warnings.
43 |
44 | #### Build and Test
45 |
46 | Make sure the project builds and that the tests pass! This will generally also be checked by CI before merge, but trying it yourself first means you'll catch problems earlier and your contribution can be merged that much sooner!
47 |
48 | To check that things are still working, run the project's build/test command. For many projects this command is:
49 |
50 | ```bash
51 | nix-build release.nix
52 | ```
53 |
54 | ### Documentation
55 |
56 | #### In the code
57 | We're always striving to improve documentation. Please include [haddock](https://haskell-haddock.readthedocs.io/en/latest/index.html) documentation for any added code, and update the documentation for any code you modify.
58 |
59 | #### In the [Changelog](ChangeLog.md)
60 | Add an entry to the changelog when your PR:
61 | * Adds a feature
62 | * Deprecates something
63 | * Includes a breaking change
64 | * Makes any other change that will impact users
65 |
66 | #### In the [Readme](README.md)
67 | The readme is the first place a lot of people look for information about the repository. Update any parts of the readme that are affected by your PR.
68 |
--------------------------------------------------------------------------------
/config/mainnet/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "AlonzoGenesisFile": "alonzo-genesis.json",
3 | "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4 | "ApplicationName": "cardano-sl",
5 | "ApplicationVersion": 1,
6 | "ByronGenesisFile": "byron-genesis.json",
7 | "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
8 | "ConwayGenesisFile": "conway-genesis.json",
9 | "ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
10 | "LastKnownBlockVersion-Alt": 0,
11 | "LastKnownBlockVersion-Major": 3,
12 | "LastKnownBlockVersion-Minor": 0,
13 | "MaxKnownMajorProtocolVersion": 2,
14 | "Protocol": "Cardano",
15 | "RequiresNetworkMagic": "RequiresNoMagic",
16 | "ShelleyGenesisFile": "shelley-genesis.json",
17 | "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
18 | "TraceAcceptPolicy": true,
19 | "TraceBlockFetchClient": false,
20 | "TraceBlockFetchDecisions": false,
21 | "TraceBlockFetchProtocol": false,
22 | "TraceBlockFetchProtocolSerialised": false,
23 | "TraceBlockFetchServer": false,
24 | "TraceChainDb": true,
25 | "TraceChainSyncBlockServer": false,
26 | "TraceChainSyncClient": false,
27 | "TraceChainSyncHeaderServer": false,
28 | "TraceChainSyncProtocol": false,
29 | "TraceConnectionManager": true,
30 | "TraceDNSResolver": true,
31 | "TraceDNSSubscription": true,
32 | "TraceDiffusionInitialization": true,
33 | "TraceErrorPolicy": true,
34 | "TraceForge": true,
35 | "TraceHandshake": false,
36 | "TraceInboundGovernor": true,
37 | "TraceIpSubscription": true,
38 | "TraceLedgerPeers": true,
39 | "TraceLocalChainSyncProtocol": false,
40 | "TraceLocalErrorPolicy": true,
41 | "TraceLocalHandshake": false,
42 | "TraceLocalRootPeers": true,
43 | "TraceLocalTxSubmissionProtocol": false,
44 | "TraceLocalTxSubmissionServer": false,
45 | "TraceMempool": true,
46 | "TraceMux": false,
47 | "TracePeerSelection": true,
48 | "TracePeerSelectionActions": true,
49 | "TracePublicRootPeers": true,
50 | "TraceServer": true,
51 | "TraceTxInbound": false,
52 | "TraceTxOutbound": false,
53 | "TraceTxSubmissionProtocol": false,
54 | "TracingVerbosity": "NormalVerbosity",
55 | "TurnOnLogMetrics": true,
56 | "TurnOnLogging": true,
57 | "defaultBackends": [
58 | "KatipBK"
59 | ],
60 | "defaultScribes": [
61 | [
62 | "StdoutSK",
63 | "stdout"
64 | ]
65 | ],
66 | "hasEKG": 12788,
67 | "hasPrometheus": [
68 | "127.0.0.1",
69 | 12798
70 | ],
71 | "minSeverity": "Info",
72 | "options": {
73 | "mapBackends": {
74 | "cardano.node.metrics": [
75 | "EKGViewBK"
76 | ],
77 | "cardano.node.resources": [
78 | "EKGViewBK"
79 | ]
80 | },
81 | "mapSubtrace": {
82 | "cardano.node.metrics": {
83 | "subtrace": "Neutral"
84 | }
85 | }
86 | },
87 | "rotation": {
88 | "rpKeepFilesNum": 10,
89 | "rpLogLimitBytes": 5000000,
90 | "rpMaxAgeHours": 24
91 | },
92 | "setupBackends": [
93 | "KatipBK"
94 | ],
95 | "setupScribes": [
96 | {
97 | "scFormat": "ScText",
98 | "scKind": "StdoutSK",
99 | "scName": "stdout",
100 | "scRotation": null
101 | }
102 | ]
103 | }
104 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Database/Workers.hs:
--------------------------------------------------------------------------------
1 | -- | Tracking Hydra Tasks from a database.
2 |
3 | {-# LANGUAGE TemplateHaskell #-}
4 | module HydraPay.Database.Workers where
5 |
6 | import ByteString.Aeson.Orphans ()
7 | import Control.Lens (makeLenses)
8 | import Data.Aeson (FromJSON, ToJSON)
9 | import Data.ByteString (ByteString)
10 | import Data.Int (Int32)
11 | import Data.Proxy
12 | import Data.Text (Text)
13 | import Data.Time (UTCTime)
14 | import qualified Data.ByteString.Char8 as BS
15 | import Database.Beam
16 | import qualified Database.Beam.AutoMigrate as Beam
17 | import Database.Beam.Backend
18 | import Database.Beam.Postgres
19 | import Database.Beam.Postgres.Syntax (PgValueSyntax)
20 | import qualified Cardano.Api as Api
21 |
22 | data RefundRequest = RefundRequest
23 | { _refundRequest_hydraHead :: Int32
24 | , _refundRequest_hydraAddress :: Text
25 | , _refundRequest_signingKeyPath :: FilePath
26 | , _refundRequest_chainAddress :: Text
27 | , _refundRequest_amount :: Int32
28 | , _refundRequest_protocolParams :: Text
29 | }
30 | deriving Generic
31 |
32 | instance FromJSON RefundRequest
33 | instance ToJSON RefundRequest
34 |
35 | data PaymentChannelReq
36 | = PaymentChannelReq_InitiatorRefund RefundRequest
37 | | PaymentChannelReq_Fund Int32 [FundRequest]
38 | | PaymentChannelReq_Join Int32 Text Api.Lovelace
39 | | PaymentChannelReq_SpinUpHead Int32
40 | | PaymentChannelReq_Cleanup Int32
41 | | PaymentChannelReq_SubmitTxWork Text ByteString -- takes an L1 Address and a Tx
42 | deriving Generic
43 |
44 | data FundRequest = FundRequest
45 | { _fundRequest_address :: String
46 | -- ^ String of the address to send funds to
47 | , _fundRequest_amount :: Int32
48 | , _fundRequest_datumHash :: Maybe BS.ByteString
49 | }
50 | deriving (Generic)
51 |
52 | type SignedTx = ByteString
53 |
54 | instance FromJSON PaymentChannelReq
55 | instance ToJSON PaymentChannelReq
56 | instance FromJSON FundRequest
57 | instance ToJSON FundRequest
58 |
59 | instance Beam.HasColumnType PaymentChannelReq where
60 | defaultColumnType = const $ Beam.defaultColumnType $ Proxy @(PgJSON PaymentChannelReq)
61 |
62 | instance FromBackendRow Postgres PaymentChannelReq where
63 | fromBackendRow = (\(PgJSON x) -> x) <$> fromBackendRow
64 |
65 | instance HasSqlValueSyntax PgValueSyntax PaymentChannelReq where
66 | sqlValueSyntax = sqlValueSyntax . PgJSON
67 |
68 | data PaymentChannelTaskT f = PaymentChannelTask
69 | { _paymentChannelTask_id :: Columnar f (SqlSerial Int32)
70 | , _paymentChannelTask_checkedOutBy :: Columnar f (Maybe Text)
71 | , _paymentChannelTask_payload :: Columnar f PaymentChannelReq
72 | , _paymentChannelTask_status :: Columnar f (Maybe Bool)
73 | , _paymentChannelTask_finished :: Columnar f Bool
74 | , _paymentChannelTask_time :: Columnar f UTCTime
75 | }
76 | deriving Generic
77 |
78 | type PaymentChannelTask = PaymentChannelTaskT Identity
79 | type PaymentChannelTaskId = PrimaryKey PaymentChannelTaskT Identity
80 |
81 | instance Table PaymentChannelTaskT where
82 | newtype PrimaryKey PaymentChannelTaskT f = PaymentChannelTaskId
83 | { unPaymentChannelTaskId :: Columnar f (SqlSerial Int32)
84 | } deriving (Generic)
85 | primaryKey = PaymentChannelTaskId . _paymentChannelTask_id
86 |
87 | instance Beamable PaymentChannelTaskT
88 | instance Beamable (PrimaryKey PaymentChannelTaskT)
89 |
90 | fmap concat $ traverse makeLenses
91 | [ ''PaymentChannelTaskT
92 | ]
93 |
--------------------------------------------------------------------------------
/hydra-pay/src/HydraPay/Config.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 | {-# LANGUAGE RecordWildCards #-}
3 | {-# LANGUAGE OverloadedStrings #-}
4 |
5 | module HydraPay.Config where
6 |
7 | import System.FilePath
8 | import HydraPay.Path
9 | import HydraPay.Types
10 | import HydraPay.Cardano.Hydra.ChainConfig (HydraChainConfig(..))
11 | import Control.Lens hiding (argument)
12 | import HydraPay.Logging
13 | import HydraPay.Cardano.Node
14 |
15 | data HydraPayConfig = HydraPayConfig
16 | { hydraPaySettings_database :: FilePath
17 | , hydraPaySettings_logSettings :: LogConfig
18 | , hydraPaySettings_nodeConfig :: NodeConfig
19 | }
20 |
21 | data BootstrapState = BootstrapState
22 | { _bootstrap_nodeInfo :: NodeInfo
23 | , _bootstrap_logger :: Logger
24 | }
25 |
26 | makeLenses ''BootstrapState
27 |
28 | instance HasLogger BootstrapState where
29 | getLogger = bootstrap_logger
30 |
31 | instance HasNodeInfo BootstrapState where
32 | nodeInfo = bootstrap_nodeInfo
33 |
34 |
35 | mainnetScriptTxId :: TxId
36 | mainnetScriptTxId = TxId "eb4c5f213ffb646046cf1d3543ae240ac922deccdc99826edd9af8ad52ddb877"
37 |
38 | preprodScriptTxId :: TxId
39 | preprodScriptTxId = TxId "85424831ee6a9dea9668990547df318a246ebda3e28a0ed60c5ca4b3de87e49f"
40 |
41 | previewScriptTxId :: TxId
42 | previewScriptTxId = TxId "058760d0370a965976a21ac9f11ace9b8f391d73f29b6d1b01bffdea7d0e1526"
43 |
44 | sanchonetScriptTxId :: TxId
45 | sanchonetScriptTxId = TxId "0000000000000000000000000000000000000000000000000000000000000000"
46 |
47 | hydraChainConfig :: HydraChainConfig
48 | hydraChainConfig =
49 | HydraChainConfig
50 | hydraChainGenesisShelley
51 | hydraChainProtocolParameters
52 |
53 | preprodNodeConfig :: NodeConfig
54 | preprodNodeConfig =
55 | NodeConfig
56 | preprodChainConfig
57 | dbPath
58 | (dbPath > "node.socket")
59 | preprodChainTopology
60 | 1
61 | preprodScriptTxId
62 | where
63 | dbPath = mkNodeDb "preprod"
64 |
65 | preprodConfig :: HydraPayConfig
66 | preprodConfig = HydraPayConfig
67 | hydraPayDb
68 | (defaultLogConfig "hydra-pay")
69 | preprodNodeConfig
70 |
71 | previewNodeConfig :: NodeConfig
72 | previewNodeConfig =
73 | NodeConfig
74 | previewChainConfig
75 | dbPath
76 | (dbPath > "node.socket")
77 | previewChainTopology
78 | 2
79 | previewScriptTxId
80 | where
81 | dbPath = mkNodeDb "preview"
82 |
83 | previewConfig :: HydraPayConfig
84 | previewConfig = HydraPayConfig
85 | hydraPayDb
86 | (defaultLogConfig "hydra-pay")
87 | previewNodeConfig
88 |
89 | sanchonetNodeConfig :: NodeConfig
90 | sanchonetNodeConfig =
91 | NodeConfig
92 | sanchonetChainConfig
93 | dbPath
94 | (dbPath > "node.socket")
95 | sanchonetChainTopology
96 | 4
97 | sanchonetScriptTxId
98 | where
99 | dbPath = mkNodeDb "sanchonet"
100 |
101 | sanchonetConfig :: HydraPayConfig
102 | sanchonetConfig = HydraPayConfig
103 | hydraPayDb
104 | (defaultLogConfig "hydra-pay")
105 | sanchonetNodeConfig
106 |
107 | mainnetNodeConfig :: NodeConfig
108 | mainnetNodeConfig =
109 | NodeConfig
110 | mainnetChainConfig
111 | dbPath
112 | (dbPath > "node.socket")
113 | mainnetChainTopology
114 | 764824073
115 | mainnetScriptTxId
116 | where
117 | dbPath = mkNodeDb "mainnet"
118 |
119 | mainnetConfig :: HydraPayConfig
120 | mainnetConfig = HydraPayConfig
121 | hydraPayDb
122 | (defaultLogConfig "hydra-pay")
123 | mainnetNodeConfig
124 |
--------------------------------------------------------------------------------
/config/preprod/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "AlonzoGenesisFile": "alonzo-genesis.json",
3 | "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4 | "ApplicationName": "cardano-sl",
5 | "ApplicationVersion": 0,
6 | "ByronGenesisFile": "byron-genesis.json",
7 | "ByronGenesisHash": "d4b8de7a11d929a323373cbab6c1a9bdc931beffff11db111cf9d57356ee1937",
8 | "ConwayGenesisFile": "conway-genesis.json",
9 | "ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
10 | "EnableP2P": true,
11 | "LastKnownBlockVersion-Alt": 0,
12 | "LastKnownBlockVersion-Major": 2,
13 | "LastKnownBlockVersion-Minor": 0,
14 | "Protocol": "Cardano",
15 | "RequiresNetworkMagic": "RequiresMagic",
16 | "ShelleyGenesisFile": "shelley-genesis.json",
17 | "ShelleyGenesisHash": "162d29c4e1cf6b8a84f2d692e67a3ac6bc7851bc3e6e4afe64d15778bed8bd86",
18 | "TargetNumberOfActivePeers": 20,
19 | "TargetNumberOfEstablishedPeers": 50,
20 | "TargetNumberOfKnownPeers": 100,
21 | "TargetNumberOfRootPeers": 100,
22 | "TraceAcceptPolicy": true,
23 | "TraceBlockFetchClient": false,
24 | "TraceBlockFetchDecisions": false,
25 | "TraceBlockFetchProtocol": false,
26 | "TraceBlockFetchProtocolSerialised": false,
27 | "TraceBlockFetchServer": false,
28 | "TraceChainDb": true,
29 | "TraceChainSyncBlockServer": false,
30 | "TraceChainSyncClient": false,
31 | "TraceChainSyncHeaderServer": false,
32 | "TraceChainSyncProtocol": false,
33 | "TraceConnectionManager": true,
34 | "TraceDNSResolver": true,
35 | "TraceDNSSubscription": true,
36 | "TraceDiffusionInitialization": true,
37 | "TraceErrorPolicy": true,
38 | "TraceForge": true,
39 | "TraceHandshake": false,
40 | "TraceInboundGovernor": true,
41 | "TraceIpSubscription": true,
42 | "TraceLedgerPeers": true,
43 | "TraceLocalChainSyncProtocol": false,
44 | "TraceLocalErrorPolicy": true,
45 | "TraceLocalHandshake": false,
46 | "TraceLocalRootPeers": true,
47 | "TraceLocalTxSubmissionProtocol": false,
48 | "TraceLocalTxSubmissionServer": false,
49 | "TraceMempool": true,
50 | "TraceMux": false,
51 | "TracePeerSelection": true,
52 | "TracePeerSelectionActions": true,
53 | "TracePublicRootPeers": true,
54 | "TraceServer": true,
55 | "TraceTxInbound": false,
56 | "TraceTxOutbound": false,
57 | "TraceTxSubmissionProtocol": false,
58 | "TracingVerbosity": "NormalVerbosity",
59 | "TurnOnLogMetrics": true,
60 | "TurnOnLogging": true,
61 | "defaultBackends": [
62 | "KatipBK"
63 | ],
64 | "defaultScribes": [
65 | [
66 | "StdoutSK",
67 | "stdout"
68 | ]
69 | ],
70 | "hasEKG": 12788,
71 | "hasPrometheus": [
72 | "127.0.0.1",
73 | 12798
74 | ],
75 | "minSeverity": "Info",
76 | "options": {
77 | "mapBackends": {
78 | "cardano.node.metrics": [
79 | "EKGViewBK"
80 | ],
81 | "cardano.node.resources": [
82 | "EKGViewBK"
83 | ]
84 | },
85 | "mapSubtrace": {
86 | "cardano.node.metrics": {
87 | "subtrace": "Neutral"
88 | }
89 | }
90 | },
91 | "rotation": {
92 | "rpKeepFilesNum": 10,
93 | "rpLogLimitBytes": 5000000,
94 | "rpMaxAgeHours": 24
95 | },
96 | "setupBackends": [
97 | "KatipBK"
98 | ],
99 | "setupScribes": [
100 | {
101 | "scFormat": "ScText",
102 | "scKind": "StdoutSK",
103 | "scName": "stdout",
104 | "scRotation": null
105 | }
106 | ]
107 | }
108 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/PaymentChannel.hs:
--------------------------------------------------------------------------------
1 | {-# LANGUAGE TemplateHaskell #-}
2 |
3 | module HydraPay.PaymentChannel where
4 |
5 | import Data.Time
6 | import Data.Int
7 | import Data.Aeson
8 | import Data.Text (Text)
9 | import Data.Map (Map)
10 |
11 | import Control.Concurrent.STM
12 | import Control.Lens
13 |
14 | import HydraPay.Cardano.Hydra.ChainConfig
15 | import HydraPay.Cardano.Hydra.RunningHead
16 | import qualified Cardano.Api as Api
17 |
18 | import Database.Beam
19 |
20 | data PaymentChannelConfig = PaymentChannelConfig
21 | { _paymentChannelConfig_name :: Text
22 | , _paymentChannelConfig_first :: Api.AddressAny
23 | , _paymentChannelConfig_second :: Api.AddressAny
24 | , _paymentChannelConfig_commitAmount :: Int32
25 | , _paymentChannelConfig_hydraChainConfig :: HydraChainConfig
26 | , _paymentChannelConfig_useProxies :: Bool
27 | }
28 |
29 | makeLenses ''PaymentChannelConfig
30 |
31 | class HasPaymentChannelManager a where
32 | paymentChannelManager :: Lens' a PaymentChannelManager
33 |
34 | -- | Manages running payment channels
35 | data PaymentChannelManager = PaymentChannelManager
36 | { _paymentChannelManager_runningChannels :: TMVar (Map Int32 (TMVar RunningHydraHead))
37 | }
38 |
39 | makeLenses ''PaymentChannelManager
40 |
41 | data PaymentChannelStatus
42 | = PaymentChannelStatus_Submitting
43 | | PaymentChannelStatus_WaitingForAccept
44 | | PaymentChannelStatus_Opening
45 | | PaymentChannelStatus_Open
46 | | PaymentChannelStatus_Closing
47 | | PaymentChannelStatus_Done
48 | | PaymentChannelStatus_Error
49 | deriving (Show, Eq, Ord, Read, Generic, Enum)
50 |
51 | instance ToJSON PaymentChannelStatus
52 | instance FromJSON PaymentChannelStatus
53 |
54 | data PaymentChannelInfo = PaymentChannelInfo
55 | { _paymentChannelInfo_id :: Int32
56 | , _paymentChannelInfo_name :: Text
57 | , _paymentChannelInfo_createdAt :: UTCTime
58 | , _paymentChannelInfo_expiry :: UTCTime
59 | , _paymentChannelInfo_other :: Text
60 | , _paymentChannelInfo_status :: PaymentChannelStatus
61 | , _paymentChannelInfo_initiator :: Bool
62 | , _paymentChannelInfo_balance :: Maybe Api.Lovelace
63 | }
64 | deriving (Eq, Show, Generic)
65 |
66 | instance ToJSON PaymentChannelInfo
67 | instance FromJSON PaymentChannelInfo
68 |
69 | isPending :: PaymentChannelStatus -> Bool
70 | isPending (PaymentChannelStatus_Submitting) = True
71 | isPending (PaymentChannelStatus_WaitingForAccept) = True
72 | isPending (PaymentChannelStatus_Opening) = True
73 | isPending _ = False
74 |
75 | data TransactionDirection =
76 | TransactionReceived | TransactionSent
77 | deriving (Eq, Show, Enum, Generic)
78 |
79 | instance ToJSON TransactionDirection
80 | instance FromJSON TransactionDirection
81 |
82 | data TransactionInfo = TransactionInfo
83 | { _transactionInfo_id :: Int32
84 | , _transactionInfo_time :: UTCTime
85 | , _transactionInfo_amount :: Int32
86 | , _transactionInfo_direction :: TransactionDirection
87 | }
88 | deriving (Eq, Show, Generic)
89 |
90 | instance ToJSON TransactionInfo
91 | instance FromJSON TransactionInfo
92 |
93 | makeLenses ''TransactionInfo
94 | makeLenses ''PaymentChannelInfo
95 |
96 | paymentChannelDisplayName :: PaymentChannelInfo -> Text
97 | paymentChannelDisplayName pinfo =
98 | case pinfo ^. paymentChannelInfo_status of
99 | PaymentChannelStatus_WaitingForAccept | pinfo ^. paymentChannelInfo_initiator . to not -> "New Request"
100 | _ -> pinfo ^. paymentChannelInfo_name
101 |
--------------------------------------------------------------------------------
/hydra-pay-core/src/HydraPay/Orphans.hs:
--------------------------------------------------------------------------------
1 | {-# Language TemplateHaskell #-}
2 | {-# Language DeriveGeneric #-}
3 | {-# Language DerivingStrategies #-}
4 | {-# Language GeneralizedNewtypeDeriving #-}
5 | {-# Language StandaloneDeriving #-}
6 | {-# Language UndecidableInstances #-}
7 | {-# OPTIONS_GHC -fno-warn-orphans #-}
8 |
9 | module HydraPay.Orphans where
10 |
11 | import Data.Aeson.GADT.TH
12 | import qualified Data.HexString as Hex
13 | import qualified Cardano.Api as Api
14 | import qualified Cardano.Address as Address
15 | import qualified Data.Aeson.Types as Aeson
16 | import GHC.Generics
17 | import Data.Constraint.Extras.TH
18 | import Data.Proxy
19 | import Data.Type.Equality
20 |
21 | deriving newtype instance Aeson.FromJSON Address.NetworkTag
22 | deriving newtype instance Aeson.FromJSONKey Address.NetworkTag
23 | deriving newtype instance Aeson.ToJSONKey Address.NetworkTag
24 | deriving newtype instance Ord Address.NetworkTag
25 |
26 | instance Aeson.ToJSON Api.AddressAny where
27 | toJSON = Aeson.toJSON . Api.serialiseAddress
28 |
29 | instance Aeson.FromJSON Api.AddressAny where
30 | parseJSON t = do
31 | txt <- Aeson.parseJSON t
32 | case Api.deserialiseAddress Api.AsAddressAny txt of
33 | Nothing -> fail $ "Could not deserialise address: " <> show txt
34 | Just addr -> return addr
35 |
36 | deriving stock instance Generic Api.AssetId
37 | instance Aeson.ToJSON Api.AssetId
38 | instance Aeson.ToJSONKey Api.AssetId
39 | instance Aeson.FromJSON Api.AssetId
40 | instance Aeson.FromJSONKey Api.AssetId
41 |
42 | -- | General conversion for types that convert to CBOR making them also convert to JSON
43 | -- these are just functions and not an instance to avoid overlapping instances
44 | -- just use them as the body of toJSON and fromJSON if your type has a SerializeAsCBOR instance
45 | toJSONCBOR :: (Api.SerialiseAsCBOR (f era)) => f era -> Aeson.Value
46 | toJSONCBOR = Aeson.toJSON . Hex.fromBytes . Api.serialiseToCBOR
47 |
48 | parseJSONCBOR :: (Api.SerialiseAsCBOR (f era)) => Aeson.Value -> Aeson.Parser (f era)
49 | parseJSONCBOR v = do
50 | bs <- Hex.toBytes <$> Aeson.parseJSON v
51 | case Api.deserialiseFromCBOR (Api.proxyToAsType Proxy) $ bs of
52 | Left decoderError -> Aeson.parseFail $ show decoderError
53 | Right r -> pure r
54 |
55 | instance Api.IsCardanoEra era => Aeson.ToJSON (Api.TxBody era) where
56 | toJSON = toJSONCBOR
57 |
58 | instance (Api.HasTypeProxy era, Api.IsCardanoEra era) => Aeson.FromJSON (Api.TxBody era) where
59 | parseJSON = parseJSONCBOR
60 |
61 | deriving stock instance Generic (Api.BalancedTxBody era)
62 | instance (Aeson.ToJSON era, Api.IsCardanoEra era) => Aeson.ToJSON (Api.BalancedTxBody era)
63 | instance (Api.IsShelleyBasedEra era) => Aeson.FromJSON (Api.BalancedTxBody era)
64 |
65 | instance Api.IsCardanoEra era => Aeson.ToJSON (Api.Tx era) where
66 | toJSON = toJSONCBOR
67 | instance Api.IsCardanoEra era => Aeson.FromJSON (Api.Tx era) where
68 | parseJSON = parseJSONCBOR
69 |
70 | deriving stock instance Generic (Api.AlonzoEra)
71 | instance Aeson.ToJSON Api.AlonzoEra
72 |
73 | deriveArgDict ''Api.CardanoEra
74 | deriveFromJSONGADT ''Api.CardanoEra
75 |
76 | deriveArgDict ''Api.ShelleyBasedEra
77 | deriveJSONGADT ''Api.ShelleyBasedEra
78 |
79 | instance TestEquality Api.ShelleyBasedEra where
80 | testEquality Api.ShelleyBasedEraShelley Api.ShelleyBasedEraShelley = Just Refl
81 | testEquality Api.ShelleyBasedEraAllegra Api.ShelleyBasedEraAllegra = Just Refl
82 | testEquality Api.ShelleyBasedEraMary Api.ShelleyBasedEraMary = Just Refl
83 | testEquality Api.ShelleyBasedEraAlonzo Api.ShelleyBasedEraAlonzo = Just Refl
84 | testEquality Api.ShelleyBasedEraBabbage Api.ShelleyBasedEraBabbage = Just Refl
85 | testEquality _ _ = Nothing
86 |
--------------------------------------------------------------------------------
/config/preview/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "AlonzoGenesisFile": "alonzo-genesis.json",
3 | "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
4 | "ApplicationName": "cardano-sl",
5 | "ApplicationVersion": 0,
6 | "ByronGenesisFile": "byron-genesis.json",
7 | "ByronGenesisHash": "83de1d7302569ad56cf9139a41e2e11346d4cb4a31c00142557b6ab3fa550761",
8 | "ConwayGenesisFile": "conway-genesis.json",
9 | "ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
10 | "EnableP2P": true,
11 | "ExperimentalHardForksEnabled": false,
12 | "ExperimentalProtocolsEnabled": false,
13 | "LastKnownBlockVersion-Alt": 0,
14 | "LastKnownBlockVersion-Major": 3,
15 | "LastKnownBlockVersion-Minor": 1,
16 | "Protocol": "Cardano",
17 | "RequiresNetworkMagic": "RequiresMagic",
18 | "ShelleyGenesisFile": "shelley-genesis.json",
19 | "ShelleyGenesisHash": "363498d1024f84bb39d3fa9593ce391483cb40d479b87233f868d6e57c3a400d",
20 | "TargetNumberOfActivePeers": 20,
21 | "TargetNumberOfEstablishedPeers": 50,
22 | "TargetNumberOfKnownPeers": 100,
23 | "TargetNumberOfRootPeers": 100,
24 | "TestAllegraHardForkAtEpoch": 0,
25 | "TestAlonzoHardForkAtEpoch": 0,
26 | "TestMaryHardForkAtEpoch": 0,
27 | "TestShelleyHardForkAtEpoch": 0,
28 | "TraceAcceptPolicy": true,
29 | "TraceBlockFetchClient": false,
30 | "TraceBlockFetchDecisions": false,
31 | "TraceBlockFetchProtocol": false,
32 | "TraceBlockFetchProtocolSerialised": false,
33 | "TraceBlockFetchServer": false,
34 | "TraceChainDb": true,
35 | "TraceChainSyncBlockServer": false,
36 | "TraceChainSyncClient": false,
37 | "TraceChainSyncHeaderServer": false,
38 | "TraceChainSyncProtocol": false,
39 | "TraceConnectionManager": true,
40 | "TraceDNSResolver": true,
41 | "TraceDNSSubscription": true,
42 | "TraceDiffusionInitialization": true,
43 | "TraceErrorPolicy": true,
44 | "TraceForge": true,
45 | "TraceHandshake": false,
46 | "TraceInboundGovernor": true,
47 | "TraceIpSubscription": true,
48 | "TraceLedgerPeers": true,
49 | "TraceLocalChainSyncProtocol": false,
50 | "TraceLocalErrorPolicy": true,
51 | "TraceLocalHandshake": false,
52 | "TraceLocalRootPeers": true,
53 | "TraceLocalTxSubmissionProtocol": false,
54 | "TraceLocalTxSubmissionServer": false,
55 | "TraceMempool": true,
56 | "TraceMux": false,
57 | "TracePeerSelection": true,
58 | "TracePeerSelectionActions": true,
59 | "TracePublicRootPeers": true,
60 | "TraceServer": true,
61 | "TraceTxInbound": false,
62 | "TraceTxOutbound": false,
63 | "TraceTxSubmissionProtocol": false,
64 | "TracingVerbosity": "NormalVerbosity",
65 | "TurnOnLogMetrics": true,
66 | "TurnOnLogging": true,
67 | "defaultBackends": [
68 | "KatipBK"
69 | ],
70 | "defaultScribes": [
71 | [
72 | "StdoutSK",
73 | "stdout"
74 | ]
75 | ],
76 | "hasEKG": 12788,
77 | "hasPrometheus": [
78 | "127.0.0.1",
79 | 12798
80 | ],
81 | "minSeverity": "Info",
82 | "options": {
83 | "mapBackends": {
84 | "cardano.node.metrics": [
85 | "EKGViewBK"
86 | ],
87 | "cardano.node.resources": [
88 | "EKGViewBK"
89 | ]
90 | },
91 | "mapSubtrace": {
92 | "cardano.node.metrics": {
93 | "subtrace": "Neutral"
94 | }
95 | }
96 | },
97 | "rotation": {
98 | "rpKeepFilesNum": 10,
99 | "rpLogLimitBytes": 5000000,
100 | "rpMaxAgeHours": 24
101 | },
102 | "setupBackends": [
103 | "KatipBK"
104 | ],
105 | "setupScribes": [
106 | {
107 | "scFormat": "ScText",
108 | "scKind": "StdoutSK",
109 | "scName": "stdout",
110 | "scRotation": null
111 | }
112 | ]
113 | }
114 |
--------------------------------------------------------------------------------
/config/sanchonet/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "AlonzoGenesisFile": "alonzo-genesis.json",
3 | "AlonzoGenesisHash": "8bedcaea62107d8a79ed5293b0027b3f8706a4bc2422f33380cb1fd01c6fa6ec",
4 | "ApplicationName": "cardano-sl",
5 | "ApplicationVersion": 0,
6 | "ByronGenesisFile": "byron-genesis.json",
7 | "ByronGenesisHash": "785eb88427e136378a15b0a152a8bfbeec7a611529ccda29c43a1e60ffb48eaa",
8 | "ConwayGenesisFile": "conway-genesis.json",
9 | "ConwayGenesisHash": "b9430bf2ed3ae29d7afa07fb08281e652550f613e282d06f32abfefce311f0de",
10 | "EnableP2P": true,
11 | "ExperimentalHardForksEnabled": true,
12 | "ExperimentalProtocolsEnabled": true,
13 | "LastKnownBlockVersion-Alt": 0,
14 | "LastKnownBlockVersion-Major": 3,
15 | "LastKnownBlockVersion-Minor": 1,
16 | "Protocol": "Cardano",
17 | "RequiresNetworkMagic": "RequiresMagic",
18 | "ShelleyGenesisFile": "shelley-genesis.json",
19 | "ShelleyGenesisHash": "f94457ec45a0c6773057a529533cf7ccf746cb44dabd56ae970e1dbfb55bfdb2",
20 | "TargetNumberOfActivePeers": 20,
21 | "TargetNumberOfEstablishedPeers": 50,
22 | "TargetNumberOfKnownPeers": 100,
23 | "TargetNumberOfRootPeers": 100,
24 | "TestAllegraHardForkAtEpoch": 0,
25 | "TestAlonzoHardForkAtEpoch": 0,
26 | "TestMaryHardForkAtEpoch": 0,
27 | "TestShelleyHardForkAtEpoch": 0,
28 | "TraceAcceptPolicy": true,
29 | "TraceBlockFetchClient": false,
30 | "TraceBlockFetchDecisions": false,
31 | "TraceBlockFetchProtocol": false,
32 | "TraceBlockFetchProtocolSerialised": false,
33 | "TraceBlockFetchServer": false,
34 | "TraceChainDb": true,
35 | "TraceChainSyncBlockServer": false,
36 | "TraceChainSyncClient": false,
37 | "TraceChainSyncHeaderServer": false,
38 | "TraceChainSyncProtocol": false,
39 | "TraceConnectionManager": true,
40 | "TraceDNSResolver": true,
41 | "TraceDNSSubscription": true,
42 | "TraceDiffusionInitialization": true,
43 | "TraceErrorPolicy": true,
44 | "TraceForge": true,
45 | "TraceHandshake": true,
46 | "TraceInboundGovernor": true,
47 | "TraceIpSubscription": true,
48 | "TraceLedgerPeers": true,
49 | "TraceLocalChainSyncProtocol": false,
50 | "TraceLocalConnectionManager": true,
51 | "TraceLocalErrorPolicy": true,
52 | "TraceLocalHandshake": true,
53 | "TraceLocalRootPeers": true,
54 | "TraceLocalTxSubmissionProtocol": false,
55 | "TraceLocalTxSubmissionServer": false,
56 | "TraceMempool": true,
57 | "TraceMux": false,
58 | "TracePeerSelection": true,
59 | "TracePeerSelectionActions": true,
60 | "TracePublicRootPeers": true,
61 | "TraceServer": true,
62 | "TraceTxInbound": false,
63 | "TraceTxOutbound": false,
64 | "TraceTxSubmissionProtocol": false,
65 | "TracingVerbosity": "NormalVerbosity",
66 | "TurnOnLogMetrics": true,
67 | "TurnOnLogging": true,
68 | "defaultBackends": [
69 | "KatipBK"
70 | ],
71 | "defaultScribes": [
72 | [
73 | "StdoutSK",
74 | "stdout"
75 | ]
76 | ],
77 | "hasEKG": 12788,
78 | "hasPrometheus": [
79 | "127.0.0.1",
80 | 12798
81 | ],
82 | "minSeverity": "Info",
83 | "options": {
84 | "mapBackends": {
85 | "cardano.node.metrics": [
86 | "EKGViewBK"
87 | ],
88 | "cardano.node.resources": [
89 | "EKGViewBK"
90 | ]
91 | },
92 | "mapSubtrace": {
93 | "cardano.node.metrics": {
94 | "subtrace": "Neutral"
95 | }
96 | }
97 | },
98 | "rotation": {
99 | "rpKeepFilesNum": 10,
100 | "rpLogLimitBytes": 5000000,
101 | "rpMaxAgeHours": 24
102 | },
103 | "setupBackends": [
104 | "KatipBK"
105 | ],
106 | "setupScribes": [
107 | {
108 | "scFormat": "ScText",
109 | "scKind": "StdoutSK",
110 | "scName": "stdout",
111 | "scRotation": null
112 | }
113 | ]
114 | }
115 |
--------------------------------------------------------------------------------