| Maintainer | emi@haskell.fyi |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Agora.AuthorityToken
Description
Tokens acting as redeemable proofs of DAO authority.
Synopsis
- authorityTokenPolicy :: AuthorityToken -> ClosedTerm PMintingPolicy
- authorityTokensValidIn :: Term s (PCurrencySymbol :--> (PTxOut :--> PBool))
- singleAuthorityTokenBurned :: forall (keys :: KeyGuarantees) (amounts :: AmountGuarantees) (s :: S). Term s PCurrencySymbol -> Term s (PAsData PTxInfo) -> Term s (PValue keys amounts) -> Term s PBool
- newtype AuthorityToken = AuthorityToken {}
Documentation
authorityTokenPolicy :: AuthorityToken -> ClosedTerm PMintingPolicy Source #
Policy given AuthorityToken params.
Since: 0.1.0
authorityTokensValidIn :: Term s (PCurrencySymbol :--> (PTxOut :--> PBool)) Source #
Check that all GATs are valid in a particular TxOut. How this is checked: an AuthorityToken should never leave the Effect it was initially sent to, so we simply check that the script address the token resides in matches the TokenName. Since the TokenName was tagged upon mint with the Effect script it was sent to, this is enough to prove validity. In other words, check that all assets of a particular currency symbol are tagged with a TokenName that matches where they live.
Since: 0.1.0
singleAuthorityTokenBurned :: forall (keys :: KeyGuarantees) (amounts :: AmountGuarantees) (s :: S). Term s PCurrencySymbol -> Term s (PAsData PTxInfo) -> Term s (PValue keys amounts) -> Term s PBool Source #
Assert that a single authority token has been burned.
Since: 0.1.0
newtype AuthorityToken Source #
An AuthorityToken represents a proof that a particular token spent in the same transaction the AuthorityToken was minted. In effect, this means that the validator that locked such a token must have approved the transaction in which an AuthorityToken is minted. Said validator should be made aware of an AuthorityToken token's existence in order to prevent incorrect minting.
Since: 0.1.0
Constructors
| AuthorityToken | |
Fields
| |
Instances
| Generic AuthorityToken Source # | |
Defined in Agora.AuthorityToken Methods from :: AuthorityToken -> Rep AuthorityToken x Source # to :: Rep AuthorityToken x -> AuthorityToken Source # | |
| type Rep AuthorityToken Source # | Since: 0.1.0 |
Defined in Agora.AuthorityToken type Rep AuthorityToken = D1 ('MetaData "AuthorityToken" "Agora.AuthorityToken" "agora-0.1.0-C1o5klqsCO77ggIWQdJiNp" 'True) (C1 ('MetaCons "AuthorityToken" 'PrefixI 'True) (S1 ('MetaSel ('Just "authority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssetClass))) | |