The transaction parameters are hard-coded for the moment. It would be better to allow them to be entered through the UI. Uncomment the lines in main.dart at line 162 and 172 and change the parameters accordingly.
With the example application you can sign send and receive transactions with a ledger and broadcast them directly to the Zenon network.
below an example to send a tx using the ZenonLedgerWallet.
// Construct Zenon client
final Zenon znnClient = Zenon();
// Set chain identifier to testnet
chainId = 321;
// Determine account index
var accountIndex = 0;
// Get list of ledger devices
final devices =
await LedgerTransport.getLedgerDevices();
// Set default wallet
znnClient.defaultKeyPair =
await ZenonLedgerWallet.create(devices[0].path, accountIndex);
// Init connection to node
await znnClient.wsClient.initialize('ws://127.0.0.1:35998');
// Construct block
var toAddress = Address.parse('z1qqjnwjjpnue8xmmpanz6csze6tcmtzzdtfsww7');
var tokenStandard = znnZts;
var amount = 100000000; // 1 ZNN
var block = AccountBlockTemplate.send(toAddress, tokenStandard, amount);
// Send tx
await znnClient.send(block);
// Close connection to node
znnClient.wsClient.stop();
I am winding down operations of phase 1 of this project and will soon submit the project phase for the work.
I delivered what was promised in AZ’s proposal and went even further to offer a complete integration solution for Syrius with a working demo. With the above library and sample code, integration should be a walk in the park.
I will continue to maintain the repo and offer my full support where needed and start work on phase 2.
With the completion of phase 1, we can start the app submission process for the unaudited developer mode release.
The app will be made available in Ledger Live (under developer mode) once the sumbission process is complete.
To apply for the unaudited developer mode release, we need to meet the requirements of 1, 2 en 3. All requirements are complete except for the legal entity name and the CoinMarketCap listing, @0x3639 is working on that. The other requirements will be part of phase 2 and 3.
1 - General information
Embedded app name (Zenon)
[/] The name of your token as displayed in CoinMarketCap (ZNN)
Legal Entity name
Postal address
Email address
2 - Security (Mandatory for Audited Apps / Recommended for unaudited Apps)
My app repository has a test folder that contains the Functional tests and Unit tests
The App has been fully tested with a companion wallet (CLI or GUI)
Two icons for the Ledger Stax, Nano and for the Ledger Live Manager in PNG or GIF (see Icons)
Video of your application running on the Ledger device (for Ledger Nano only) (Syrius with Ledger Demo)
The App has a Blind Signing setting (if applicable)
The Guidelines_enforcer and Build_and_functional_tests workflow succeeds
4 - Companion Wallet
A link to the Companion Wallet The wallet must give an option to verify the receiving address on a Ledger device. It should also have an affiliate link next to the “Connect with Ledger” option. You must provide either:
a link to the CLI repository, or
a link to the GUI running on Windows/MacOS/Linux (mandatory for Public release)
5 - Documentation
Document in the App’s repository the list of the app’s APDUs and status words
Link to a Google doc tutorial about how to install and use your app (see Third Party Applications Support)
The doc must include the link to the published tutorial hosted on third party website
6 - Support
I have read the support page
Main support contact (mail address, Slack/Reddit/Telegram/Discord communities)
7 - Marketing (Mandatory for Public release / Recommended for Audited Apps / Not applicable for Unaudited Apps)
I have read the marketing page
Marketing plan
8 - Warranty and liability
I have read and agree with information laid out the warranty and liability disclaimer
The syrius implementation is a crude and ledger specific hardcoded version. Only to proof the app is working as expected.
The demo is needed for the App Submission Process. Once the app is submitted it will be possible to install the app with Ledger Live.
This exercise does show that the total scope of the syrius implementation is not very complicated (in terms of wallet functionality) and allowed me to prooftest and finish the Wallet abstraction.
The library adds on top of the Wallet abstraction introduced in the wallet branch. See PR #6 for more details.
The library adds cross-platform support for the Ledger Nano S/X/SP and Stax on Windows/Linux/OSX. See the README for more details on how to use the library.
A pre-release version of Zenon CLI for .NET under the bigint-ledger branch utilises the library. This makes it possible to override the default file based wallet by specifying the -k switch, followed by the ledger type. For example: -k nanos. It will scan and connect the device. The device must be connected and have the Zenon Ledger App installed and open. All commands are supported except for the wallet.dumpMnemonic command.
A pre-release version for Node v0.0.6+ can be downloaded here.
Linux
Follow these instructions here to install the udev rules on Linux and make sure the HIDAPI is insalled.
The app submission has been accepted by Ledger and is waiting to be reviewed. You can track the progress of the embedded app from here Airtable - Integration Board BETA
The documentation of phase 2 of the AZ proposal has been added to the document.
Although the Embedded App submission has already been submitted, I have updated the AZ proposal to document the latest changes.
While we wait for Ledger to approve the submission, I want to take up the work for the additional projects for the Companion Wallet integration. The Ledger integration has aleady been completed in the Zenon CLI for .NET and I would like to continue the integration work for the s y r i u s desktop wallet and Zenon CLI for Dart.
For this I opened a PR in the znn-sdk-dart repository. The PR proposes to add a wallet abstraction layer to the library that allows adding different wallet implementations to the SDK. This is something that is required for the Ledger integration. As this creates a common abstraction layer for future wallet implementations.
Please review and approve the proposal so further work can continue.
The idea is to migrate them to the zenon-network org once the PR is approved. The review of this PR should also include a review of both dependent libraries.
I’ve tried to keep to code changes as clean as possible and the changes follow the changes made to the .NET version. It’s quite some code to cover and some parts cannot be tested without a ledger device with the Zenon Ledger Embedded App installed.
I’ve tested the code on a Ledger Nano S on both Windows and Linux. Support for macOS is not tested, but should work in theory.
We’re looking for reviewers and testers with access to a Ledger Nano S/S+. Your support is greatly appreciated.
The work for Ledger support in Syrius has been described and added in an issue. Please review the issue and let me know if there are any objections to the proposed implementation.
Payment for the Ledger Wallet integration for znn-cli (.NET and Dart) has been submitted. Please review the pending PR #6 for Zenon Dart CLI, so the work can be properly released.
Work on the Ledger Wallet integration for Syrius has been started.
I’m making good progress on the Ledger Wallet integration for Syrius.
While working on the Signing Transaction UI I’m wondering whether or not its wise to implement a dialog screen for signing transactions with a ledger.
The problem statement is as follows. Unlike the KeyStore, opening a connection to the LedgerWallet does not mean it remains available. Because during the session, the Ledger may be disconnected, the Zenon app may not be open, or the Ledger may become locked. The Ledger device can even be accessed by another process, causing any active connections to be invalid.
With this in mind it’s best to not maintain any long term connection to the LedgerWallet, but to only open and close it when it is needed.
This means exceptions can occur when the LedgerWallet is needed, in a similar way with the KeyStore wallet when trying to send a transaction with an incorrect chainId. Currently Syrius uses notification messages to communicate errors or informational messages to the user.
The easiest implementation would be to handle everything with notification messages. Prompting the user to take action and displaying error messages when something goes wrong. This would be inline with the current implementation, but in my opinion is not the most user friendly method.
The alternative is to open a dialog screen asking the user to connect the device or sign a transaction everytime interaction is needed. The dialog screen guides the user through the process until the issue is solved or cancelled. This implementation would only apply for the LedgerWallet and this dialog screen will appear every time interaction with the device is needed.
Would appreciate some feedback on this. Maybe someone knows a wallet similar to Syrius with Ledger support? So far I’ve come across Neon Wallet and Ledger Live. Neon Wallet handles everything with notification messages and Ledger Live uses a Dialog screen.