cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Primitive.Types.TokenPolicy

Synopsis

Token Policies

newtype TokenPolicyId Source #

Token policy identifiers, represented by the hash of the monetary policy script.

Constructors

UnsafeTokenPolicyId

Construct a TokenPolicyId without any validation.

Fields

Instances

Instances details
Eq TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Read TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Hashable TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromJSON TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Buildable TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

PersistFieldSql TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Types

PersistField TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Types

ToText TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromText TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

SymbolToField "txCollateralOutTokenPolicyId" TxCollateralOutToken TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

SymbolToField "txOutTokenPolicyId" TxOutToken TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

SymbolToField "utxoTokenPolicyId" UTxOToken TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

ToJSON ( ApiT TokenPolicyId ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT TokenPolicyId ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep TokenPolicyId Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep TokenPolicyId = D1 (' MetaData "TokenPolicyId" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "UnsafeTokenPolicyId" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTokenPolicyId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Hash "TokenPolicy"))))

Token Names

newtype TokenName Source #

Token names, defined by the monetary policy script.

Constructors

UnsafeTokenName

Construct a TokenName without any validation.

Instances

Instances details
Eq TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Read TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Hashable TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromJSON TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Buildable TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

PersistFieldSql TokenName Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Types

PersistField TokenName Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Types

ToText TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromText TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

SymbolToField "txCollateralOutTokenName" TxCollateralOutToken TokenName Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

SymbolToField "txOutTokenName" TxOutToken TokenName Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

SymbolToField "utxoTokenName" UTxOToken TokenName Source #
Instance details

Defined in Cardano.Wallet.DB.Sqlite.Schema

ToJSON ( ApiT TokenName ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT TokenName ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep TokenName Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep TokenName = D1 (' MetaData "TokenName" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "UnsafeTokenName" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTokenName") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ByteString )))

nullTokenName :: TokenName Source #

The empty asset name.

Asset names may be empty, where a monetary policy script only mints a single asset, or where one asset should be considered as the "default" token for the policy.

tokenNameMaxLength :: Int Source #

The maximum length of a valid token name.

Token Fingerprints

newtype TokenFingerprint Source #

Instances

Instances details
Eq TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Read TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Hashable TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToText TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromText TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON ( ApiT TokenFingerprint ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT TokenFingerprint ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep TokenFingerprint Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep TokenFingerprint = D1 (' MetaData "TokenFingerprint" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "UnsafeTokenFingerprint" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTokenFingerprint") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Text )))

mkTokenFingerprint :: TokenPolicyId -> TokenName -> TokenFingerprint Source #

Construct a fingerprint from a TokenPolicyId and TokenName . The fingerprint is not necessarily unique, but can be used in user-facing interfaces as a comparison mechanism.

Token Metadata

data AssetMetadata Source #

Information about an asset, from a source external to the chain.

Instances

Instances details
Eq AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep AssetMetadata Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

newtype AssetURL Source #

The validated URL for the asset.

Constructors

AssetURL

Instances

Instances details
Eq AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON AssetURL Source #
Instance details

Defined in Cardano.Wallet.TokenMetadata.MockServer

FromJSON AssetURL Source #
Instance details

Defined in Cardano.Wallet.TokenMetadata

ToText AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromText AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON ( ApiT AssetURL ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT AssetURL ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep AssetURL Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep AssetURL = D1 (' MetaData "AssetURL" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "AssetURL" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unAssetURL") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 URI )))

newtype Source #

Specify an asset logo as an image data payload

Instances

newtype AssetDecimals Source #

Instances

Instances details
Eq AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Ord AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Show AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

Generic AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

NFData AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.TokenMetadata.MockServer

FromJSON AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.TokenMetadata

ToText AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

FromText AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

ToJSON ( ApiT AssetDecimals ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT AssetDecimals ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep AssetDecimals Source #
Instance details

Defined in Cardano.Wallet.Primitive.Types.TokenPolicy

type Rep AssetDecimals = D1 (' MetaData "AssetDecimals" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "AssetDecimals" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unAssetDecimals") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int )))