Embedding a drop or a collection
A widget is a small window onto First Ledger that sits on your own website. You add it with one line of HTML, and it keeps itself up to date: a drop’s progress, or the items in your collection that are for sale.
What a widget is
There are two. The mint widget shows one of your drops — its progress, its price and whether it is open. The storefront shows your collection’s items that are listed for sale, cheapest first.
Either one is a frame: a piece of First Ledger’s own site, shown inside yours. Your page decides where it goes and how wide it is; everything inside it comes from First Ledger.
Any site can show one. There is no list of approved sites to be added to, and nothing to register first.
Adding one to your site
Paste one of these lines where you want the widget to appear, and replace the last part with your drop’s or your collection’s name as it appears in its First Ledger address:
For a drop:
<script async src="https://nft.firstledger.net/embed/v1.js" data-drop="your-drop"></script>For a collection’s storefront:
<script async src="https://nft.firstledger.net/embed/v1.js" data-collection="your-collection"></script>The widget fills the width it is given, up to a comfortable reading width, and sets its own height. To make it narrower, add a data-max-width attribute with the number of pixels you want.
If you want the exact file you checked
The line above always loads the current version of the script, so a fix First Ledger makes reaches your site without you doing anything.
If you would rather only ever run the exact file you looked at, use this line instead. It names one fixed copy, and carries a fingerprint of it: your visitors’ browsers refuse to run it if a single byte is different.
<script async src="https://nft.firstledger.net/embed/v1-83e6b09dc740.js" integrity="sha384-3xmwD2f3FWFxN2xkUwqNNimABVOYQaLCT1l9aZTJ1ElFIKdiG3+hoGrWxBTmSA+j" crossorigin="anonymous" data-drop="your-drop"></script>The fixed copy never changes, so it never receives a fix either. What happens inside the widget is the same in both cases, because that part is always First Ledger’s own page.
What a visitor can do
Anyone can see what the widget shows, and follow it to the same drop or collection on First Ledger to mint or buy there.
Buying or minting inside the widget itself needs the visitor to accept First Ledger’s terms of service and privacy policy before connecting a wallet, and to sign in through a First Ledger window that opens beside your page.
Those policies have not been published yet, so today a widget says that connecting is not available and sends a buyer to First Ledger. When they are published, connecting turns on in every widget at once, with nothing for you to change.
Inside a widget the visitor can use the Joey wallet — its browser extension, or the app through WalletConnect. First Ledger’s own wallet is not offered there, because your page is not ours.
What it will never do
It never holds a wallet’s keys, and never signs anything by itself. Every purchase ends in the visitor’s own wallet asking them to confirm.
Your page cannot see what happens inside the widget: not the visitor’s sign-in, not their wallet, not what they buy. The only thing the widget tells your page is how tall it is.
It cannot be made to show something First Ledger does not. If a drop or a collection is taken down, every widget showing it stops showing it at the same moment.
Taking it down
Delete the line from your page. Nothing else needs to happen: there is nothing registered to undo.
A widget for a drop that has ended keeps saying so; one for a collection with nothing listed says that nothing is for sale.