What Can TokenScript Do?
TokenScript can do so much that it would be easier to explain what it can’t do. Here are some examples for what TokenScript can add to a token:
Information: When a token implements TokenScript, a wallet or webapp can instantly learn about its name and abbreviation, get a description in several languages and an image file as a logo. The wallet can even querry an API, e. G. to get weather or exchange data. This information can adapt to the context.
History: The wallet can remember the detailed history of operations a token was involved, both onchain and offchain. Natively a wallet only knows transactions. With TokenScript it can tell the complete history of its token.
Create customized transactions: Smart contracts often require users to craft very customized transactions. Mostly this is done by a third party website and signed by your wallet. TokenScript instructs the wallet or webapp how to craft these transactions and can display a button to trigger them. Especially for websites this is no small deal: Instead of studying each smart contract and crafting the transactions by themselves, the web developers just need to import a TokenScript.
Integration with other token: Some operations of your token might require that the user holds another token. For example, a car sharing token might need you to own a car token and an insurance token. TokenScript defines and structures these integrations.
Attestations: You might have a use case for your token which requires attestations, be it per e-mail or from a government agency. TokenScript can trigger an attestation process directly in the wallet of the user and allow other parties to verify it. The wallet can store and use any kind of attestation file in privately.
Restrict operations: TokenScript can restrict the scope of operations. For examples, if you have a token for a world cup game, you can sell it - but only as long as the game has not ended. TokenScript can define any kind of rule for token transfers and usecases.
Proofs: TokenScript allows to add private or public proofs to Token operations. For example, an operation could only be valid if someone proofs to own 1000 Ether. With Zero-Knowledge-Proofs this can be done without revealing an address.
That are just some of the most important feature TokenScript can unlock. It enables everything you can think of if you have a framework to enrich a token with information and instructions a wallet can automatically get when the user receives a token.
Parent topic:Introduction to TokenScript