Module

Cardano.Wallet.Cip95

Interact with the wallet over CIP-95 interface description: https://cips.cardano.org/cip/CIP-0095

This code works by inspecting the window.cardano object, which should be injected by the wallet to the window.

#PubDrepKey

type PubDrepKey = String

A hex-encoded string representing 32-byte Ed25519 DRep public key, as described in CIP-0105.

#PubStakeKey

type PubStakeKey = String

A hex-encoded string representing 32-byte Ed25519 public key used as a staking credential.

#WalletName

#enable

enable :: WalletName -> Aff Api

Enables wallet and reads CIP-95 API if the wallet is available.

#getPubDrepKey

getPubDrepKey :: Api -> Aff PubDrepKey

Get the public DRep key associated with the connected wallet.

#getRegisteredPubStakeKeys

getRegisteredPubStakeKeys :: Api -> Aff (Array PubStakeKey)

Get the registered public stake keys associated with the connected wallet.

#getUnregisteredPubStakeKeys

getUnregisteredPubStakeKeys :: Api -> Aff (Array PubStakeKey)

Get the unregistered public stake keys associated with the connected wallet.

#signData

signData :: Api -> String -> Bytes -> Aff DataSignature

Request the wallet to inspect and provide a cryptographic signature for the supplied data.

#signTx

signTx :: Api -> Cbor -> Boolean -> Aff Cbor

Request the wallet to inspect and provide appropriate witnesses for the supplied transaction.

Re-exports from Cardano.Wallet.Cip30

#Api

data Api

A datatype representing a CIP-30 connection object.

Modules