Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
newtype
TokenPolicyId
=
UnsafeTokenPolicyId
{
- unTokenPolicyId :: Hash "TokenPolicy"
- newtype TokenName = UnsafeTokenName { }
- mkTokenName :: ByteString -> Either String TokenName
- nullTokenName :: TokenName
- tokenNameMaxLength :: Int
- newtype TokenFingerprint = UnsafeTokenFingerprint { }
- mkTokenFingerprint :: TokenPolicyId -> TokenName -> TokenFingerprint
- data AssetMetadata = AssetMetadata { }
-
newtype
AssetURL
=
AssetURL
{
- unAssetURL :: URI
- newtype AssetLogo = AssetLogo { }
- newtype AssetDecimals = AssetDecimals { }
- validateMetadataDecimals :: AssetDecimals -> Either String AssetDecimals
- validateMetadataName :: Text -> Either String Text
- validateMetadataTicker :: Text -> Either String Text
- validateMetadataDescription :: Text -> Either String Text
- validateMetadataURL :: Text -> Either String AssetURL
- validateMetadataLogo :: AssetLogo -> Either String AssetLogo
Token Policies
newtype TokenPolicyId Source #
Token policy identifiers, represented by the hash of the monetary policy script.
UnsafeTokenPolicyId |
Construct a
|
|
Instances
Token Names
Token names, defined by the monetary policy script.
UnsafeTokenName |
Construct a
|
Instances
mkTokenName :: ByteString -> Either String TokenName Source #
Construct a
TokenName
, validating that the length does not exceed
tokenNameMaxLength
.
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
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
The validated URL for the asset.
Instances
Eq AssetURL Source # | |
Ord AssetURL Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy |
|
Show AssetURL Source # | |
Generic AssetURL Source # | |
NFData AssetURL Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy |
|
ToJSON AssetURL Source # | |
FromJSON AssetURL Source # | |
ToText AssetURL Source # | |
FromText AssetURL Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy |
|
ToJSON ( ApiT AssetURL ) Source # | |
FromJSON ( ApiT AssetURL ) Source # | |
type Rep AssetURL Source # | |
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
)))
|
Specify an asset logo as an image data payload
Instances
Eq AssetLogo Source # | |
Ord AssetLogo Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy |
|
Show AssetLogo Source # | |
Generic AssetLogo Source # | |
NFData AssetLogo Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy |
|
ToJSON AssetLogo Source # | |
FromJSON AssetLogo Source # | |
ToJSON ( ApiT AssetLogo ) Source # | |
FromJSON ( ApiT AssetLogo ) Source # | |
type Rep AssetLogo Source # | |
Defined in Cardano.Wallet.Primitive.Types.TokenPolicy
type
Rep
AssetLogo
=
D1
('
MetaData
"AssetLogo" "Cardano.Wallet.Primitive.Types.TokenPolicy" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" '
True
) (
C1
('
MetaCons
"AssetLogo" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"unAssetLogo") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
ByteString
)))
|
newtype AssetDecimals Source #