Copyright | © 2018-2020 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
Type-safe endpoint accessors for the wallet API. Under normal circumstances,
one would prefer to use
WalletClient
from
Client
and
not to bother with endpoints at all.
Yet, in some cases (like in black-box testing), one could want to purposely send malformed requests to specific endpoints. Thus, this module facilitates the construction of valid endpoints that'd be accepted by the server, and for which, users are free to send all sort of data as payload, valid or invalid.
This module is meant to be used via qualified imports and with
type-applications since all exposed functions are type ambiguous in a
variable
style
of type
WalletStyle
.
import qualified Cardano.Wallet.Api.Link as Link
For examples:
>>>
Link.deleteWallet @'Shelley myWallet
( "DELETE", "/v2/wallets/2512a00e9653fe49a44a5886202e24d77eeb998f" )
>>>
Link.getWallet @('Byron 'Icarus) myWallet
( "GET", "/v2/byron-wallets/2512a00e9653fe49a44a5886202e24d77eeb998f" )
Synopsis
- deleteWallet :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- getWallet :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- listWallets :: forall (style :: WalletStyle ). Discriminate style => ( Method , Text )
- postWallet :: PostWallet style => ( Method , Text )
- putWallet :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- putWalletPassphrase :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- getWalletUtxoSnapshot :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- getUTxOsStatistics :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- createMigrationPlan :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- migrateWallet :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- getWalletKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Role -> DerivationIndex -> Maybe Bool -> ( Method , Text )
- signMetadata :: forall w. HasType ( ApiT WalletId ) w => w -> Role -> DerivationIndex -> ( Method , Text )
- postAccountKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> DerivationIndex -> ( Method , Text )
- getAccountKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe KeyFormat -> ( Method , Text )
- getPolicyKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe Bool -> ( Method , Text )
- postPolicyKey :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> Maybe Bool -> ( Method , Text )
- postPolicyId :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- postRandomAddress :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- putRandomAddresses :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- listAddresses :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- listAddresses' :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe AddressState -> ( Method , Text )
- inspectAddress :: ApiAddressInspectData -> ( Method , Text )
- postAnyAddress :: ( Method , Text )
- selectCoins :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- listAssets :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- getAsset :: forall w. HasType ( ApiT WalletId ) w => w -> TokenPolicyId -> TokenName -> ( Method , Text )
- listByronAssets :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- getByronAsset :: forall w. HasType ( ApiT WalletId ) w => w -> TokenPolicyId -> TokenName -> ( Method , Text )
- createTransactionOld :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- listTransactions :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text )
- listTransactions' :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> Maybe Natural -> Maybe Iso8601Time -> Maybe Iso8601Time -> Maybe SortOrder -> ( Method , Text )
- getTransactionFeeOld :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- deleteTransaction :: forall (style :: WalletStyle ) w t. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w, HasType ( ApiT ( Hash "Tx")) t) => w -> t -> ( Method , Text )
- getTransaction :: forall (style :: WalletStyle ) w t. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w, HasType ( ApiT ( Hash "Tx")) t) => w -> t -> ( Method , Text )
- createUnsignedTransaction :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- signTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- balanceTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- decodeTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- submitTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text )
- listStakePools :: Maybe Coin -> ( Method , Text )
- listStakeKeys :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- joinStakePool :: forall s w. ( HasType ( ApiT PoolId ) s, HasType ( ApiT WalletId ) w) => s -> w -> ( Method , Text )
- quitStakePool :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- getDelegationFee :: forall w. HasType ( ApiT WalletId ) w => w -> ( Method , Text )
- postPoolMaintenance :: ( Method , Text )
- getPoolMaintenance :: ( Method , Text )
- getNetworkInfo :: ( Method , Text )
- getNetworkParams :: ( Method , Text )
- getNetworkClock :: ( Method , Text )
- getNetworkClock' :: Bool -> ( Method , Text )
- postExternalTransaction :: ( Method , Text )
- putSettings :: ( Method , Text )
- getSettings :: ( Method , Text )
- getCurrentSMASHHealth :: ( Method , Text )
- patchSharedWallet :: forall w. HasType ( ApiT WalletId ) w => w -> CredentialType -> ( Method , Text )
- class PostWallet (style :: WalletStyle )
- class Discriminate (style :: WalletStyle )
Wallets
deleteWallet :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
getWallet :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
listWallets :: forall (style :: WalletStyle ). Discriminate style => ( Method , Text ) Source #
postWallet :: PostWallet style => ( Method , Text ) Source #
putWallet :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
putWalletPassphrase :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
getWalletUtxoSnapshot :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
getUTxOsStatistics :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
createMigrationPlan :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
migrateWallet :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
WalletKeys
getWalletKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Role -> DerivationIndex -> Maybe Bool -> ( Method , Text ) Source #
signMetadata :: forall w. HasType ( ApiT WalletId ) w => w -> Role -> DerivationIndex -> ( Method , Text ) Source #
postAccountKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> DerivationIndex -> ( Method , Text ) Source #
getAccountKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe KeyFormat -> ( Method , Text ) Source #
getPolicyKey :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe Bool -> ( Method , Text ) Source #
postPolicyKey :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> Maybe Bool -> ( Method , Text ) Source #
postPolicyId :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
Addresses
listAddresses :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
listAddresses' :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> Maybe AddressState -> ( Method , Text ) Source #
inspectAddress :: ApiAddressInspectData -> ( Method , Text ) Source #
postAnyAddress :: ( Method , Text ) Source #
CoinSelections
selectCoins :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
Assets
getAsset :: forall w. HasType ( ApiT WalletId ) w => w -> TokenPolicyId -> TokenName -> ( Method , Text ) Source #
getByronAsset :: forall w. HasType ( ApiT WalletId ) w => w -> TokenPolicyId -> TokenName -> ( Method , Text ) Source #
Transactions
createTransactionOld :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
listTransactions :: forall (style :: WalletStyle ) w. ( Discriminate style, HasType ( ApiT WalletId ) w) => w -> ( Method , Text ) Source #
listTransactions' :: forall (style :: WalletStyle ) w. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w) => w -> Maybe Natural -> Maybe Iso8601Time -> Maybe Iso8601Time -> Maybe SortOrder -> ( Method , Text ) Source #
getTransactionFeeOld :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
deleteTransaction :: forall (style :: WalletStyle ) w t. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w, HasType ( ApiT ( Hash "Tx")) t) => w -> t -> ( Method , Text ) Source #
getTransaction :: forall (style :: WalletStyle ) w t. ( HasCallStack , Discriminate style, HasType ( ApiT WalletId ) w, HasType ( ApiT ( Hash "Tx")) t) => w -> t -> ( Method , Text ) Source #
createUnsignedTransaction :: forall style w. ( HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
signTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
balanceTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
decodeTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
submitTransaction :: forall style w. ( HasCallStack , HasType ( ApiT WalletId ) w, Discriminate style) => w -> ( Method , Text ) Source #
StakePools
joinStakePool :: forall s w. ( HasType ( ApiT PoolId ) s, HasType ( ApiT WalletId ) w) => s -> w -> ( Method , Text ) Source #
postPoolMaintenance :: ( Method , Text ) Source #
getPoolMaintenance :: ( Method , Text ) Source #
Network
getNetworkInfo :: ( Method , Text ) Source #
getNetworkParams :: ( Method , Text ) Source #
getNetworkClock :: ( Method , Text ) Source #
Proxy
postExternalTransaction :: ( Method , Text ) Source #
Settings
putSettings :: ( Method , Text ) Source #
getSettings :: ( Method , Text ) Source #
Utils
getCurrentSMASHHealth :: ( Method , Text ) Source #
Shared Wallets
patchSharedWallet :: forall w. HasType ( ApiT WalletId ) w => w -> CredentialType -> ( Method , Text ) Source #
class PostWallet (style :: WalletStyle ) Source #
Instances
PostWallet ' Shelley Source # | |
Defined in Cardano.Wallet.Api.Link postWallet :: ( Method , Text ) Source # |
|
PostWallet ' Byron Source # | |
Defined in Cardano.Wallet.Api.Link postWallet :: ( Method , Text ) Source # |
|
PostWallet ' Shared Source # | |
Defined in Cardano.Wallet.Api.Link postWallet :: ( Method , Text ) Source # |
class Discriminate (style :: WalletStyle ) Source #
discriminate
Instances
Discriminate ' Shelley Source # | |
Defined in Cardano.Wallet.Api.Link discriminate :: a -> a -> a -> a |
|
Discriminate ' Byron Source # | |
Defined in Cardano.Wallet.Api.Link discriminate :: a -> a -> a -> a |
|
Discriminate ' Shared Source # | |
Defined in Cardano.Wallet.Api.Link discriminate :: a -> a -> a -> a |