Copyright | © 2018-2020 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
This module provides a half-typed Servant client for the cardano-wallet V2 API.
The functions in this module can be run with "Servant.Client.runClientM".
Synopsis
-
data
WalletClient
wallet =
WalletClient
{
- deleteWallet :: ApiT WalletId -> ClientM ()
- getWallet :: ApiT WalletId -> ClientM wallet
- getWalletUtxoStatistics :: ApiT WalletId -> ClientM ApiUtxoStatistics
- getWalletUtxoSnapshot :: ApiT WalletId -> ClientM ApiWalletUtxoSnapshot
- listWallets :: ClientM [wallet]
- postWallet :: PostData wallet -> ClientM wallet
- putWallet :: ApiT WalletId -> WalletPutData -> ClientM wallet
- putWalletPassphrase :: ApiT WalletId -> WalletPutPassphraseFormat wallet -> ClientM NoContent
- walletClient :: WalletClient ApiWallet
- byronWalletClient :: WalletClient ApiByronWallet
-
data
TransactionClient
=
TransactionClient
{
- listTransactions :: ApiT WalletId -> Maybe Iso8601Time -> Maybe Iso8601Time -> Maybe ( ApiT SortOrder ) -> Bool -> ClientM [ ApiTransactionT Value ]
- signTransaction :: ApiT WalletId -> ApiSignTransactionPostData -> ClientM ApiSerialisedTransaction
- postTransaction :: ApiT WalletId -> PostTransactionOldDataT Value -> ClientM ( ApiTransactionT Value )
- postTransactionFee :: ApiT WalletId -> PostTransactionFeeOldDataT Value -> ClientM ApiFee
- postExternalTransaction :: ApiBytesT ' Base64 SerialisedTx -> ClientM ApiTxId
- deleteTransaction :: ApiT WalletId -> ApiTxId -> ClientM NoContent
- getTransaction :: ApiT WalletId -> ApiTxId -> TxMetadataSchema -> ClientM ( ApiTransactionT Value )
- constructTransaction :: ApiT WalletId -> ApiConstructTransactionDataT Value -> ClientM ( ApiConstructTransactionT Value )
- balanceTransaction :: ApiT WalletId -> ApiBalanceTransactionPostDataT Value -> ClientM ApiSerialisedTransaction
- decodeTransaction :: ApiT WalletId -> ApiSerialisedTransaction -> ClientM ( ApiDecodedTransactionT Value )
- submitTransaction :: ApiT WalletId -> ApiSerialisedTransaction -> ClientM ApiTxId
- transactionClient :: TransactionClient
- byronTransactionClient :: TransactionClient
-
data
AddressClient
=
AddressClient
{
- listAddresses :: ApiT WalletId -> Maybe ( ApiT AddressState ) -> ClientM [ Value ]
- inspectAddress :: Text -> ClientM Value
- postRandomAddress :: ApiT WalletId -> ApiPostRandomAddressData -> ClientM ( ApiAddressT Value )
- putRandomAddress :: ApiT WalletId -> ApiAddressIdT Value -> ClientM NoContent
- putRandomAddresses :: ApiT WalletId -> ApiPutAddressesDataT Value -> ClientM NoContent
- addressClient :: AddressClient
- byronAddressClient :: AddressClient
-
data
StakePoolClient
apiPool =
StakePoolClient
{
- listPools :: Maybe ( ApiT Coin ) -> ClientM [apiPool]
- joinStakePool :: ApiPoolId -> ApiT WalletId -> ApiWalletPassphrase -> ClientM ( ApiTransactionT Value )
- quitStakePool :: ApiT WalletId -> ApiWalletPassphrase -> ClientM ( ApiTransactionT Value )
- stakePoolClient :: forall apiPool. FromJSON apiPool => StakePoolClient apiPool
- data NetworkClient = NetworkClient { }
- networkClient :: NetworkClient
API Clients
data WalletClient wallet Source #
This data type encapsulates the client functions for all endpoints of the cardano-wallet V2 API.
WalletClient | |
|
walletClient :: WalletClient ApiWallet Source #
Produces a
WalletClient
working against the /wallets API.
byronWalletClient :: WalletClient ApiByronWallet Source #
Produces a
WalletClient
working against the /wallets API.
data TransactionClient Source #
transactionClient :: TransactionClient Source #
Produces a 'TransactionClient t' working against the /wallets API.
byronTransactionClient :: TransactionClient Source #
Produces a 'TransactionClient n' working against the /byron-wallets API.
data AddressClient Source #
AddressClient | |
|
addressClient :: AddressClient Source #
Produces an 'AddressClient n' working against the /wallets API
byronAddressClient :: AddressClient Source #
Produces an 'AddressClient n' working against the /wallets API
data StakePoolClient apiPool Source #
StakePoolClient | |
|
stakePoolClient :: forall apiPool. FromJSON apiPool => StakePoolClient apiPool Source #
Produces an 'StakePoolsClient n' working against the /stake-pools API
data NetworkClient Source #
networkClient :: NetworkClient Source #
Produces a
NetworkClient