You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<htmllang="en"><head><metahttp-equiv="Content-Type" content="text/html; charset=UTF-8"><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><metaname="copyright" content="(C) Copyright 2020"><metaname="DC.rights.owner" content="(C) Copyright 2020"><metaname="DC.type" content="concept"><metaname="description" content="Activity Cards show relevant blockchain events, as well as relevant off-chain activities. They serve as a library of what is possible and a timeline of what happened."><metaname="DC.relation" scheme="URI" content="Card.html"><metaname="DC.relation" scheme="URI" content="elements/card.html"><metaname="DC.relation" scheme="URI" content="elements/cards.html"><metaname="DC.format" content="HTML5"><metaname="DC.identifier" content="concept_rpz_3jl_mmb"><linkrel="stylesheet" type="text/css" href="css/commonltr.css"><linkrel="stylesheet" type="text/css" href="css/custom.css"><title>ActivityCard</title>
<pclass="p">Activity Cards are meant to show the history of a token. This might seem trivial, since
37
+
any wallets connects to a blockchain, which already serves a shared history of
38
+
transactions.</p>
39
+
<pclass="p">But if you ever used dApps with a standard wallet, you know how important Activity Cards
40
+
are. Usually the wallet shows only transactions, in best cases, it also shows the token
41
+
involved. This might be enough for plain value transfers. </p>
42
+
<pclass="p">But if you have token interacting with smart contracts - like, lending a token,
43
+
exchanging tokens, (or in the future, renting a car) - the information of a plain
44
+
transaction gets close to zero. Your wallet simply doesn't understand what happened.
45
+
To make it understand what has happened, the wallet developers need to understand
46
+
each smart contract and implement its logic in the wallet. This might work for a few
47
+
popular token - but it can never scale to a large and diversified token
48
+
universe.</p>
49
+
<pclass="p">Activity Cards solve this problem. The card is assigned to a token and creates, stores
50
+
and loads <aclass="xref" href="DataObjects.html" title="With Data Objects you can add data to a TokenScript. Data objects are in a format that allows efficient signing and onchain storage.">Data Objects</a>. This makes wallets suddenly smart: They remember not only
51
+
the transaction, but also the purpose of the transaction - that a user rented a car,
52
+
lended or exchanged a token and so on. And all the wallet has to do is to download the
53
+
TokenScript.</p>
54
+
<pclass="p">Furthermore, Activity Cards remember offchain activities: That you created a Magic Link
55
+
to allow someone else to withdraw tokens from your wallet, than your wallet displayed a
56
+
QR code at a gate, that you called an API with an Action Card and so on.</p>
57
+
<pclass="p">To sum it up: Activity Cards allow token issuers to create customized history records for
58
+
their token.</p>
59
+
</section><sectionclass="section"><h2class="title sectiontitle">How Activity Card works with Ethereum</h2>
60
+
61
+
<divclass="p">
62
+
<divclass="note note note_note"><spanclass="note__title">Note:</span> that this code might change with the release of AlphaWallet implementing Activity
63
+
Cards.</div>
64
+
</div>
65
+
<pclass="p">An ActivityCard is based on an event. Events themselves are not described in the
66
+
activity card, but rather instead sourced as a data module. Data module is covered
<span><bold><h3>Gave approval to move ${this.props.amount} ${this.props.symbol} to ${this.props.to}</h3></bold></span>
document.getElementById(tokenIdCard).innerHTML = new Token(currentTokenInstance).render();
118
+
};</code></pre>
119
+
<pclass="p">As in Action Cards, the JavaScript file renders what the user will see: It displays the
120
+
message that he gave approval for address x to move y token. It would also be possible
121
+
to add a link to the transaction on any blockchain explorer and more.</p>
122
+
</section>
123
+
</div>
124
+
<navrole="navigation" class="related-links"><divclass="familylinks"><divclass="parentlink"><strong>Parent topic:</strong><aclass="link" href="Card.html" title="Cards are a fundamental part of Tokenscript. They define how the token behaves in the wallet and in web pages. They are the only part of Tokenscript which is visible for the user.">Card</a></div></div><divclass="linklist relref"><strong>Related reference</strong><br><ulclass="linklist"><liclass="linklist"><aclass="link" href="elements/card.html" title="card element defines a Card"><card> element</a></li><liclass="linklist"><aclass="link" href="elements/cards.html" title="cards element is a container of multiple Card. It can be used as a root element of a TokenScript File."><cards> element</a></li></ul></div></nav></article></main></div></div></body></html>
0 commit comments