Skip to content

Commit

Permalink
add WitnessCountCtx
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Nov 29, 2022
1 parent 791541d commit c6f22f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/wallet/api/http/Cardano/Wallet/Api/Types/Transaction.hs
Expand Up @@ -29,6 +29,7 @@ module Cardano.Wallet.Api.Types.Transaction
, ApiWitnessCount (..)
, mkApiWitnessCount
, ResourceContext (..)
, WitnessCountCtx (..)
)
where

Expand Down Expand Up @@ -175,6 +176,17 @@ mkApiWitnessCount WitnessCount {verificationKey, scripts, bootstrap} =
, bootstrap
}

-- WitnessCount context is needed to differentiate verification keys present
-- in native scripts.
-- In shelley wallets they could be present due to only policy verification key.
-- In multisig wallet they could stem from payment, policy and delegation roles,
-- and as minting/burning and delegation support comes will be extended in needed
-- data to differentiate that.
data WitnessCountCtx =
ShelleyWalletCtx | SharedWalletCtx
deriving (Eq, Generic, Show)
deriving anyclass NFData

data ApiTxInputGeneral (n :: NetworkDiscriminant) =
ExternalInput (ApiT TxIn)
| WalletInput (ApiWalletInput n)
Expand Down

0 comments on commit c6f22f9

Please sign in to comment.