the door
sign in.
move nothing.
a second script. connect a tezos wallet and sign in with a plain text message. connecting shares the address. signing in moves nothing.
install the door
<link rel="stylesheet" href="https://officenoun.xyz/kit/tezos-desk.css">
<script src="https://officenoun.xyz/kit/tezos-door.js"></script>
<div data-tezos-door></div>
the wallet library (beacon sdk 4.8.1, about 4 mb) is not loaded with the page. it loads from unpkg.com on the first click, and not before. after that the sdk talks to beacon's relay servers and, for some wallets, walletconnect servers.
who gets contacted: on load the desk asks api.tzkt.io and the image hosts in the token metadata. the door contacts nobody on load.
door options
data-app name shown in the wallet prompt. default the page hostname.
data-network default "mainnet".
data-statement the one line the user signs. default "sign in to {host}. this moves nothing."
data-sdk url of the beacon sdk browser bundle. default a pinned unpkg url. https only (http for localhost). refused with "no fingerprint for that sdk." unless data-sdk-integrity is also set. a beacon already on the page is ignored.
data-sdk-integrity sha-384 integrity for a custom data-sdk. the default url ships with its own.
data-nonce a nonce your server issued, 8 to 128 characters of letters, digits, _ and -. used as the nonce line. anything else shows "bad nonce.".
door events
- all bubble from the element.
detail is below.
tezosdoor:connect address, publicKey, network.
tezosdoor:disconnect address.
tezosdoor:signin the session: address, publicKey, message, payloadHex, signature, issued, expires.
tezosdoor:signout address.