“Blinks” for Polkadot
How to enable it? What is actually possible? Exploration, Feedback, TODOs, WIPs and DONEs
Blockchain links, or Blinks for short, are simple links that, when clicked, takes you to a simple mini dapp.
But what if that dapp was brought to you? To the place the link is located, and took away the need for you to click? This is what is called embedded blinks, magical widgets that become embedded mini Dapps, wherever the link is located…
…such as Twitter posts. The user just needs to paste a link into their post and hey presto! The post is transformed into an embedded dapp.
Tip some DOT directly from the Twitter post the link was added to…
Vote on a referendum directly from where you procrastinate.
To enable this embedding feature for the polkadot ecosystem, what is required is:
- TLDR; wallet extension providers will unlock this feature for the ecosystem
- A “blinks builder” so that anyone can create blinks easily.
- Setting a (standard) format for polkadot links + Public registry for all blinks
- Support as an “experimental feature” by all (or at least one of) the wallet extension providers ( talisman, polkadot-js, sub-wallet etc.). Blinks are reliant on browser wallet implementation/support, and can not be viewed/accessed without a browser extension.
We provide a solution for how blinks can work in polkadot, there are of course various ways to implement this.
A key purpose of this post is to inspire intrigue and to suggest controlled experimentation and collaboration with wallet extension providers who already have the distribution across the community.
Telegram group: Here be also polkadot blinks telegram.
What is a blink and how does it work?
There is no “official” definition of a blink, for the sake of defining blinks lets use two definitions:
General “blink” definition:
In general, a blink is a blockchain based link that (just like any link) you can click on, but it takes you to a page that is essentially a dapp which interacts with a blockchain. Just like this link here (I randomly selected it from the https://dial.to site). As you can see the link takes you to a simple page with simple calls to action. This is the general gist of what a blink is.
Magic blink definition (blink + extension = embedded blink = magic blink):
Now imagine that same general blink but now combine it with a browser extension, then the magic and possibility of web3 ensues (see web3 experience visions). The link which is shared into a post becomes an embedded dapp widget that brings web3 to your doorstep, thus, saving you from clicking a link, the link comes to you.
The magic blink works because the extension detects the link as you are scrolling on Twitter, and it modifies your post and injects the widget.
“The sound of injecting stuff into my webpage sounds scary. How do we know it’s safe?”
Well, you already trust your wallet extension provider, Talisman, PJS etc. You rely on them to interact with your private keys, so therefore you would be affording the same trust so they modify your twitter posts. The script injectors are benevolent parties.
The safety and security of the blinks comes down to implementation details, such as: does the wallet extension fetch from an external URL?” If so, what if that URL is compromised? Can the user inject a malicious script tag in the link?
Blinks rely on proper implementation and link sanitation and verification by the browser extension.
But the content itself could be a scam, which involves another layer of verification…
How do we know the blinks will be safe?
Is the blink itself deceptive, such as a button asking for “Donate 1 DOT” but its actually 100 DOT. We can explore how we design our initial version shortly. But, have a look at Solana (Dialect’s) security precautions, such as making sure the blinks content is not a scam with verification levels and a committee that votes on it, albeit centralized and off-chain. Polkadot can perhaps start a little more decentralized and on-chain from the get-go.
Solana Blinks Case study
Blinks(blockchain links) has recently come out of the Solana ecosystem, the goal is to create special links that the browser wallet converts to simple Action like interfaces, where users can easily interact with on-chain applications. So far has the company behind Solana blinks “Dialect labs” verified ~400 different blinks in their public blink registry. Phantom, Backpack and Solflare wallet providers have implemented Blinks support.
Solana Blinks Read more:
- Blog how to: A Complete Guide to Solana's Blink: Bringing On-Chain Operations to Twitter
- https://www.onlyblinks.com/
- Dialect Dashboard
- Actions and Blinks | Solana
- GitHub - dialectlabs/blinks
Dial.to provides a preview page for the blinks published using their registry:
Solana blinks have an api spec for their blinks, our version will keep pretty close to their metadata spec for easy translation if needed. However….
Solana Actions and Blinks require a centralized server…
Polkadot Blinks will be stored on-chain and are retrieved via light client or rpc call. Decentralised from the get-go.
Proof of concept
@KarimJDDA, product engineer and team lead at Parity, delivered a very useful experiment via his twitter post, where he was able to create a proof of concept,
This is a great initial validation from the Polkadot community
This inspired us (Bagpipes team) interested in bringing about Blinks… after talking to Karim, and the Braille UX (and Bifrost) team at the web3 summit.
For us at Bagpipes it is a “hell yes!”, but it also shifted our perspective in how web3 can play a role in the web2 world, acting as an exoskeleton over web2, rather just an off-ramp from web2 (see Vision for Web3 Experience below)…
How do we make Polkadot Blinks work with Twitter?
Tldr;
Its not with Twitter API, its a more custom and decentralised community driven approach, which requires an extension to make user interface modifications and custom scripting of the web page in question, in this case the twitter website.
Buttons and form fields would be rendered on to posts that contain a “Blink”.
Most Polkadot users have a wallet extension, therefore it can be added in wallet extensions, (Talisman, Nova, Wallet Connect, Subwallet, Polkadot JS, Fear, etc.)
Just Twitter?
Twitter posts can become mini dapps, or any other website, its not limited. The only requirement is those who have a supported extension in their browser.
Scenario:
-
The user is browsing through their x.com feed on their laptop,
-
Their polkadot supported wallet extension is running in their browser.
-
They scroll on to a post, which contains a special link (a blink).
-
The polkadot (or other) extension parses the link and modifies the post to become a web3 widget (embedded app containing fields, buttons and some info.)
Blinks can be used on ANY website and even be embedded in QR codes. Lots of applicable use cases.
# Solution:
“Create a call to action, generate a Blink.”
Anyone can create a blink easily, then share it on twitter.
A Blockchain link is a special link that generates a mini dapp through the extension, or (if they have the extension that supports it) the mini app is rendered into a twitter post.
Blink Builder
A simple user interface for users who want to turn their posts into embedded dapps.
We will start by offering a simple selection of Blink templates for the user to create their twitter post dapp, “Buy Now” and “Vote Now”
Buy Now:
- The user can customize a “Transfer” to create a fixed price
- or add a field to allow for custom bids.
- Buy now button.
Vote Now:
- the user adds the referendum that they want their twitter audience to vote on.
- The Vote choice: Aye, Nay, Split, Abstain.
- We can enforce all of these as a rule for a Blink (not just Aye);
- Amount to vote and be locked.
- Vote lock, the multiplier of the vote and corresponding lock up period.
- Vote Now button
also “Delegate Now”, “Stake Now”, etc… what else shall be prioritised?
There are two main users of Blinks, the creator and the consumer (end-user).
“Magic Blink” Journey
For someone that wants to add a blink to their TwitterX post.
- the creator designs the Blink with a Blink Builder. They can choose from a number call-to-actions (Transfer, vote, stake, mint, delegate, mint, etc)
E.g. Select Tip DOT Blink Template, select Recipient address.
Initial prototype, where you can design your blink to tip.
-
Creator generates the blink, and can share it with the community.
-
Creator adds the blink to a twitter post, and add the link with two emojis in front of the blink, e.g:
-
The extension wallet identifies the two emojis and attempts to render the buttons and fields into the post.
We have provided a PoC extension for firefox and chrome that is available here: GitHub - XcmSend/polkadot-extension: Simple browser extension for managing Polkadot and Substrate network accounts in a browser. Allows the signing of extrinsics using these accounts. Also provides a simple interface for compliant extensions for dapps..
- Here is the result (example):
Note: The extension does not have to fetch from a link even if it is whitelisted, because that still relies on the whitelisted site to not be compromised. Instead the link can either contain encoded data which is parsed by the extension, or the extension interacts with polkadot via light client (or RPC as fall back).
- The user clicks on the button “Tip 3 DOT”, which then takes them to either the signer directly or a another page which lets the user choose which wallet they would like to choose. This is dependent on extension implementation (this may be supported soon in PJS).
Bagpipes are enabling Blinks
We’re making it easy to generate a blink, and a wide range of mini-apps.
Just like how Solana has Actions and Blinks, a Bagpipe is an even easier (and more accessible) way for anyone in the community to create their own set of interactions with a blockchain, which can be connected to any use interface as forms with fields and buttons.
Here is the Bagpipes builder, where you can build a workflow of on-chain and off-chain interactions. The blinks builder is much simpler, but power users can connect them together to make powerful blinks from the bagpipes they design.
We have been working over the past year on making it super simple to create custom interactions with a blockchain with a visual no-code builder. We have been looking at making it simple enough to add widgets and buttons to websites, so that a website owner can turn their website into a DApp without the need for spending developer time.
A bagpipe is a set of actions the user has composed which interacts with the blockchain.
You can generate a blink out of your bagpipe.
WIP: Blinks MVP
on-chain blinks app, link creator, viewer and extension
-
Blink Builder MVP
- The builder lets you use a few template actions to create the Blink. Starting with transfer which enables tipping and donation, thereafter staking, and many other popular features.
-
Blinks Mini Dapp viewer
- An app that only connects to the blockchain with no backend server storage. It has local storage.
- The owner of the Blink shares the link, and a user clicks on it and takes them to a page, which is a mini app.
-
Enabling Embedded mini app for Twitter
- PJS fork extension:
- We have forked the polkadot js browser extension in order to get a proof of concept browser wallet that can convert links to blinks, That can be found here
- PJS fork extension:
-
The extension only fetches from RPC (or light client) to get the metadata of the blink
-
As a safety feature, the extension will check that the label of the button and the underlying number are the same, if not the blink will render an error.
-
Blink safety approach MVP
- Blinks will have different security based on their level of verification. The solana approach has so far been to allow the public registry of blinks to manually verify them. Putting the responsibility on the registry servers to verify that no malicious data has been added in the link.
- To start we will only generation of blinks from users with verified on-chain IDs (Reasonable).
- For basic safety, only users who have verified ID can generate a blink.
-
Blink on-chain registrar committee can add “audit” the blinks and pass them as humanly verified.
- the registrar will check for consistencies in the title description.
- Registrar will verify that link does not contain malicious script tags/obfuscated code.
- Registrars will block blinks that don’t fit the standard and verify ones that do by providing a whitelist and blacklist. This list can be added on-chain by appending a parsable string via remarkWithEvent, every ~1,000 blocks (TBD).
-
Gather information from Stakeholders:
- Speak to Parity team members managed PJS:
- Explored with @Iker, Parity about status of PJS Extension
- Support for Light Client is being explored
- @RyanLeeCode Light Client Dapp test: [TESTING]: support @substrate/discovery by ryanleecode · Pull Request #1389 · polkadot-js/extension · GitHub
- Substrate-connect wallet-template: How to guide for adding light client to extensions (with manifest v3 by google update
- Support for Light Client is being explored
- PR welcome, experimental feature if easily maintainable and not breaching the safety policy of PJS signer.
- Explored with @Iker, Parity about status of PJS Extension
- Speak to Parity team members managed PJS:
-
Form working group:
- Telegram general blinks channel
- Telegram cross-extension collaboration
TODO: Metadata Spec, Extension Docs
Proposal to all Polkadot extension providers.
Would you be hell-yessing your way to an experimental feature section for “Blinks”? Let’s collaborate on this.
Telegram group: inviting, PJS, Talisman, SubWallet, Fearless (and also Nova even though not an
All major polkadot browser wallets should agree on two things:
- 1: Link prefix( be blink:// polkadotlink://, etc)
- 2: Metadata JSON format for blinks.
What else can be created with “Magic” Blinks?
As a community we can support features that can really bring utility by showing tools through the extensions.
- Polkadot ID
- can be assigned to twitter user posts.
- Chain ratified roles
- Add labels on to: Ambassadors, marketers, treasury funded projects, collectives, voting DAOs, validators.
- Any ideas…?
- Claim NFT with one click
- Vote on a referendum in OpenGov. Aye or Nay Blink.
- Delegate Voting power with on click.
- Custom QR codes
- Why not print out stickers with QR codes that user can scan to view the simple UI of the application.
There is a risk in not applying Blinks to Polkadot in any form, as other communities adopt this they would have an advantage in engagement and accessible and frictionless interactivity.
Join Telegram: Polkadot Blinks Telegram Telegram: Join Group Chat
Blinks but what else? A vision for Web3 experiences
Group Bliss
In a community bliss experience, we can modify web2 interfaces and create a shared reality that members outside the group cannot see. All underpinned by an objective blockchain secured reality, connected through (mainly) light clients.
Truth not hallucination
Hallucinations cast by malicious demonic entities are protected by the body-polis of the network consensus…
…where we can see things like blinks, but also see added labels from open gov, or perhaps even a fact-checking fairy. When extensions support other ecosystems with shared values, then an even wider bliss experience can be shared.
Web2 is slapped by a web3 suit, an exoskeleton bringing to life on-chain (open gov) verified UX.
Please provide feedback and if you would find it useful to generate blinks for your community then join the telegram group and be the first to use the Blink Builder, as it will be ready to be tested very shortly!
Thanks to:
@Karim KarimJJDA (Parity)
Ben, Alex (Braille), and Thomas Bifrost for inspiration in Web3 Summit.
Iker (Parity)
Thanks for reading…
Written by: Ramsey (Decentration)
Contributor: Filip(Flipchan) @RustSyndicate