@zondax/zemu
Advanced tools
Comparing version 0.36.2 to 0.36.3-beta.1
@@ -17,3 +17,3 @@ /** ****************************************************************************** | ||
import { type IDeviceWindow, type IStartOptions } from "./types"; | ||
export declare const DEFAULT_EMU_IMG = "zondax/builder-zemu:f9192ca"; | ||
export declare const DEFAULT_EMU_IMG = "zondax/builder-zemu:ledger-a26cfda026823f212caa64305b3bcc84a68e6be1"; | ||
export declare const DEFAULT_MODEL = "nanos"; | ||
@@ -20,0 +20,0 @@ export declare const DEFAULT_START_TEXT = "Ready"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WINDOW_STAX = exports.WINDOW_X = exports.WINDOW_S = exports.KEYS = exports.DEFAULT_START_OPTIONS = exports.DEFAULT_STAX_REJECT_KEYWORD = exports.DEFAULT_STAX_APPROVE_KEYWORD = exports.DEFAULT_NANO_REJECT_KEYWORD = exports.DEFAULT_NANO_APPROVE_KEYWORD = exports.DEFAULT_WAIT_TIMEOUT = exports.DEFAULT_METHOD_TIMEOUT = exports.KILL_TIMEOUT = exports.DEFAULT_START_TIMEOUT = exports.BASE_NAME = exports.DEFAULT_HOST = exports.DEFAULT_KEY_DELAY = exports.DEFAULT_START_DELAY = exports.DEFAULT_START_TEXT = exports.DEFAULT_MODEL = exports.DEFAULT_EMU_IMG = void 0; | ||
exports.DEFAULT_EMU_IMG = "zondax/builder-zemu:f9192ca"; | ||
exports.DEFAULT_EMU_IMG = "zondax/builder-zemu:ledger-a26cfda026823f212caa64305b3bcc84a68e6be1"; | ||
exports.DEFAULT_MODEL = "nanos"; | ||
@@ -6,0 +6,0 @@ exports.DEFAULT_START_TEXT = "Ready"; |
@@ -21,2 +21,2 @@ /** ****************************************************************************** | ||
export { ButtonKind, type IDeviceModel, type INavElement, type IStartOptions } from "./types"; | ||
export { zondaxMainmenuNavigation } from "./zondax"; | ||
export { zondaxMainmenuNavigation, zondaxToggleExpertMode } from "./zondax"; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.zondaxMainmenuNavigation = exports.DEFAULT_START_OPTIONS = exports.TouchNavigation = exports.ClickNavigation = void 0; | ||
exports.zondaxToggleExpertMode = exports.zondaxMainmenuNavigation = exports.DEFAULT_START_OPTIONS = exports.TouchNavigation = exports.ClickNavigation = void 0; | ||
/** ****************************************************************************** | ||
@@ -32,1 +32,2 @@ * (c) 2018 - 2023 Zondax AG | ||
Object.defineProperty(exports, "zondaxMainmenuNavigation", { enumerable: true, get: function () { return zondax_1.zondaxMainmenuNavigation; } }); | ||
Object.defineProperty(exports, "zondaxToggleExpertMode", { enumerable: true, get: function () { return zondax_1.zondaxToggleExpertMode; } }); |
@@ -486,2 +486,4 @@ "use strict"; | ||
async click(endpoint, filename = "", waitForScreenUpdate = true) { | ||
if (!this.startOptions.model.startsWith("nano")) | ||
throw new Error("click method can only be used with nano devices"); | ||
const prevEvents = await this.getEvents(); | ||
@@ -514,2 +516,4 @@ const prevScreen = await this.snapshot(); | ||
async fingerTouch(button, filename = "", waitForScreenUpdate = true) { | ||
if (this.startOptions.model !== "stax") | ||
throw new Error("fingerTouch method can only be used with stax device"); | ||
const prevEvents = await this.getEvents(); | ||
@@ -516,0 +520,0 @@ const prevScreen = await this.snapshot(); |
@@ -5,3 +5,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "0.36.2", | ||
"version": "0.36.3-beta.1", | ||
"description": "Zemu Testing Framework", | ||
@@ -8,0 +8,0 @@ "main": "./dist/index.js", |
# Zemu | ||
![zondax](docs/assets/zondax_light.png) | ||
![zondax_light](docs/assets/zondax_light.png#gh-light-mode-only) | ||
![zondax_dark](docs/assets/zondax_dark.png#gh-dark-mode-only) | ||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
@@ -17,6 +19,6 @@ [![npm version](https://badge.fury.io/js/%40zondax%2Fzemu.svg)](https://badge.fury.io/js/%40zondax%2Fzemu) | ||
Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger apps ecosystem is | ||
lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this problem. Under the hood, Zemu uses | ||
Ledger's project [speculos](https://github.com/ledgerHQ/speculos). It's currently being used in every Ledger App built by Zondax, among many | ||
others (such as Ethereum one built by Ledger team). | ||
Integration and end-to-end testing of Ledger Apps is a manual and time consuming process. We believe that the Ledger | ||
apps ecosystem is lacking an adequate approach with respect to testing. The Zemu Framework is our solution for this | ||
problem. Under the hood, Zemu uses Ledger's project [speculos](https://github.com/ledgerHQ/speculos). It's currently | ||
being used in every Ledger App built by Zondax, among many others (such as Ethereum one built by Ledger team). | ||
@@ -23,0 +25,0 @@ _Zemu is an emulation and testing framework for Ledger Nano S/S+/X devices._ |
@@ -18,3 +18,3 @@ /** ****************************************************************************** | ||
export const DEFAULT_EMU_IMG = "zondax/builder-zemu:f9192ca"; | ||
export const DEFAULT_EMU_IMG = "zondax/builder-zemu:ledger-a26cfda026823f212caa64305b3bcc84a68e6be1"; | ||
@@ -21,0 +21,0 @@ export const DEFAULT_MODEL = "nanos"; |
@@ -22,2 +22,2 @@ /** ****************************************************************************** | ||
export { ButtonKind, type IDeviceModel, type INavElement, type IStartOptions } from "./types"; | ||
export { zondaxMainmenuNavigation } from "./zondax"; | ||
export { zondaxMainmenuNavigation, zondaxToggleExpertMode } from "./zondax"; |
@@ -723,2 +723,3 @@ /** ****************************************************************************** | ||
async click(endpoint: string, filename: string = "", waitForScreenUpdate: boolean = true): Promise<ISnapshot> { | ||
if (!this.startOptions.model.startsWith("nano")) throw new Error("click method can only be used with nano devices"); | ||
const prevEvents = await this.getEvents(); | ||
@@ -757,2 +758,3 @@ const prevScreen = await this.snapshot(); | ||
async fingerTouch(button: IButton, filename: string = "", waitForScreenUpdate: boolean = true): Promise<ISnapshot> { | ||
if (this.startOptions.model !== "stax") throw new Error("fingerTouch method can only be used with stax device"); | ||
const prevEvents = await this.getEvents(); | ||
@@ -759,0 +761,0 @@ const prevScreen = await this.snapshot(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3037539
92
3069
45