Nyzo techSetup instructionsChrome browser extension

Chrome browser extension

The Chrome browser extension is available in a separate repository, not the shared codebase used for the verifier, sentinel, client, and documentation server.

For a line-by-line explanation of how this extension works, please read the release notes to version 1 of the extension.

Until the alias mechanism of NTTP-1 is implemented, we recommend using a separate account for purposes such as this. Keep a small amount of coins in that account, so if your key happens to be compromised, your losses will be kept to a minimum.

Using the extension to send tips

When you install the extension, a Nyzo icon will appear in the top toolbar of Chrome. When you click on the extension for the first time, a button will be displayed requesting configuration.

click-to-configure image

The options page requires a private key and a base tip. The private key is stored in local, unencrypted storage. Use an expendable, low-value account for this.

options page, empty

When you have entered valid values, the field backgrounds change from red to green. The values are stored automatically as you enter them.

options page, completed

Now, on any page that accepts Nyzo tips, buttons appear to allow you to easily send amounts of 1x, 2x, and 5x the base tip amount you entered.

tip buttons

When you click on a tip button, the popup will indicate that the tip is being sent. This should show only briefly.

sending tip

A confirmation lets you know that the tip was received, forwarded to the cycle, and scheduled for inclusion in the blockchain. If there are any errors or warnings, they are displayed here.

tip sent

If you ever want to change your private key or base tip amount, right-click on the extension icon and select "Options."

change options

Configuring a page to receive tips

When the extension is loaded, it looks for elements with the CSS class nyzo-tip-button. The extension retrieves the data-client-url, data-receiver-id, and data-tag attributes from the elements it finds.

The data-client-url attribute lets the extension know where the tip transaction should be sent. This attribute is required.

The data-receiver-id attribute designates the receiver of the tip transactions. This attribute is required.

The data-tag attribute is included in the sender data field of transactions, and it allows the operator of the site to track the source of tip transactions. The tag may be up to 7 characters, and it may include ASCII letters, numbers, and the underscore. Disallowed characters are filtered, and excess characters are truncated. This attribute is optional.

The nyzo-extension-not-installed CSS class is removed from all nyzo-tip-button elements, and the nyzo-extension-installed CSS class is added.

The page has no responsibility to respond to these CSS class changes or even to display the element at all. The following button displays different images depending on whether the extension is installed. CSS can be used to automatically change the appearance of elements, and the class list of the element can be examined in JavaScript (<element>.classList.contains('nyzo-extension-installed')) to provide different behavior.

When the button above is tapped, this paragraph will display whether the extension is installed. Similar logic could be used to send users without the extension to an install page.