Copyright | © 2018-2020 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
API handlers and server using the underlying wallet layer to provide endpoints reachable through HTTP.
Synopsis
- data Listen
- data ListenError
- data HostPreference
- data TlsConfiguration = TlsConfiguration { }
- start :: Settings -> Tracer IO ApiLog -> Maybe TlsConfiguration -> Socket -> Application -> IO ()
- serve :: HasServer api ('[] :: [ Type ]) => Proxy api -> Server api -> Application
- withListeningSocket :: HostPreference -> Listen -> ( Either ListenError ( Port , Socket ) -> IO a) -> IO a
- newApiLayer :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s RewardAccount , IsOurs s Address , AddressBookIso s, MaybeLight s) => Tracer IO WalletEngineLog -> ( Block , NetworkParameters ) -> NetworkLayer IO Block -> TransactionLayer k SealedTx -> DBFactory IO s k -> TokenMetadataClient IO -> ( WorkerCtx ctx -> WalletId -> IO ()) -> IO ctx
- delegationFee :: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, BoundedAddressLength k) => ctx -> ApiT WalletId -> Handler ApiFee
- deleteTransaction :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> ApiTxId -> Handler NoContent
- deleteWallet :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler NoContent
- derivePublicKey :: forall ctx s k ver. (ctx ~ ApiLayer s k, SoftDerivation k, WalletKey k, GetAccount s k) => ctx -> (( ByteString , Role ) -> VerificationKeyHashing -> ver) -> ApiT WalletId -> ApiT Role -> ApiT DerivationIndex -> Maybe Bool -> Handler ver
- getNetworkClock :: NtpClient -> Bool -> Handler ApiNetworkClock
- getNetworkInformation :: HasCallStack => NetworkId -> NetworkLayer IO Block -> ApiWalletMode -> Handler ApiNetworkInformation
- getNetworkParameters :: ( Block , NetworkParameters ) -> NetworkLayer IO Block -> TransactionLayer k SealedTx -> Handler ApiNetworkParameters
- getUTxOsStatistics :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler ApiUtxoStatistics
- getWalletUtxoSnapshot :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler ApiWalletUtxoSnapshot
- getWallet :: forall ctx s k apiWallet. (ctx ~ ApiLayer s k, HasWorkerRegistry s k ctx, HasDBFactory s k ctx) => ctx -> MkApiWallet ctx s apiWallet -> ApiT WalletId -> Handler (apiWallet, UTCTime )
- joinStakePool :: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, AddressIndexDerivationType k ~ ' Soft , DelegationAddress n k, GenChange s, IsOwned s k, SoftDerivation k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) => ctx -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> ApiPoolId -> ApiT WalletId -> ApiWalletPassphrase -> Handler ( ApiTransaction n)
- listAssets :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> Handler [ ApiAsset ]
- getAsset :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> ApiT TokenPolicyId -> ApiT TokenName -> Handler ApiAsset
- getAssetDefault :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> ApiT TokenPolicyId -> Handler ApiAsset
- listAddresses :: forall ctx s k n. (ctx ~ ApiLayer s k, CompareDiscovery s, KnownAddresses s) => ctx -> (s -> Address -> Maybe Address ) -> ApiT WalletId -> Maybe ( ApiT AddressState ) -> Handler [ ApiAddress n]
- listTransactions :: forall ctx s k n. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Maybe MinWithdrawal -> Maybe Iso8601Time -> Maybe Iso8601Time -> Maybe ( ApiT SortOrder ) -> TxMetadataSchema -> Handler [ ApiTransaction n]
- getTransaction :: forall ctx s k n. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> ApiTxId -> TxMetadataSchema -> Handler ( ApiTransaction n)
- constructTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), GenChange s, HardDerivation k, HasNetworkLayer IO ctx, IsOurs s Address , Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ArgGenChange s -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> ApiT WalletId -> ApiConstructTransactionData n -> Handler ( ApiConstructTransaction n)
- listWallets :: forall ctx s k apiWallet. (ctx ~ ApiLayer s k, NFData apiWallet) => ctx -> MkApiWallet ctx s apiWallet -> Handler [(apiWallet, UTCTime )]
- listStakeKeys :: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, HasNetworkLayer IO ctx, Typeable n, Typeable s) => ( Address -> Maybe RewardAccount ) -> ctx -> ApiT WalletId -> Handler ( ApiStakeKeys n)
- createMigrationPlan :: forall ctx n s k. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, IsOwned s k, Typeable n, Typeable s, WalletKey k) => ctx -> Maybe ApiWithdrawalPostData -> ApiT WalletId -> ApiWalletMigrationPlanPostData n -> Handler ( ApiWalletMigrationPlan n)
- migrateWallet :: forall ctx s k n p. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, HasNetworkLayer IO ctx, IsOwned s k, Typeable n, Typeable s, WalletKey k) => ctx -> Maybe ApiWithdrawalPostData -> ApiT WalletId -> ApiWalletMigrationPostData n p -> Handler ( NonEmpty ( ApiTransaction n))
- postExternalTransaction :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT SealedTx -> Handler ApiTxId
- postIcarusWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet
- postLedgerWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet
- postRandomAddress :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k, PaymentAddress n ByronKey ) => ctx -> ApiT WalletId -> ApiPostRandomAddressData -> Handler ( ApiAddress n)
- postRandomWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey ) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet
- postRandomWalletFromXPrv :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey , HasNetworkLayer IO ctx) => ctx -> ByronWalletFromXPrvPostData -> Handler ApiByronWallet
- signTransaction :: forall ctx s k. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), WalletKey k, IsOwned s k, HardDerivation k) => ctx -> ApiT WalletId -> ApiSignTransactionPostData -> Handler ApiSerialisedTransaction
- postTransactionOld :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), GenChange s, HardDerivation k, HasNetworkLayer IO ctx, IsOwned s k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> PostTransactionOldData n -> Handler ( ApiTransaction n)
- postTransactionFeeOld :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ApiT WalletId -> PostTransactionFeeOldData n -> Handler ApiFee
- postTrezorWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet
- postWallet :: forall ctx s k n. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , Typeable s, Typeable n, (k == SharedKey ) ~ ' False , AddressBookIso s, MaybeLight s) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> ( XPub -> k ' AccountK XPub ) -> WalletOrAccountPostData -> Handler ApiWallet
- postShelleyWallet :: forall ctx s k n. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , MaybeLight s, Typeable s, Typeable n, (k == SharedKey ) ~ ' False , AddressBookIso s) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> WalletPostData -> Handler ApiWallet
- postAccountWallet :: forall ctx s k n w. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , MaybeLight s, (k == SharedKey ) ~ ' False , Typeable n, AddressBookIso s) => ctx -> MkApiWallet ctx s w -> ( XPub -> k ' AccountK XPub ) -> ( WorkerCtx ctx -> WalletId -> IO ()) -> AccountPostData -> Handler w
- putByronWalletPassphrase :: forall ctx s k. ( WalletKey k, ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ByronWalletPutPassphraseData -> Handler NoContent
- putRandomAddress :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ( ApiT Address , Proxy n) -> Handler NoContent
- putRandomAddresses :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ApiPutAddressesData n -> Handler NoContent
- putWallet :: forall ctx s k apiWallet. ctx ~ ApiLayer s k => ctx -> MkApiWallet ctx s apiWallet -> ApiT WalletId -> WalletPutData -> Handler apiWallet
- putWalletPassphrase :: forall ctx s k. ( WalletKey k, ctx ~ ApiLayer s k, GetAccount s k, HardDerivation k) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> (k ' AccountK XPub -> XPub ) -> ApiT WalletId -> WalletPutPassphraseData -> Handler NoContent
- quitStakePool :: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, AddressIndexDerivationType k ~ ' Soft , DelegationAddress n k, GenChange s, HasNetworkLayer IO ctx, IsOwned s k, SoftDerivation k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) => ctx -> ApiT WalletId -> ApiWalletPassphrase -> Handler ( ApiTransaction n)
- selectCoins :: forall ctx s k n. (ctx ~ ApiLayer s k, SoftDerivation k, IsOurs s Address , GenChange s, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> ApiSelectCoinsPayments n -> Handler ( ApiCoinSelection n)
- selectCoinsForJoin :: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, DelegationAddress n k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), SoftDerivation k, Typeable n, Typeable s, BoundedAddressLength k) => ctx -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> PoolId -> WalletId -> Handler ( ApiCoinSelection n)
- selectCoinsForQuit :: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, DelegationAddress n k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), SoftDerivation k, Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ApiT WalletId -> Handler ( ApiCoinSelection n)
- signMetadata :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, HardDerivation k, AddressIndexDerivationType k ~ ' Soft , WalletKey k) => ctx -> ApiT WalletId -> ApiT Role -> ApiT DerivationIndex -> ApiWalletSignData -> Handler ByteString
- postAccountPublicKey :: forall ctx s k account. (ctx ~ ApiLayer s k, WalletKey k, GetPurpose k) => ctx -> ( ByteString -> KeyFormat -> Index ' Hardened ' PurposeK -> account) -> ApiT WalletId -> ApiT DerivationIndex -> ApiPostAccountKeyDataWithPurpose -> Handler account
- getAccountPublicKey :: forall ctx s k account. (ctx ~ ApiLayer s k, GetAccount s k, WalletKey k, GetPurpose k) => ctx -> ( ByteString -> KeyFormat -> Index ' Hardened ' PurposeK -> account) -> ApiT WalletId -> Maybe KeyFormat -> Handler account
- postSharedWallet :: forall ctx s k n. (s ~ SharedState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, Typeable n, k ~ SharedKey ) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> ( XPub -> k ' AccountK XPub ) -> ApiSharedWalletPostData -> Handler ApiSharedWallet
- patchSharedWallet :: forall ctx s k n. (s ~ SharedState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, Typeable n, k ~ SharedKey ) => ctx -> ( XPub -> k ' AccountK XPub ) -> CredentialType -> ApiT WalletId -> ApiSharedWalletPatchData -> Handler ApiSharedWallet
- mkSharedWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SharedState n k, HasWorkerRegistry s k ctx, SupportsDiscovery n k) => MkApiWallet ctx s ApiSharedWallet
- balanceTransaction :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, HasNetworkLayer IO ctx, GenChange s, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> ApiBalanceTransactionPostData n -> Handler ApiSerialisedTransaction
- decodeTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, IsOurs s Address , Typeable s, Typeable n, HasNetworkLayer IO ctx) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ( ApiDecodedTransaction n)
- submitTransaction :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, HasNetworkLayer IO ctx, IsOwned s k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ApiTxId
- getPolicyKey :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> Maybe Bool -> Handler ApiPolicyKey
- postPolicyKey :: forall ctx s (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s ShelleyKey , s ~ SeqState n ShelleyKey ) => ctx -> ApiT WalletId -> Maybe Bool -> ApiPostPolicyKeyData -> Handler ApiPolicyKey
- postPolicyId :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, WalletKey k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> ApiPostPolicyIdData -> Handler ApiPolicyId
- constructSharedTransaction :: forall ctx s k n. (k ~ SharedKey , s ~ SharedState n k, ctx ~ ApiLayer s k, GenChange s, HasNetworkLayer IO ctx, IsOurs s Address , BoundedAddressLength k) => ctx -> ArgGenChange s -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> ApiT WalletId -> ApiConstructTransactionData n -> Handler ( ApiConstructTransaction n)
- decodeSharedTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, IsOurs s Address , HasNetworkLayer IO ctx) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ( ApiDecodedTransaction n)
-
class
IsServerError
e
where
- toServerError :: e -> ServerError
- liftHandler :: IsServerError e => ExceptT e IO a -> Handler a
- apiError :: ServerError -> ApiErrorCode -> Text -> ServerError
- mkShelleyWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, IsOurs s Address , IsOurs s RewardAccount , HasWorkerRegistry s k ctx) => MkApiWallet ctx s ApiWallet
- mkLegacyWallet :: forall ctx s k. ( HasWorkerRegistry s k ctx, HasDBFactory s k ctx, KnownDiscovery s, HasNetworkLayer IO ctx, IsOurs s Address , IsOurs s RewardAccount ) => ctx -> WalletId -> Wallet s -> WalletMetadata -> Set Tx -> SyncProgress -> Handler ApiByronWallet
- withLegacyLayer :: forall byron icarus n a. (byron ~ ApiLayer ( RndState n) ByronKey , icarus ~ ApiLayer ( SeqState n IcarusKey ) IcarusKey ) => ApiT WalletId -> (byron, Handler a) -> (icarus, Handler a) -> Handler a
- withLegacyLayer' :: forall byron icarus n a. (byron ~ ApiLayer ( RndState n) ByronKey , icarus ~ ApiLayer ( SeqState n IcarusKey ) IcarusKey ) => ApiT WalletId -> (byron, Handler a, ErrWalletNotResponding -> Handler a) -> (icarus, Handler a, ErrWalletNotResponding -> Handler a) -> Handler a
- rndStateChange :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey ) => ctx -> ApiT WalletId -> Passphrase "user" -> Handler ( ArgGenChange s)
- withWorkerCtx :: forall ctx s k m a. ( HasWorkerRegistry s k ctx, HasDBFactory s k ctx, MonadIO m) => ctx -> WalletId -> ( ErrNoSuchWallet -> m a) -> ( ErrWalletNotResponding -> m a) -> ( WorkerCtx ctx -> m a) -> m a
- getCurrentEpoch :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> Handler EpochNo
- manageRewardBalance :: forall ctx s k (n :: NetworkDiscriminant ). ( HasLogger IO WalletWorkerLog ctx, HasNetworkLayer IO ctx, HasDBLayer IO s k ctx, Typeable s, Typeable n) => Proxy n -> ctx -> WalletId -> IO ()
- idleWorker :: ctx -> wid -> IO a
- data WalletEngineLog
Server Configuration
How the server should listen for incoming requests.
ListenOnPort Port |
Listen on given TCP port |
ListenOnRandomPort |
Listen on an unused TCP port, selected at random |
data ListenError Source #
ListenErrorAddressAlreadyInUse ( Maybe Port ) | |
ListenErrorOperationNotPermitted | |
ListenErrorHostDoesNotExist HostPreference | |
ListenErrorInvalidAddress HostPreference |
Instances
Eq ListenError Source # | |
Defined in Cardano.Wallet.Api.Server (==) :: ListenError -> ListenError -> Bool Source # (/=) :: ListenError -> ListenError -> Bool Source # |
|
Show ListenError Source # | |
Defined in Cardano.Wallet.Api.Server |
data HostPreference Source #
Which host to bind.
Note: The
IsString
instance recognizes the following special values:
-
*
meansHostAny
- "any IPv4 or IPv6 hostname" -
*4
meansHostIPv4
- "any IPv4 or IPv6 hostname, IPv4 preferred" -
!4
meansHostIPv4Only
- "any IPv4 hostname" -
*6
meansHostIPv6
@ - "any IPv4 or IPv6 hostname, IPv6 preferred" -
!6
meansHostIPv6Only
- "any IPv6 hostname"
Note that the permissive
*
values allow binding to an IPv4 or an
IPv6 hostname, which means you might be able to successfully bind
to a port more times than you expect (eg once on the IPv4 localhost
127.0.0.1 and again on the IPv6 localhost 0:0:0:0:0:0:0:1).
Any other value is treated as a hostname. As an example, to bind to the IPv4 local host only, use "127.0.0.1".
Instances
data TlsConfiguration Source #
Path to a x.509 PKI for mutual client-server authentication.
Instances
Show TlsConfiguration Source # | |
Defined in Cardano.Wallet.Api.Server.Tls |
Server Setup
start :: Settings -> Tracer IO ApiLog -> Maybe TlsConfiguration -> Socket -> Application -> IO () Source #
Start the application server, using the given settings and a bound socket.
serve :: HasServer api ('[] :: [ Type ]) => Proxy api -> Server api -> Application Source #
serve
allows you to implement an API and produce a wai
Application
.
Example:
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book -- POST /books server :: Server MyApi server = listAllBooks :<|> postBook where listAllBooks = ... postBook book = ... myApi :: Proxy MyApi myApi = Proxy app :: Application app = serve myApi server main :: IO () main = Network.Wai.Handler.Warp.run 8080 app
:: HostPreference |
Which host to bind. |
-> Listen |
Whether to listen on a given port, or random port. |
-> ( Either ListenError ( Port , Socket ) -> IO a) |
Action to run with listening socket. |
-> IO a |
Run an action with a TCP socket bound to a port specified by the
Listen
parameter.
ApiLayer
:: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s RewardAccount , IsOurs s Address , AddressBookIso s, MaybeLight s) | |
=> Tracer IO WalletEngineLog | |
-> ( Block , NetworkParameters ) | |
-> NetworkLayer IO Block | |
-> TransactionLayer k SealedTx | |
-> DBFactory IO s k | |
-> TokenMetadataClient IO | |
-> ( WorkerCtx ctx -> WalletId -> IO ()) |
Action to run concurrently with wallet restore |
-> IO ctx |
Create a new instance of the wallet layer.
Handlers
delegationFee :: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, BoundedAddressLength k) => ctx -> ApiT WalletId -> Handler ApiFee Source #
deleteTransaction :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> ApiTxId -> Handler NoContent Source #
deleteWallet :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler NoContent Source #
derivePublicKey :: forall ctx s k ver. (ctx ~ ApiLayer s k, SoftDerivation k, WalletKey k, GetAccount s k) => ctx -> (( ByteString , Role ) -> VerificationKeyHashing -> ver) -> ApiT WalletId -> ApiT Role -> ApiT DerivationIndex -> Maybe Bool -> Handler ver Source #
getNetworkClock :: NtpClient -> Bool -> Handler ApiNetworkClock Source #
getNetworkInformation :: HasCallStack => NetworkId -> NetworkLayer IO Block -> ApiWalletMode -> Handler ApiNetworkInformation Source #
getNetworkParameters :: ( Block , NetworkParameters ) -> NetworkLayer IO Block -> TransactionLayer k SealedTx -> Handler ApiNetworkParameters Source #
getUTxOsStatistics :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler ApiUtxoStatistics Source #
getWalletUtxoSnapshot :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Handler ApiWalletUtxoSnapshot Source #
getWallet :: forall ctx s k apiWallet. (ctx ~ ApiLayer s k, HasWorkerRegistry s k ctx, HasDBFactory s k ctx) => ctx -> MkApiWallet ctx s apiWallet -> ApiT WalletId -> Handler (apiWallet, UTCTime ) Source #
:: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, AddressIndexDerivationType k ~ ' Soft , DelegationAddress n k, GenChange s, IsOwned s k, SoftDerivation k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) | |
=> ctx | |
-> IO ( Set PoolId ) |
Known pools
We could maybe replace this with a
|
-> ( PoolId -> IO PoolLifeCycleStatus ) | |
-> ApiPoolId | |
-> ApiT WalletId | |
-> ApiWalletPassphrase | |
-> Handler ( ApiTransaction n) |
listAssets :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> Handler [ ApiAsset ] Source #
All assets associated with this wallet, and their metadata (if metadata is available). This list may include assets which have already been spent.
getAsset :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> ApiT TokenPolicyId -> ApiT TokenName -> Handler ApiAsset Source #
Look up a single asset and its metadata.
NOTE: This is slightly inefficient because it greps through the transaction history to check if the asset is associated with this wallet.
getAssetDefault :: forall ctx s k. (ctx ~ ApiLayer s k, IsOurs s Address , HasTokenMetadataClient ctx) => ctx -> ApiT WalletId -> ApiT TokenPolicyId -> Handler ApiAsset Source #
listAddresses :: forall ctx s k n. (ctx ~ ApiLayer s k, CompareDiscovery s, KnownAddresses s) => ctx -> (s -> Address -> Maybe Address ) -> ApiT WalletId -> Maybe ( ApiT AddressState ) -> Handler [ ApiAddress n] Source #
listTransactions :: forall ctx s k n. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> Maybe MinWithdrawal -> Maybe Iso8601Time -> Maybe Iso8601Time -> Maybe ( ApiT SortOrder ) -> TxMetadataSchema -> Handler [ ApiTransaction n] Source #
getTransaction :: forall ctx s k n. ctx ~ ApiLayer s k => ctx -> ApiT WalletId -> ApiTxId -> TxMetadataSchema -> Handler ( ApiTransaction n) Source #
constructTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), GenChange s, HardDerivation k, HasNetworkLayer IO ctx, IsOurs s Address , Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ArgGenChange s -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> ApiT WalletId -> ApiConstructTransactionData n -> Handler ( ApiConstructTransaction n) Source #
listWallets :: forall ctx s k apiWallet. (ctx ~ ApiLayer s k, NFData apiWallet) => ctx -> MkApiWallet ctx s apiWallet -> Handler [(apiWallet, UTCTime )] Source #
listStakeKeys :: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, HasNetworkLayer IO ctx, Typeable n, Typeable s) => ( Address -> Maybe RewardAccount ) -> ctx -> ApiT WalletId -> Handler ( ApiStakeKeys n) Source #
:: forall ctx n s k. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, IsOwned s k, Typeable n, Typeable s, WalletKey k) | |
=> ctx | |
-> Maybe ApiWithdrawalPostData |
What type of reward withdrawal to attempt |
-> ApiT WalletId |
Source wallet |
-> ApiWalletMigrationPlanPostData n |
Target addresses |
-> Handler ( ApiWalletMigrationPlan n) |
:: forall ctx s k n p. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, HasNetworkLayer IO ctx, IsOwned s k, Typeable n, Typeable s, WalletKey k) | |
=> ctx | |
-> Maybe ApiWithdrawalPostData |
What type of reward withdrawal to attempt |
-> ApiT WalletId | |
-> ApiWalletMigrationPostData n p | |
-> Handler ( NonEmpty ( ApiTransaction n)) |
postExternalTransaction :: forall ctx s k. ctx ~ ApiLayer s k => ctx -> ApiT SealedTx -> Handler ApiTxId Source #
postIcarusWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet Source #
postLedgerWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet Source #
postRandomAddress :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k, PaymentAddress n ByronKey ) => ctx -> ApiT WalletId -> ApiPostRandomAddressData -> Handler ( ApiAddress n) Source #
postRandomWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey ) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet Source #
postRandomWalletFromXPrv :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey , HasNetworkLayer IO ctx) => ctx -> ByronWalletFromXPrvPostData -> Handler ApiByronWallet Source #
signTransaction :: forall ctx s k. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), WalletKey k, IsOwned s k, HardDerivation k) => ctx -> ApiT WalletId -> ApiSignTransactionPostData -> Handler ApiSerialisedTransaction Source #
postTransactionOld :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), GenChange s, HardDerivation k, HasNetworkLayer IO ctx, IsOwned s k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> PostTransactionOldData n -> Handler ( ApiTransaction n) Source #
postTransactionFeeOld :: forall ctx s k n. (ctx ~ ApiLayer s k, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), HardDerivation k, Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ApiT WalletId -> PostTransactionFeeOldData n -> Handler ApiFee Source #
postTrezorWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, k ~ IcarusKey , HasWorkerRegistry s k ctx, PaymentAddress n IcarusKey , Typeable n) => ctx -> ByronWalletPostData '[12, 15, 18, 21, 24] -> Handler ApiByronWallet Source #
postWallet :: forall ctx s k n. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , Typeable s, Typeable n, (k == SharedKey ) ~ ' False , AddressBookIso s, MaybeLight s) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> ( XPub -> k ' AccountK XPub ) -> WalletOrAccountPostData -> Handler ApiWallet Source #
postShelleyWallet :: forall ctx s k n. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , MaybeLight s, Typeable s, Typeable n, (k == SharedKey ) ~ ' False , AddressBookIso s) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> WalletPostData -> Handler ApiWallet Source #
:: forall ctx s k n w. (s ~ SeqState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasWorkerRegistry s k ctx, IsOurs s RewardAccount , MaybeLight s, (k == SharedKey ) ~ ' False , Typeable n, AddressBookIso s) | |
=> ctx | |
-> MkApiWallet ctx s w | |
-> ( XPub -> k ' AccountK XPub ) | |
-> ( WorkerCtx ctx -> WalletId -> IO ()) |
Action to run concurrently with restore action |
-> AccountPostData | |
-> Handler w |
putByronWalletPassphrase :: forall ctx s k. ( WalletKey k, ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ByronWalletPutPassphraseData -> Handler NoContent Source #
putRandomAddress :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ( ApiT Address , Proxy n) -> Handler NoContent Source #
putRandomAddresses :: forall ctx s k n. (s ~ RndState n, k ~ ByronKey , ctx ~ ApiLayer s k) => ctx -> ApiT WalletId -> ApiPutAddressesData n -> Handler NoContent Source #
putWallet :: forall ctx s k apiWallet. ctx ~ ApiLayer s k => ctx -> MkApiWallet ctx s apiWallet -> ApiT WalletId -> WalletPutData -> Handler apiWallet Source #
putWalletPassphrase :: forall ctx s k. ( WalletKey k, ctx ~ ApiLayer s k, GetAccount s k, HardDerivation k) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> (k ' AccountK XPub -> XPub ) -> ApiT WalletId -> WalletPutPassphraseData -> Handler NoContent Source #
quitStakePool :: forall ctx s n k. (ctx ~ ApiLayer s k, s ~ SeqState n k, AddressIndexDerivationType k ~ ' Soft , DelegationAddress n k, GenChange s, HasNetworkLayer IO ctx, IsOwned s k, SoftDerivation k, Typeable n, Typeable s, WalletKey k, AddressBookIso s, BoundedAddressLength k) => ctx -> ApiT WalletId -> ApiWalletPassphrase -> Handler ( ApiTransaction n) Source #
selectCoins :: forall ctx s k n. (ctx ~ ApiLayer s k, SoftDerivation k, IsOurs s Address , GenChange s, Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> ApiSelectCoinsPayments n -> Handler ( ApiCoinSelection n) Source #
:: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, DelegationAddress n k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), SoftDerivation k, Typeable n, Typeable s, BoundedAddressLength k) | |
=> ctx | |
-> IO ( Set PoolId ) |
Known pools
We could maybe replace this with a
|
-> ( PoolId -> IO PoolLifeCycleStatus ) | |
-> PoolId | |
-> WalletId | |
-> Handler ( ApiCoinSelection n) |
selectCoinsForQuit :: forall ctx s n k. (s ~ SeqState n k, ctx ~ ApiLayer s k, DelegationAddress n k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), Bounded ( Index ( AddressIndexDerivationType k) ' AddressK ), SoftDerivation k, Typeable n, Typeable s, WalletKey k, BoundedAddressLength k) => ctx -> ApiT WalletId -> Handler ( ApiCoinSelection n) Source #
signMetadata :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, HardDerivation k, AddressIndexDerivationType k ~ ' Soft , WalletKey k) => ctx -> ApiT WalletId -> ApiT Role -> ApiT DerivationIndex -> ApiWalletSignData -> Handler ByteString Source #
postAccountPublicKey :: forall ctx s k account. (ctx ~ ApiLayer s k, WalletKey k, GetPurpose k) => ctx -> ( ByteString -> KeyFormat -> Index ' Hardened ' PurposeK -> account) -> ApiT WalletId -> ApiT DerivationIndex -> ApiPostAccountKeyDataWithPurpose -> Handler account Source #
getAccountPublicKey :: forall ctx s k account. (ctx ~ ApiLayer s k, GetAccount s k, WalletKey k, GetPurpose k) => ctx -> ( ByteString -> KeyFormat -> Index ' Hardened ' PurposeK -> account) -> ApiT WalletId -> Maybe KeyFormat -> Handler account Source #
postSharedWallet :: forall ctx s k n. (s ~ SharedState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, HasWorkerRegistry s k ctx, Typeable n, k ~ SharedKey ) => ctx -> (( SomeMnemonic , Maybe SomeMnemonic ) -> Passphrase "encryption" -> k ' RootK XPrv ) -> ( XPub -> k ' AccountK XPub ) -> ApiSharedWalletPostData -> Handler ApiSharedWallet Source #
patchSharedWallet :: forall ctx s k n. (s ~ SharedState n k, ctx ~ ApiLayer s k, SoftDerivation k, MkKeyFingerprint k ( Proxy n, k ' AddressK XPub ), MkKeyFingerprint k Address , WalletKey k, HasDBFactory s k ctx, Typeable n, k ~ SharedKey ) => ctx -> ( XPub -> k ' AccountK XPub ) -> CredentialType -> ApiT WalletId -> ApiSharedWalletPatchData -> Handler ApiSharedWallet Source #
mkSharedWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SharedState n k, HasWorkerRegistry s k ctx, SupportsDiscovery n k) => MkApiWallet ctx s ApiSharedWallet Source #
balanceTransaction :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, HasNetworkLayer IO ctx, GenChange s, BoundedAddressLength k) => ctx -> ArgGenChange s -> ApiT WalletId -> ApiBalanceTransactionPostData n -> Handler ApiSerialisedTransaction Source #
decodeTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, IsOurs s Address , Typeable s, Typeable n, HasNetworkLayer IO ctx) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ( ApiDecodedTransaction n) Source #
submitTransaction :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, HasNetworkLayer IO ctx, IsOwned s k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ApiTxId Source #
getPolicyKey :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> Maybe Bool -> Handler ApiPolicyKey Source #
postPolicyKey :: forall ctx s (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s ShelleyKey , s ~ SeqState n ShelleyKey ) => ctx -> ApiT WalletId -> Maybe Bool -> ApiPostPolicyKeyData -> Handler ApiPolicyKey Source #
postPolicyId :: forall ctx s k (n :: NetworkDiscriminant ). (ctx ~ ApiLayer s k, WalletKey k, Typeable s, Typeable n) => ctx -> ApiT WalletId -> ApiPostPolicyIdData -> Handler ApiPolicyId Source #
constructSharedTransaction :: forall ctx s k n. (k ~ SharedKey , s ~ SharedState n k, ctx ~ ApiLayer s k, GenChange s, HasNetworkLayer IO ctx, IsOurs s Address , BoundedAddressLength k) => ctx -> ArgGenChange s -> IO ( Set PoolId ) -> ( PoolId -> IO PoolLifeCycleStatus ) -> ApiT WalletId -> ApiConstructTransactionData n -> Handler ( ApiConstructTransaction n) Source #
decodeSharedTransaction :: forall ctx s k n. (ctx ~ ApiLayer s k, IsOurs s Address , HasNetworkLayer IO ctx) => ctx -> ApiT WalletId -> ApiSerialisedTransaction -> Handler ( ApiDecodedTransaction n) Source #
Server error responses
class IsServerError e where Source #
Maps types to servant error responses.
toServerError :: e -> ServerError Source #
A structured human-readable error code to return to API clients.
Instances
liftHandler :: IsServerError e => ExceptT e IO a -> Handler a Source #
Lift our wallet layer into servant
Handler
, by mapping each error to a
corresponding servant error.
apiError :: ServerError -> ApiErrorCode -> Text -> ServerError Source #
Internals
mkShelleyWallet :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ SeqState n k, IsOurs s Address , IsOurs s RewardAccount , HasWorkerRegistry s k ctx) => MkApiWallet ctx s ApiWallet Source #
mkLegacyWallet :: forall ctx s k. ( HasWorkerRegistry s k ctx, HasDBFactory s k ctx, KnownDiscovery s, HasNetworkLayer IO ctx, IsOurs s Address , IsOurs s RewardAccount ) => ctx -> WalletId -> Wallet s -> WalletMetadata -> Set Tx -> SyncProgress -> Handler ApiByronWallet Source #
withLegacyLayer :: forall byron icarus n a. (byron ~ ApiLayer ( RndState n) ByronKey , icarus ~ ApiLayer ( SeqState n IcarusKey ) IcarusKey ) => ApiT WalletId -> (byron, Handler a) -> (icarus, Handler a) -> Handler a Source #
withLegacyLayer' :: forall byron icarus n a. (byron ~ ApiLayer ( RndState n) ByronKey , icarus ~ ApiLayer ( SeqState n IcarusKey ) IcarusKey ) => ApiT WalletId -> (byron, Handler a, ErrWalletNotResponding -> Handler a) -> (icarus, Handler a, ErrWalletNotResponding -> Handler a) -> Handler a Source #
Like
withLegacyLayer
but allow passing a custom handler for handling dead
workers.
rndStateChange :: forall ctx s k n. (ctx ~ ApiLayer s k, s ~ RndState n, k ~ ByronKey ) => ctx -> ApiT WalletId -> Passphrase "user" -> Handler ( ArgGenChange s) Source #
Handler for fetching the
ArgGenChange
for the
RndState
(i.e. the root
XPrv), necessary to derive new change addresses.
:: forall ctx s k m a. ( HasWorkerRegistry s k ctx, HasDBFactory s k ctx, MonadIO m) | |
=> ctx |
A context that has a registry |
-> WalletId |
Wallet to look for |
-> ( ErrNoSuchWallet -> m a) |
Wallet not present, handle error |
-> ( ErrWalletNotResponding -> m a) |
Wallet worker is dead, handle error |
-> ( WorkerCtx ctx -> m a) |
Do something with the wallet |
-> m a |
Run an action in a particular worker context. Fails if there's no worker for a given id.
Workers
manageRewardBalance :: forall ctx s k (n :: NetworkDiscriminant ). ( HasLogger IO WalletWorkerLog ctx, HasNetworkLayer IO ctx, HasDBLayer IO s k ctx, Typeable s, Typeable n) => Proxy n -> ctx -> WalletId -> IO () Source #
idleWorker :: ctx -> wid -> IO a Source #
Something to pass as the coworker action to
newApiLayer
, which does
nothing, and never exits.
Logging
data WalletEngineLog Source #
The type of log messages coming from the server
ApiLayer
, which may or
may not be associated with a particular worker thread.
Instances
Eq WalletEngineLog Source # | |
Defined in Cardano.Wallet.Api.Server (==) :: WalletEngineLog -> WalletEngineLog -> Bool Source # (/=) :: WalletEngineLog -> WalletEngineLog -> Bool Source # |
|
Show WalletEngineLog Source # | |
Defined in Cardano.Wallet.Api.Server |
|
ToText WalletEngineLog Source # | |
Defined in Cardano.Wallet.Api.Server toText :: WalletEngineLog -> Text Source # |
|
HasPrivacyAnnotation WalletEngineLog Source # | |
Defined in Cardano.Wallet.Api.Server getPrivacyAnnotation :: WalletEngineLog -> PrivacyAnnotation |
|
HasSeverityAnnotation WalletEngineLog Source # | |
Defined in Cardano.Wallet.Api.Server getSeverityAnnotation :: WalletEngineLog -> Severity |