From d5e387ef37f8f81842c76fd90faa70e2afde8909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C3=B3rnicki?= Date: Tue, 13 Dec 2022 23:00:17 +0100 Subject: [PATCH 1/5] fix: decode string using varint --- CHANGELOG.md | 6 + Makefile | 2 +- src/common/buffer.c | 19 ++- src/common/buffer.h | 19 ++- src/common/varint.c | 41 +++++++ src/common/varint.h | 20 ++++ src/handler/sign_tx.c | 2 + src/transaction/decoders.c | 109 ++++++++---------- test/tests/getAppVersion.test.ts | 2 +- unit-tests/CMakeLists.txt | 27 ++--- unit-tests/common/test_buffer.c | 46 ++++++++ .../decoders/test_decoder_array_of_strings.c | 46 +------- .../decoders/test_decoder_array_of_u64.c | 29 +---- .../decoders/test_decoder_string.c | 42 ++++--- .../transaction/test_transaction_parse.c | 2 +- 15 files changed, 250 insertions(+), 162 deletions(-) create mode 100644 src/common/varint.c create mode 100644 src/common/varint.h diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d7a6ad..a6e4257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2022-12-14 + +### Fixed + +- use varint when necessary + ## [1.1.0] - 2022-04-13 ### Feature diff --git a/Makefile b/Makefile index c818869..dddcb16 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) APPNAME = "Hive" APPVERSION_M = 1 APPVERSION_N = 1 -APPVERSION_P = 0 +APPVERSION_P = 1 APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" ifeq ($(TARGET_NAME),TARGET_NANOS) diff --git a/src/common/buffer.c b/src/common/buffer.c index c7a0fc6..be43362 100644 --- a/src/common/buffer.c +++ b/src/common/buffer.c @@ -22,6 +22,7 @@ #include // memmove #include "buffer.h" +#include "varint.h" #include "read.h" #include "bip32.h" @@ -117,6 +118,20 @@ bool buffer_read_u64(buffer_t *buffer, uint64_t *value, endianness_t endianness) return true; } +bool buffer_read_varint(buffer_t *buffer, uint64_t *value) { + int8_t length = varint_read(buffer->ptr + buffer->offset, buffer->size - buffer->offset, value); + + if (length < 0) { + *value = 0; + + return false; + } + + buffer_seek_cur(buffer, (size_t) length); + + return true; +} + bool buffer_read_bip32_path(buffer_t *buffer, uint32_t *out, size_t out_len) { if (!bip32_path_read(buffer->ptr + buffer->offset, buffer->size - buffer->offset, out, out_len)) { return false; @@ -158,7 +173,7 @@ bool buffer_copy(const buffer_t *buffer, uint8_t *out, size_t out_len) { return true; } -bool buffer_copy_partial(const buffer_t *buffer, uint8_t *out, size_t out_len, uint8_t length) { +bool buffer_copy_partial(const buffer_t *buffer, uint8_t *out, size_t out_len, size_t length) { if (length > out_len || buffer->size - buffer->offset < length) { return false; } @@ -177,7 +192,7 @@ bool buffer_move(buffer_t *buffer, uint8_t *out, size_t out_len) { return true; } -bool buffer_move_partial(buffer_t *buffer, uint8_t *out, size_t out_len, uint8_t length) { +bool buffer_move_partial(buffer_t *buffer, uint8_t *out, size_t out_len, size_t length) { if (!buffer_copy_partial(buffer, out, out_len, length)) { return false; } diff --git a/src/common/buffer.h b/src/common/buffer.h index aa48545..7b785d7 100644 --- a/src/common/buffer.h +++ b/src/common/buffer.h @@ -131,6 +131,21 @@ bool buffer_read_u32(buffer_t *buffer, uint32_t *value, endianness_t endianness) */ bool buffer_read_u64(buffer_t *buffer, uint64_t *value, endianness_t endianness); +/** + * Read Bitcoin-like varint from buffer into uint64_t. + * + * @see https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer + * + * @param[in,out] buffer + * Pointer to input buffer struct. + * @param[out] value + * Pointer to 64-bit unsigned integer read from buffer. + * + * @return true if success, false otherwise. + * + */ +bool buffer_read_varint(buffer_t *buffer, uint64_t *value); + /** * Read BIP32 path from buffer. * @@ -176,7 +191,7 @@ bool buffer_copy(const buffer_t *buffer, uint8_t *out, size_t out_len); * @return true if success, false otherwise. * */ -bool buffer_copy_partial(const buffer_t *buffer, uint8_t *out, size_t out_len, uint8_t length); +bool buffer_copy_partial(const buffer_t *buffer, uint8_t *out, size_t out_len, size_t length); /** * Move bytes from buffer. @@ -207,7 +222,7 @@ bool buffer_move(buffer_t *buffer, uint8_t *out, size_t out_len); * @return true if success, false otherwise. * */ -bool buffer_move_partial(buffer_t *buffer, uint8_t *out, size_t out_len, uint8_t length); +bool buffer_move_partial(buffer_t *buffer, uint8_t *out, size_t out_len, size_t length); /** * Read TLV (Type–length–value) field endoded using asn1 DER standard diff --git a/src/common/varint.c b/src/common/varint.c new file mode 100644 index 0000000..8e3c130 --- /dev/null +++ b/src/common/varint.c @@ -0,0 +1,41 @@ +/***************************************************************************** + * Ledger App Hive + * (c) 2022 Bartłomiej (@engrave) Górnicki + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#include "varint.h" + +static const uint8_t MSB = 0x80; +static const uint8_t REST = 0x7F; + +int8_t varint_read(const uint8_t *in, size_t in_len, uint64_t *value) { + uint32_t shift = 0; + const uint8_t *ptr = in; + uint64_t ll; + *value = 0; + while (*ptr & MSB) { + ll = *ptr; + *value += ((ll & REST) << shift); + ptr++; + shift += 7; + if ((size_t)(ptr - in) >= in_len) { + return -1; + } + } + ll = *ptr; + *value += ((ll & REST) << shift); + + return ptr - in + 1; +} \ No newline at end of file diff --git a/src/common/varint.h b/src/common/varint.h new file mode 100644 index 0000000..00bef40 --- /dev/null +++ b/src/common/varint.h @@ -0,0 +1,20 @@ +#pragma once + +#include // uint*_t +#include // size_t +#include // bool + +/** + * Read a protobuf-syle-like varint from byte buffer. + * + * @param[in] in + * Pointer to input byte buffer. + * @param[in] in_len + * Length of the input byte buffer. + * @param[out] value + * Pointer to 64-bit unsigned integer to output varint. + * + * @return number of bytes read, -1 otherwise. + * + */ +int8_t varint_read(const uint8_t *in, size_t in_len, uint64_t *value); diff --git a/src/handler/sign_tx.c b/src/handler/sign_tx.c index a23cac7..47bc6a4 100644 --- a/src/handler/sign_tx.c +++ b/src/handler/sign_tx.c @@ -55,6 +55,7 @@ int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) { tx.offset = 0; tx.ptr = G_context.tx_info.raw_tx; tx.size = cdata->size; + const parser_status_e status = transaction_parse(&tx); if (status != PARSING_OK) { @@ -84,6 +85,7 @@ int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) { if (!more) { buffer_t tx = {0}; + tx.offset = 0; tx.ptr = G_context.tx_info.raw_tx; tx.size = G_context.tx_info.raw_tx_len; diff --git a/src/transaction/decoders.c b/src/transaction/decoders.c index dfaaf36..72bf7cb 100644 --- a/src/transaction/decoders.c +++ b/src/transaction/decoders.c @@ -109,109 +109,98 @@ bool decoder_operation_name(buffer_t *buf, field_t *field, bool should_hash_only * Decode string which consist of [length] [n chars] */ bool decoder_string(buffer_t *buf, field_t *field, bool should_hash_only) { - uint8_t string_length; - if (!buffer_read_u8(buf, &string_length)) { + size_t initial_offset = buf->offset; + + uint64_t string_length; + if (!buffer_read_varint(buf, &string_length)) { return false; } - char value[string_length + 1]; - memset(value, 0, sizeof(value)); + char str[string_length + 1]; + memset(str, 0, sizeof(str)); - if (!buffer_move_partial(buf, (uint8_t *) value, sizeof(value), string_length)) { + if (!buffer_move_partial(buf, (uint8_t *) str, sizeof(str), string_length)) { return false; } - value[string_length] = '\0'; // string end - if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, &string_length, 1, NULL, 0); - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, (uint8_t *) value, string_length, NULL, 0); + cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, buf->ptr + initial_offset, buf->offset - initial_offset, NULL, 0); } else { - snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", value); + snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", str); } return true; } bool decoder_array_of_strings(buffer_t *buf, field_t *field, bool should_hash_only) { - uint8_t size; - if (!buffer_read_u8(buf, &size)) { - return false; - } + size_t initial_offset = buf->offset; - if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, &size, sizeof(size), NULL, 0); + uint64_t number_of_items; + if (!buffer_read_varint(buf, &number_of_items)) { + return false; } - uint32_t max_value_size = MEMBER_SIZE(field_t, value); + uint32_t max_string_length = MEMBER_SIZE(field_t, value); - char value[max_value_size]; - memset(value, 0, max_value_size); + char str[max_string_length]; + memset(str, 0, max_string_length); char tmp[50]; - snprintf(value, max_value_size, "[ "); + snprintf(str, max_string_length, "[ "); - for (uint8_t i = 0; i < size; i++) { + for (uint8_t i = 0; i < number_of_items; i++) { memset(tmp, 0, sizeof(tmp)); - - uint8_t string_length; - if (!buffer_read_u8(buf, &string_length) || string_length >= sizeof(tmp) || !buffer_move_partial(buf, (uint8_t *) tmp, sizeof(tmp), string_length)) { + uint64_t string_length; + if (!buffer_read_varint(buf, &string_length) || string_length >= sizeof(tmp) || + !buffer_move_partial(buf, (uint8_t *) tmp, sizeof(tmp), string_length)) { return false; } - - if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, &string_length, sizeof(string_length), NULL, 0); - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, (uint8_t *) tmp, string_length, NULL, 0); - } - - snprintf(value + strlen(value), sizeof(value) - strlen(value), i == size - 1 ? "%s" : "%s, ", tmp); + snprintf(str + strlen(str), sizeof(str) - strlen(str), i == number_of_items - 1 ? "%s" : "%s, ", tmp); } - snprintf(value + strlen(value), sizeof(value) - strlen(value), " ]"); + snprintf(str + strlen(str), sizeof(str) - strlen(str), " ]"); - if (!should_hash_only) { - snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", value); + if (should_hash_only) { + cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, buf->ptr + initial_offset, buf->offset - initial_offset, NULL, 0); + } else { + snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", str); } + return true; } bool decoder_array_of_u64(buffer_t *buf, field_t *field, bool should_hash_only) { - uint32_t max_value_size = MEMBER_SIZE(field_t, value); + size_t initial_offset = buf->offset; + uint32_t max_string_length = MEMBER_SIZE(field_t, value); char u64_str[MAX_U64_LEN]; - char value[max_value_size]; - uint8_t size; + char str[max_string_length]; + uint64_t number_of_items; uint64_t proposal_id; - memset(value, 0, max_value_size); + memset(str, 0, max_string_length); - if (!buffer_read_u8(buf, &size)) { + if (!buffer_read_varint(buf, &number_of_items)) { return false; } - if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, (uint8_t *) &size, sizeof(size), NULL, 0); - } + snprintf(str, max_string_length, "[ "); - snprintf(value, max_value_size, "[ "); - - for (uint8_t i = 0; i < size; i++) { - memset(u64_str, 0, 10); + for (uint8_t i = 0; i < number_of_items; i++) { + memset(u64_str, 0, ARRAYLEN(u64_str)); if (!buffer_read_u64(buf, &proposal_id, LE) || !format_u64(proposal_id, u64_str, ARRAYLEN(u64_str))) { return false; } - - if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, (uint8_t *) &proposal_id, sizeof(proposal_id), NULL, 0); - } - - snprintf(value + strlen(value), max_value_size - strlen(value), i == size - 1 ? "%s" : "%s, ", u64_str); + snprintf(str + strlen(str), max_string_length - strlen(str), i == number_of_items - 1 ? "%s" : "%s, ", u64_str); } - snprintf(value + strlen(value), max_value_size - strlen(value), " ]"); + snprintf(str + strlen(str), max_string_length - strlen(str), " ]"); - if (!should_hash_only) { - snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", value); + if (should_hash_only) { + cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, buf->ptr + initial_offset, buf->offset - initial_offset, NULL, 0); + } else { + snprintf(field->value, MEMBER_SIZE(field_t, value), "%s", str); } + return true; } @@ -350,7 +339,7 @@ bool decoder_uint8(buffer_t *buf, field_t *field, bool should_hash_only) { bool decoder_authority_type(buffer_t *buf, field_t *field, bool should_hash_only) { size_t initial_offset = buf->offset; - uint8_t count; + uint64_t count; uint16_t threshold; uint32_t weight; @@ -359,7 +348,7 @@ bool decoder_authority_type(buffer_t *buf, field_t *field, bool should_hash_only char wif[PUBKEY_WIF_STR_LEN + 1] = {0}; // weight_threshold - if (!buffer_read_u32(buf, &weight, LE) || !buffer_read_u8(buf, &count)) { + if (!buffer_read_u32(buf, &weight, LE) || !buffer_read_varint(buf, &count)) { return false; } @@ -369,10 +358,10 @@ bool decoder_authority_type(buffer_t *buf, field_t *field, bool should_hash_only for (uint8_t i = 0; i < count; i++) { memset(tmp, 0, sizeof(tmp)); - uint8_t string_length; + uint64_t string_length; // clang-format off - if (!buffer_read_u8(buf, &string_length) || + if (!buffer_read_varint(buf, &string_length) || string_length >= sizeof(tmp) || !buffer_move_partial(buf, tmp, sizeof(tmp), string_length) || !buffer_read_u16(buf, &threshold, LE)) { @@ -386,7 +375,7 @@ bool decoder_authority_type(buffer_t *buf, field_t *field, bool should_hash_only snprintf(value + strlen(value), sizeof(value) - strlen(value), " ], [ "); // key_auths - if (!buffer_read_u8(buf, &count)) { + if (!buffer_read_varint(buf, &count)) { return false; } diff --git a/test/tests/getAppVersion.test.ts b/test/tests/getAppVersion.test.ts index 062a942..a6ffc4c 100644 --- a/test/tests/getAppVersion.test.ts +++ b/test/tests/getAppVersion.test.ts @@ -9,7 +9,7 @@ describe('Get app version', async () => { try { const hive = new Hive(transport); const version = await hive.getAppVersion(); - expect(version).to.be.equal('1.1.0'); + expect(version).to.be.equal('1.1.1'); } finally { await transport.close(); } diff --git a/unit-tests/CMakeLists.txt b/unit-tests/CMakeLists.txt index dde7712..53f661a 100644 --- a/unit-tests/CMakeLists.txt +++ b/unit-tests/CMakeLists.txt @@ -1,18 +1,17 @@ cmake_minimum_required(VERSION 3.10) if(${CMAKE_VERSION} VERSION_LESS 3.10) - cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) + cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) endif() # project information project(unit_tests - VERSION 0.1 - DESCRIPTION "Unit tests for Ledger Nano application" - LANGUAGES C) - + VERSION 0.1 + DESCRIPTION "Unit tests for Ledger Nano application" + LANGUAGES C) # guard against bad build-type strings -if (NOT CMAKE_BUILD_TYPE) +if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Debug") endif() @@ -34,8 +33,8 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) endif() add_compile_definitions( - TEST - APPNAME="HIVE" + TEST + APPNAME="HIVE" HAVE_SECP256K1_CURVE APPVERSION="1.0.1" MAJOR_VERSION=1 @@ -99,6 +98,8 @@ add_library(format SHARED ../src/common/format.c) add_library(asn1 SHARED ../src/common/asn1.c) add_library(buffer SHARED ../src/common/buffer.c) add_library(read SHARED ../src/common/read.c) +add_library(write SHARED ../src/common/write.c) +add_library(varint SHARED ../src/common/varint.c) add_library(bip32 SHARED ../src/common/bip32.c) add_library(wif SHARED ../src/common/wif.c) add_library(base58 SHARED ../src/common/base58.c) @@ -109,17 +110,17 @@ add_library(globals SHARED ../src/globals.c) add_library(mocks SHARED mocks.c) target_link_libraries(test_format PUBLIC cmocka gcov format) -target_link_libraries(test_asn1 PUBLIC cmocka gcov asn1 buffer read bip32) -target_link_libraries(test_buffer PUBLIC cmocka gcov buffer asn1 read bip32) +target_link_libraries(test_asn1 PUBLIC cmocka gcov asn1 buffer read bip32 varint) +target_link_libraries(test_buffer PUBLIC cmocka gcov buffer asn1 read bip32 varint) target_link_libraries(test_base58 PUBLIC cmocka gcov base58) target_link_libraries(test_bip32 PUBLIC cmocka gcov bip32 read) -target_link_libraries(decoders buffer read asn1 bip32 wif base58 mocks -Wl,--wrap,cx_ripemd160_init_no_throw -Wl,--wrap,pic -Wl,--wrap,os_longjmp -Wl,--wrap,cx_hash_no_throw -Wl,--wrap,cx_hash_get_size) -target_link_libraries(wif -Wl,--wrap,cx_ripemd160_init_no_throw -Wl,--wrap,cx_hash_no_throw -Wl,--wrap,cx_hash_get_size) +target_link_libraries(decoders buffer read asn1 bip32 wif base58 varint mocks -Wl,--wrap,cx_ripemd160_init_no_throw -Wl,--wrap,pic -Wl,--wrap,os_longjmp -Wl,--wrap,cx_hash_no_throw -Wl,--wrap,cx_hash_get_size) +target_link_libraries(wif -Wl,--wrap,cx_ripemd160_init_no_throw -Wl,--wrap,cx_hash_no_throw -Wl,--wrap,cx_hash_get_size,--wrap,os_longjmp) target_link_libraries(transaction_parse decoders globals format asn1) target_link_libraries(test_transaction_parse PUBLIC cmocka gcov mocks transaction_parse parsers decoders) target_link_libraries(parsers -Wl,--wrap,os_longjmp) target_link_libraries(test_decoder_operation_name PUBLIC cmocka gcov transaction_parse mocks) -target_link_libraries(test_decoder_string PUBLIC cmocka gcov transaction_parse mocks) +target_link_libraries(test_decoder_string PUBLIC cmocka gcov transaction_parse mocks varint) target_link_libraries(test_decoder_array_of_strings PUBLIC cmocka gcov transaction_parse mocks) target_link_libraries(test_decoder_boolean PUBLIC cmocka gcov transaction_parse mocks) target_link_libraries(test_decoder_date_time PUBLIC cmocka gcov transaction_parse mocks) diff --git a/unit-tests/common/test_buffer.c b/unit-tests/common/test_buffer.c index 4bab783..20c8386 100644 --- a/unit-tests/common/test_buffer.c +++ b/unit-tests/common/test_buffer.c @@ -51,6 +51,7 @@ static void test_buffer_read(void **state) { 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E }; + buffer_t buf = {.ptr = temp, .size = sizeof(temp), .offset = 0}; uint8_t first = 0; @@ -88,7 +89,38 @@ static void test_buffer_read(void **state) { assert_int_equal(fourth, 1012478732780767239); // 0x0E 0x0D 0x0C 0x0B 0x0A 0x09 0x08 0x07 assert_true(buffer_seek_set(&buf, 8)); // seek at offset 8 assert_false(buffer_read_u64(&buf, &fourth, BE)); // can't read 8 bytes +} +static void test_buffer_read_varint(void **state) { + + // clang-format off + uint8_t temp_varint[] = { + 0x01, // 1 + 0x80, 0x01, // 128 + 0x80, 0x80, 0x01, // 16384 + 0x80, 0x80, 0x80, 0x01, // 2097152 + 0x80, 0x80, 0x80, 0x80, 0x01, // 268435456 + 0x80, 0x80, 0x80, 0x80, 0x80, 0x01, // 34359738368 + 0x80 // fake varint, not enough bytes + }; + + buffer_t buf = {.ptr = temp_varint, .size = sizeof(temp_varint), .offset = 0}; + uint64_t varint = 0; + + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 1); + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 128); + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 16384); + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 2097152); + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 268435456); + assert_true(buffer_read_varint(&buf, &varint)); + assert_int_equal(varint, 34359738368); + + assert_false(buffer_read_varint(&buf, &varint)); // not enough bytes } static void test_buffer_copy(void **state) { @@ -141,6 +173,18 @@ static void test_buffer_move_partial(void **state) { assert_false(buffer_move_partial(&buf, output2, sizeof(output2), 5)); // can't read 5 bytes } +static void test_buffer_move_partial_long(void **state) { + (void) state; + + uint8_t output[132] = {0}; + uint8_t temp[132] = {1}; + buffer_t buf = {.ptr = temp, .size = sizeof(temp), .offset = 0}; + + assert_true(buffer_move_partial(&buf, output, sizeof(output), 132)); + assert_memory_equal(output, temp, 132); + assert_int_equal(buf.offset, 132); +} + static void test_buffer_read_tlv(void **state) { (void) state; @@ -211,7 +255,9 @@ int main() { cmocka_unit_test(test_buffer_copy), cmocka_unit_test(test_buffer_move), cmocka_unit_test(test_buffer_move_partial), + cmocka_unit_test(test_buffer_move_partial_long), cmocka_unit_test(test_buffer_read_tlv), + cmocka_unit_test(test_buffer_read_varint), cmocka_unit_test(test_buffer_read_bip32_path)}; return cmocka_run_group_tests(tests, NULL, NULL); diff --git a/unit-tests/transaction/decoders/test_decoder_array_of_strings.c b/unit-tests/transaction/decoders/test_decoder_array_of_strings.c index 8cab292..6e44f38 100644 --- a/unit-tests/transaction/decoders/test_decoder_array_of_strings.c +++ b/unit-tests/transaction/decoders/test_decoder_array_of_strings.c @@ -56,49 +56,15 @@ static void test_decoder_array_of_strings_hashing(void **state) { field_t field = {0}; buffer_t buffer_valid = {.offset = 0, .ptr = data, .size = sizeof(data)}; - // both functions will be called five times - for (uint8_t i = 0; i < 5; i++) { - will_return(__wrap_cx_hash_no_throw, 0); - will_return(__wrap_cx_hash_get_size, 0); - } + // both functions will be called once + will_return(__wrap_cx_hash_no_throw, 0); + will_return(__wrap_cx_hash_get_size, 0); - // expect cx_hash to be called with strings count + // expect cx_hash to be called with buffer data expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data, 1); - expect_value(__wrap_cx_hash_no_throw, len, 1); - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with first string length - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 1, 1); - expect_value(__wrap_cx_hash_no_throw, len, 1); // make sure we won't hash anything but string - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with first string content - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 2, data[1]); - expect_value(__wrap_cx_hash_no_throw, len, data[1]); // make sure we won't hash anything but string - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with second string length - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 6, 1); - expect_value(__wrap_cx_hash_no_throw, len, 1); // make sure we won't hash anything but string - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with second string content - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 7, data[6]); - expect_value(__wrap_cx_hash_no_throw, len, data[6]); // make sure we won't hash anything but string + expect_memory(__wrap_cx_hash_no_throw, in, data, sizeof(data)); + expect_value(__wrap_cx_hash_no_throw, len, sizeof(data)); expect_value(__wrap_cx_hash_no_throw, out, NULL); expect_value(__wrap_cx_hash_no_throw, out_len, 0); diff --git a/unit-tests/transaction/decoders/test_decoder_array_of_u64.c b/unit-tests/transaction/decoders/test_decoder_array_of_u64.c index 5c0b03a..be021b9 100644 --- a/unit-tests/transaction/decoders/test_decoder_array_of_u64.c +++ b/unit-tests/transaction/decoders/test_decoder_array_of_u64.c @@ -47,36 +47,17 @@ static void test_decoder_array_of_u64_hashing(void **state) { field_t field = {0}; buffer_t buffer_valid = {.offset = 0, .ptr = data, .size = sizeof(data)}; - // both functions will be called three times - size, first u64, second u64 - for (uint8_t i = 0; i < 3; i++) { - will_return(__wrap_cx_hash_no_throw, 0); - will_return(__wrap_cx_hash_get_size, 0); - } + // both functions will be called once + will_return(__wrap_cx_hash_no_throw, 0); + will_return(__wrap_cx_hash_get_size, 0); // expect cx_hash to be called with number of elements expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data, 1); - expect_value(__wrap_cx_hash_no_throw, len, 1); + expect_memory(__wrap_cx_hash_no_throw, in, data, sizeof(data)); + expect_value(__wrap_cx_hash_no_throw, len, sizeof(data)); expect_value(__wrap_cx_hash_no_throw, out, NULL); expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with first value - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 1, 8); - expect_value(__wrap_cx_hash_no_throw, len, 8); - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - - // expect cx_hash to be called with second value - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 9, 8); - expect_value(__wrap_cx_hash_no_throw, len, 8); - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); - // expect to success assert_true(decoder_array_of_u64(&buffer_valid, &field, true)); diff --git a/unit-tests/transaction/decoders/test_decoder_string.c b/unit-tests/transaction/decoders/test_decoder_string.c index 46f27eb..998c3bc 100644 --- a/unit-tests/transaction/decoders/test_decoder_string.c +++ b/unit-tests/transaction/decoders/test_decoder_string.c @@ -18,7 +18,7 @@ static void test_decoder_string(void **state) { uint8_t data[] = { 0x7, // string length - 0x65, 0x6e, 0x67, 0x72, 0x61, 0x76, 0x65 // engrave + 0x65, 0x6e, 0x67, 0x72, 0x61, 0x76, 0x65 // "engrave" }; // clang-format on @@ -39,6 +39,23 @@ static void test_decoder_string(void **state) { assert_string_equal(field.value, "engrave"); } +static void test_decoder_string_long(void **state) { + (void) state; + + uint8_t data[] = {129, 1, 97, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 122}; + + field_t field = {0}; + buffer_t buffer_valid = {.offset = 0, .ptr = data, .size = sizeof(data)}; + + assert_true(decoder_string(&buffer_valid, &field, false)); + assert_string_equal(field.value, + "axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz"); +} + static void test_decoder_string_hashing(void **state) { (void) state; @@ -55,25 +72,13 @@ static void test_decoder_string_hashing(void **state) { field_t field = {0}; buffer_t buffer_valid = {.offset = 0, .ptr = data, .size = sizeof(data)}; - // both functions will be called twice - for (uint8_t i = 0; i < 2; i++) { - will_return(__wrap_cx_hash_no_throw, 0); - will_return(__wrap_cx_hash_get_size, 0); - } - - // expect cx_hash to be called with string length first - expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); - expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data, 1); - expect_value(__wrap_cx_hash_no_throw, len, 1); - expect_value(__wrap_cx_hash_no_throw, out, NULL); - expect_value(__wrap_cx_hash_no_throw, out_len, 0); + will_return(__wrap_cx_hash_no_throw, 0); + will_return(__wrap_cx_hash_get_size, 0); - // expect cx_hash to be called with string content expect_value(__wrap_cx_hash_no_throw, hash, &G_context.tx_info.sha); expect_value(__wrap_cx_hash_no_throw, mode, 0); - expect_memory(__wrap_cx_hash_no_throw, in, data + 1, data[0]); - expect_value(__wrap_cx_hash_no_throw, len, data[0]); // make sure we will not hash anything but string + expect_memory(__wrap_cx_hash_no_throw, in, data, sizeof(data) - 2); + expect_value(__wrap_cx_hash_no_throw, len, sizeof(data) - 2); expect_value(__wrap_cx_hash_no_throw, out, NULL); expect_value(__wrap_cx_hash_no_throw, out_len, 0); @@ -85,7 +90,8 @@ static void test_decoder_string_hashing(void **state) { } int main() { - const struct CMUnitTest tests[] = {cmocka_unit_test(test_decoder_string), cmocka_unit_test(test_decoder_string_hashing)}; + const struct CMUnitTest tests[] = { + cmocka_unit_test(test_decoder_string), cmocka_unit_test(test_decoder_string_hashing), cmocka_unit_test(test_decoder_string_long)}; return cmocka_run_group_tests(tests, NULL, NULL); } diff --git a/unit-tests/transaction/test_transaction_parse.c b/unit-tests/transaction/test_transaction_parse.c index 6006b3c..e45aac0 100644 --- a/unit-tests/transaction/test_transaction_parse.c +++ b/unit-tests/transaction/test_transaction_parse.c @@ -52,7 +52,7 @@ static void test_transaction_parse_success(void **state) { buffer_t valid_buffer = {.ptr = data, .size = sizeof(data), .offset = 0}; - for (uint8_t i = 0; i < 14; i++) { + for (uint8_t i = 0; i < 11; i++) { will_return(__wrap_cx_hash_no_throw, 0); will_return(__wrap_cx_hash_get_size, 0); From 222f0ce43c74d3e416f48a47b4232bc39a063e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C3=B3rnicki?= Date: Wed, 1 Feb 2023 23:34:53 +0100 Subject: [PATCH 2/5] feat: sign message --- .clang-format | 1 - CHANGELOG.md | 6 +- Makefile | 4 +- src/apdu/dispatcher.c | 19 + src/constants.h | 19 +- src/handler/sign_hash.c | 2 +- src/handler/sign_message.c | 110 ++ src/handler/sign_message.h | 24 + src/handler/sign_tx.c | 3 +- src/sw.h | 8 + src/transaction/decoders.c | 5 +- src/transaction/parsers.h | 1 + src/transaction/transaction_parse.c | 33 +- src/transaction/transaction_parse.h | 11 +- src/types.h | 35 +- src/ui/action/validate.c | 24 + src/ui/action/validate.h | 10 + src/ui/screens/confirm_public_key.c | 4 +- src/ui/screens/review_hash.c | 13 +- src/ui/screens/review_message.c | 141 ++ src/ui/screens/review_message.h | 30 + src/ui/screens/review_transaction.c | 22 +- src/ui/screens/settings.c | 8 +- src/ui/screens/variables.c | 25 + src/ui/screens/variables.h | 7 + test/README.md | 4 +- test/package-lock.json | 2851 +++++++++++++++++++++++---- test/package.json | 8 +- test/tests/getAppVersion.test.ts | 2 +- test/tests/signMessage.test.ts | 34 + 30 files changed, 2984 insertions(+), 480 deletions(-) create mode 100644 src/handler/sign_message.c create mode 100644 src/handler/sign_message.h create mode 100644 src/ui/screens/review_message.c create mode 100644 src/ui/screens/review_message.h create mode 100644 src/ui/screens/variables.c create mode 100644 src/ui/screens/variables.h create mode 100644 test/tests/signMessage.test.ts diff --git a/.clang-format b/.clang-format index e59396f..03d1a48 100644 --- a/.clang-format +++ b/.clang-format @@ -6,7 +6,6 @@ Language: Cpp ColumnLimit: 160 PointerAlignment: Right AlignAfterOpenBracket: Align -AllowAllParametersOfDeclarationOnNextLine: false SortIncludes: false SpaceAfterCStyleCast: true AllowShortCaseLabelsOnASingleLine: false diff --git a/CHANGELOG.md b/CHANGELOG.md index a6e4257..3fba11d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.1] - 2022-12-14 +## [1.2.0] - 2023-02-16 + +### Feature + +- Message signing command ### Fixed diff --git a/Makefile b/Makefile index dddcb16..2aefaa0 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,8 @@ APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS) APPNAME = "Hive" APPVERSION_M = 1 -APPVERSION_N = 1 -APPVERSION_P = 1 +APPVERSION_N = 2 +APPVERSION_P = 0 APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" ifeq ($(TARGET_NAME),TARGET_NANOS) diff --git a/src/apdu/dispatcher.c b/src/apdu/dispatcher.c index 4189ce3..dfbe63b 100644 --- a/src/apdu/dispatcher.c +++ b/src/apdu/dispatcher.c @@ -32,6 +32,7 @@ #include "handler/get_settings.h" #include "handler/sign_tx.h" #include "handler/sign_hash.h" +#include "handler/sign_message.h" int apdu_dispatcher(const command_t *cmd) { if (cmd->cla != CLA) { @@ -47,12 +48,14 @@ int apdu_dispatcher(const command_t *cmd) { } return handler_get_version(); + case GET_APP_NAME: if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); } return handler_get_app_name(); + case GET_PUBLIC_KEY: if (cmd->p1 > 1 || cmd->p2 > 0) { return io_send_sw(SW_WRONG_P1P2); @@ -67,6 +70,7 @@ int apdu_dispatcher(const command_t *cmd) { buf.offset = 0; return handler_get_public_key(&buf, (bool) cmd->p1); + case SIGN_TRANSACTION: if (cmd->p1 != P1_FIRST_CHUNK && cmd->p1 != P1_SUBSEQUENT_CHUNK && cmd->p2 != P2_LAST && cmd->p2 != P2_MORE) { return io_send_sw(SW_WRONG_P1P2); @@ -95,6 +99,21 @@ int apdu_dispatcher(const command_t *cmd) { buf.offset = 0; return handler_sign_hash(&buf); + case SIGN_MESSAGE: + if (cmd->p1 != P1_FIRST_CHUNK && cmd->p1 != P1_SUBSEQUENT_CHUNK && cmd->p2 != P2_LAST && cmd->p2 != P2_MORE) { + return io_send_sw(SW_WRONG_P1P2); + } + + if (!cmd->data) { + return io_send_sw(SW_WRONG_DATA_LENGTH); + } + + buf.ptr = cmd->data; + buf.size = cmd->lc; + buf.offset = 0; + + return handler_sign_message(&buf, cmd->p1, (bool) (cmd->p2 & P2_MORE)); + case GET_SETTINGS: if (cmd->p1 != 0 || cmd->p2 != 0) { return io_send_sw(SW_WRONG_P1P2); diff --git a/src/constants.h b/src/constants.h index e3aac3d..6e9b600 100644 --- a/src/constants.h +++ b/src/constants.h @@ -35,7 +35,7 @@ /** * Maximum transaction length (bytes) - four chunks */ -#define MAX_TRANSACTION_LEN (3 * MAX_DATA_CHUNK_LEN) +#define MAX_TRANSACTION_LEN (4 * MAX_DATA_CHUNK_LEN) /** * Maximum DER encoded signature length (bytes). @@ -64,4 +64,19 @@ #define PUBKEY_COMPRESSED_LEN 33 // [wif (53)][\0] -#define PUBKEY_WIF_STR_LEN 54 \ No newline at end of file +#define PUBKEY_WIF_STR_LEN 54 + +/** + * Maximum message length (bytes) - three chunks + */ +#define MAX_RAW_MESSAGE_LEN (3 * MAX_DATA_CHUNK_LEN) + +/** + * Maximum length of the screen text. + */ +#define MAX_SCREEN_TEXT_LEN 512 + +/** + * Maximum length of the screen title. + */ +#define MAX_SCREEN_TITLE_LEN 60 \ No newline at end of file diff --git a/src/handler/sign_hash.c b/src/handler/sign_hash.c index a1a2f71..083d08b 100644 --- a/src/handler/sign_hash.c +++ b/src/handler/sign_hash.c @@ -23,7 +23,7 @@ #include "os.h" #include "cx.h" -#include "sign_tx.h" +#include "sign_hash.h" #include "sw.h" #include "globals.h" #include "crypto.h" diff --git a/src/handler/sign_message.c b/src/handler/sign_message.c new file mode 100644 index 0000000..67982dc --- /dev/null +++ b/src/handler/sign_message.c @@ -0,0 +1,110 @@ +/***************************************************************************** + * Ledger App Hive. + * (c) 2023 Bartłomiej (@engrave) Górnicki + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#include // uint*_t +#include // bool +#include // size_t +#include // memset, explicit_bzero + +#include "os.h" +#include "cx.h" + +#include "sign_message.h" +#include "sw.h" +#include "globals.h" +#include "crypto.h" +#include "ui/screens/review_message.h" +#include "common/buffer.h" +#include "apdu/dispatcher.h" + +int handler_sign_message(buffer_t *cdata, uint8_t chunk, bool more) { + if (chunk == P1_FIRST_CHUNK) { // first chunk + + if (G_context.state != STATE_NONE) { + return io_send_sw(SW_BAD_STATE); + } + + explicit_bzero(&G_context, sizeof(G_context)); + G_context.req_type = CONFIRM_MESSAGE; + G_context.state = STATE_NONE; + cx_sha256_init(&G_context.message_info.sha); + + if (!buffer_move(cdata, G_context.message_info.data, MAX_RAW_MESSAGE_LEN)) { + return io_send_sw(SW_WRONG_MESSAGE_LENGTH); + } + + G_context.message_info.data_len += cdata->size; + + if (!more) { + buffer_t msg = {0}; + + msg.offset = 0; + msg.ptr = G_context.message_info.data; + msg.size = cdata->size; + + const parser_status_e status = message_parse(&msg); + + if (status != PARSING_OK) { + return io_send_sw(SW_MESSAGE_PARSING_FAIL); + } + + G_context.state = STATE_PARSED; + + return ui_display_message(); + } else { + G_context.state = STATE_TX_RECEIVING; + // will be more, just return OK + return io_send_sw(SW_OK); + } + + } else { + if (G_context.state != STATE_TX_RECEIVING) { + return io_send_sw(SW_BAD_STATE); + } + + // get subsequent chunk + if (!buffer_move(cdata, G_context.message_info.data + G_context.message_info.data_len, MAX_RAW_MESSAGE_LEN - G_context.message_info.data_len)) { + return io_send_sw(SW_WRONG_MESSAGE_LENGTH); + } + + G_context.message_info.data_len += cdata->size; + + if (!more) { + buffer_t msg = {0}; + + msg.offset = 0; + msg.ptr = G_context.message_info.data; + msg.size = G_context.message_info.data_len; + + const parser_status_e status = message_parse(&msg); + + if (status != PARSING_OK) { + return io_send_sw(SW_MESSAGE_PARSING_FAIL); + } + + G_context.state = STATE_PARSED; + + return ui_display_message(); + } else { + G_context.state = STATE_TX_RECEIVING; + // will be more, just return OK + return io_send_sw(SW_OK); + } + } + + return 0; +} diff --git a/src/handler/sign_message.h b/src/handler/sign_message.h new file mode 100644 index 0000000..9725653 --- /dev/null +++ b/src/handler/sign_message.h @@ -0,0 +1,24 @@ +#pragma once + +#include // uint*_t +#include // bool + +#include "common/buffer.h" + +/** + * Handler for SIGN_MESSAGE command. If successfully parse BIP32 path + * and message, sign it and send APDU response. + * + * @see G_context.bip32_path, G_context.message_info.data, G_context.message_info.signature, G_context.message_info.digest + * + * @param[in,out] cdata + * Command data with BIP32 path and raw transaction serialized. + * @param[in] chunk + * Index number of the APDU chunk. + * @param[in] more + * Whether more APDU chunk to be received or not. + * + * @return zero or positive integer if success, negative integer otherwise. + * + */ +int handler_sign_message(buffer_t *cdata, uint8_t chunk, bool more); diff --git a/src/handler/sign_tx.c b/src/handler/sign_tx.c index 47bc6a4..0e0d466 100644 --- a/src/handler/sign_tx.c +++ b/src/handler/sign_tx.c @@ -31,6 +31,7 @@ #include "ui/screens/review_transaction.h" #include "common/buffer.h" #include "apdu/dispatcher.h" +#include "transaction/transaction_parse.h" int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) { if (chunk == P1_FIRST_CHUNK) { // first chunk @@ -85,7 +86,7 @@ int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) { if (!more) { buffer_t tx = {0}; - + tx.offset = 0; tx.ptr = G_context.tx_info.raw_tx; tx.size = G_context.tx_info.raw_tx_len; diff --git a/src/sw.h b/src/sw.h index e8e968c..62aa57d 100644 --- a/src/sw.h +++ b/src/sw.h @@ -60,3 +60,11 @@ * Status word for hash parsing fail. */ #define SW_HASH_PARSING_FAIL 0xB008 +/** + * Status word for message parsing fail. + */ +#define SW_WRONG_MESSAGE_LENGTH 0xB009 +/** + * Status word for message parsing fail. + */ +#define SW_MESSAGE_PARSING_FAIL 0xB00A \ No newline at end of file diff --git a/src/transaction/decoders.c b/src/transaction/decoders.c index 72bf7cb..ef0f3dd 100644 --- a/src/transaction/decoders.c +++ b/src/transaction/decoders.c @@ -491,7 +491,8 @@ bool decoder_empty_extensions(buffer_t *buf, field_t *field, bool should_hash_on bool decoder_beneficiaries_extensions(buffer_t *buf, field_t *field, bool should_hash_only) { size_t initial_offset = buf->offset; - uint8_t size, type, account_name_len, beneficiaries; + uint64_t account_name_len; + uint8_t size, type, beneficiaries; uint16_t weight; char account_name[MAX_ACCOUNT_NAME_LEN + 1] = {0}; char value[MEMBER_SIZE(field_t, value)] = {0}; @@ -519,7 +520,7 @@ bool decoder_beneficiaries_extensions(buffer_t *buf, field_t *field, bool should for (uint8_t i = 0; i < beneficiaries; i++) { // clang-format off - if (!buffer_read_u8(buf, &account_name_len) || + if (!buffer_read_varint(buf, &account_name_len) || account_name_len >= sizeof(value) || !buffer_move_partial(buf, (uint8_t *)account_name, sizeof(account_name) - 1, account_name_len) || !buffer_read_u16(buf, &weight, LE)) { diff --git a/src/transaction/parsers.h b/src/transaction/parsers.h index 86cfdf6..6f9ad5f 100644 --- a/src/transaction/parsers.h +++ b/src/transaction/parsers.h @@ -1,4 +1,5 @@ #pragma once + #include "transaction/decoders.h" /** diff --git a/src/transaction/transaction_parse.c b/src/transaction/transaction_parse.c index 5649308..12bb7c1 100644 --- a/src/transaction/transaction_parse.c +++ b/src/transaction/transaction_parse.c @@ -26,7 +26,7 @@ #include "common/bip32.h" /** - * Parse DER encoded transacion, validate and hash + * Parse DER encoded transaction, validate and hash * */ parser_status_e transaction_parse(buffer_t *buf) { uint8_t data[MAX_TRANSACTION_LEN]; @@ -120,3 +120,34 @@ parser_status_e hash_parse(buffer_t *buf) { return PARSING_OK; } + +parser_status_e message_parse(buffer_t *buf) { + /* Parse: + * - BIP32 path + */ + if (!buffer_read_u8(buf, &G_context.bip32_path_len) || !buffer_read_bip32_path(buf, G_context.bip32_path, (size_t) G_context.bip32_path_len)) { + return BIP32_PATH_PARSING_ERROR; + } + + /* Parse: + * - message + */ + + buffer_t string = {0}; + + if (!buffer_read_varint(buf, (uint64_t *) &string.size)) { + return MESSAGE_PARSING_ERROR; + } + + string.ptr = buf->ptr + buf->offset; + + G_context.message_info.string = string; + + if (!buffer_can_read(buf, string.size)) { + return MESSAGE_PARSING_ERROR; + } + + cx_hash((cx_hash_t *) &G_context.message_info.sha, 0, string.ptr, string.size, NULL, 0); + + return PARSING_OK; +} \ No newline at end of file diff --git a/src/transaction/transaction_parse.h b/src/transaction/transaction_parse.h index 1b0782d..96f9d4a 100644 --- a/src/transaction/transaction_parse.h +++ b/src/transaction/transaction_parse.h @@ -23,4 +23,13 @@ parser_status_e transaction_parse(buffer_t *buf); * Pointer to buffer with path and digest * @return PARSING_OK if success, error status otherwise. */ -parser_status_e hash_parse(buffer_t *buf); \ No newline at end of file +parser_status_e hash_parse(buffer_t *buf); + +/** + * @brief Parse incoming path and message + * + * @param buf + * Pointer to buffer with path and message + * @return PARSING_OK if success, error status otherwise. + */ +parser_status_e message_parse(buffer_t *buf); \ No newline at end of file diff --git a/src/types.h b/src/types.h index e892145..399aa93 100644 --- a/src/types.h +++ b/src/types.h @@ -15,8 +15,8 @@ * Structure to keep operation field data to display on screen during transaction confirmation */ typedef struct { - char title[60]; - char value[255]; + char title[MAX_SCREEN_TITLE_LEN + 1]; + char value[MAX_SCREEN_TEXT_LEN + 1]; } field_t; /** @@ -42,7 +42,8 @@ typedef enum { GET_VERSION = 0x06, /// version of the application GET_APP_NAME = 0x08, /// name of the application SIGN_HASH = 0x10, /// sign hash with BIP32 path - GET_SETTINGS = 0x12 /// settings of the application + GET_SETTINGS = 0x12, /// settings of the application + SIGN_MESSAGE = 0x14 /// sign message with BIP32 path } command_e; /** @@ -73,7 +74,8 @@ typedef enum { typedef enum { CONFIRM_PUBLIC_KEY, /// confirm public key formatted in a Hive way CONFIRM_TRANSACTION, /// confirm transaction information - CONFIRM_HASH /// confirm hash + CONFIRM_HASH, /// confirm hash + CONFIRM_MESSAGE /// confirm message } request_type_e; /** @@ -124,15 +126,31 @@ typedef struct { uint8_t signature[SIGNATURE_LEN]; /// compact hash signature supported by Hive backend } hash_ctx_t; +/** + * Structure for message signing context + */ +typedef struct { + uint8_t data[MAX_RAW_MESSAGE_LEN]; // input message + size_t data_len; // length of the message + + buffer_t string; // message string + + uint8_t digest[DIGEST_LEN]; /// message digest + uint8_t signature[SIGNATURE_LEN]; /// compact message signature supported by Hive backend + cx_sha256_t sha; + +} message_ctx_t; + /** * Structure for global context. */ typedef struct { state_e state; /// state of the context union { - pubkey_ctx_t pk_info; /// public key context - transaction_ctx_t tx_info; /// transaction context - hash_ctx_t hash_info; /// hash signing context + pubkey_ctx_t pk_info; /// public key context + transaction_ctx_t tx_info; /// transaction context + hash_ctx_t hash_info; /// hash signing context + message_ctx_t message_info; /// message signing context }; request_type_e req_type; /// user request uint32_t bip32_path[MAX_BIP32_PATH]; /// BIP32 path @@ -145,7 +163,8 @@ typedef enum { BIP32_PATH_PARSING_ERROR = -1, FIELD_PARSING_ERROR = -2, OPERATION_COUNT_PARSING_ERROR = -3, - WRONG_LENGTH_ERROR = -4 + WRONG_LENGTH_ERROR = -4, + MESSAGE_PARSING_ERROR = -5 } parser_status_e; typedef enum { DISABLED = 0x00, ENABLED = 0x01 } sign_hash_policy_t; diff --git a/src/ui/action/validate.c b/src/ui/action/validate.c index d6d019b..52c60ff 100644 --- a/src/ui/action/validate.c +++ b/src/ui/action/validate.c @@ -79,6 +79,30 @@ void ui_action_validate_hash(bool choice) { io_send_sw(SW_DENY); } + G_context.state = STATE_NONE; + ui_menu_main(NULL); +} + +void ui_action_validate_message(bool choice) { + if (choice) { + G_context.state = STATE_APPROVED; + + ui_display_signing_message_message(); + + // refresh the display before intensive operation + io_seproxyhal_io_heartbeat(); + + // store hash (take 0 bytes from current hash and copy it to the output buffer) + cx_hash_final((cx_hash_t *) &G_context.message_info.sha, G_context.message_info.digest); + + if (!crypto_sign_digest(G_context.message_info.digest, G_context.message_info.signature)) { + io_send_sw(SW_SIGNATURE_FAIL); + } else { + helper_send_response_sig(G_context.message_info.signature, MEMBER_SIZE(message_ctx_t, signature)); + } + } else { + io_send_sw(SW_DENY); + } G_context.state = STATE_NONE; ui_menu_main(NULL); } \ No newline at end of file diff --git a/src/ui/action/validate.h b/src/ui/action/validate.h index 48ad822..79bbc13 100644 --- a/src/ui/action/validate.h +++ b/src/ui/action/validate.h @@ -3,6 +3,7 @@ #include // bool #include "ui/screens/review_transaction.h" #include "ui/screens/review_hash.h" +#include "ui/screens/review_message.h" /** * Action for public key validation and export. @@ -30,3 +31,12 @@ void ui_action_validate_transaction(bool choice); * */ void ui_action_validate_hash(bool choice); + +/** + * @brief Action for message validation. + * + * @param[in] choice + * User choice (either approved or rejected). + * + */ +void ui_action_validate_message(bool choice); \ No newline at end of file diff --git a/src/ui/screens/confirm_public_key.c b/src/ui/screens/confirm_public_key.c index 7cbc764..0a9a4c0 100644 --- a/src/ui/screens/confirm_public_key.c +++ b/src/ui/screens/confirm_public_key.c @@ -23,9 +23,7 @@ #include // memset #include "ui/screens/confirm_public_key.h" - -static action_validate_cb g_validate_callback; -static char g_bip32_path[60]; +#include "ui/screens/variables.h" // Step with icon and text UX_STEP_NOCB(ux_display_confirm_public_key_step, pn, {&C_icon_eye, "Confirm Public key"}); diff --git a/src/ui/screens/review_hash.c b/src/ui/screens/review_hash.c index 2a98185..926141a 100644 --- a/src/ui/screens/review_hash.c +++ b/src/ui/screens/review_hash.c @@ -19,10 +19,7 @@ #include #include "ui/screens/review_hash.h" - -static action_validate_cb g_validate_callback; -static char g_bip32_path[60]; -static char g_hash[DIGEST_LEN * 2 + 1]; +#include "ui/screens/variables.h" #ifdef TARGET_NANOS // Step with title/text for BIP32 path @@ -50,7 +47,7 @@ UX_STEP_NOCB(ux_display_hash_value_step, bn_paging, { .title = "Hash", - .text = g_hash, + .text = g_screen_text.value, }); // For Nano X and S+ utilize all three lines of text @@ -60,7 +57,7 @@ UX_STEP_NOCB(ux_display_hash_value_step, bnnn_paging, { .title = "Hash", - .text = g_hash, + .text = g_screen_text.value, }); #endif @@ -131,7 +128,9 @@ int ui_display_hash() { return io_send_sw(SW_WRONG_BIP32_PATH); } - if (!format_hash(G_context.hash_info.hash, MEMBER_SIZE(hash_ctx_t, hash), g_hash, sizeof(g_hash))) { + memset(&g_screen_text, 0, sizeof(field_t)); + + if (!format_hash(G_context.hash_info.hash, MEMBER_SIZE(hash_ctx_t, hash), g_screen_text.value, sizeof(g_screen_text.value))) { return io_send_sw(SW_WRONG_HASH_LENGTH); } diff --git a/src/ui/screens/review_message.c b/src/ui/screens/review_message.c new file mode 100644 index 0000000..6a969f9 --- /dev/null +++ b/src/ui/screens/review_message.c @@ -0,0 +1,141 @@ +/***************************************************************************** + * Ledger App Hive. + * (c) 2023 Bartłomiej (@engrave) Górnicki + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#include +#include + +#include "ui/screens/review_message.h" +#include "ui/screens/variables.h" + +#ifdef TARGET_NANOS +// Step with title/text for BIP32 path +UX_STEP_NOCB(ux_display_message_path_step, + bn_paging, + { + .title = "Signing key path", + .text = g_bip32_path, + }); + +// For Nano X and S+ utilize all three lines of text +#else +// Step with title/text for BIP32 path +UX_STEP_NOCB(ux_display_message_path_step, + bnnn_paging, + { + .title = "Signing key path", + .text = g_bip32_path, + }); +#endif + +#ifdef TARGET_NANOS +// Step with message content +UX_STEP_NOCB(ux_display_message_step, + bn_paging, + { + .title = "Message", + .text = g_screen_text.value, + }); + +// For Nano X and S+ utilize all three lines of text +#else +// Step with message content +UX_STEP_NOCB(ux_display_message_step, + bnnn_paging, + { + .title = "Message", + .text = g_screen_text.value, + }); +#endif + +// Step with approve button +UX_STEP_CB(ux_display_message_approve_step, + pb, + (*g_validate_callback)(true), + { + &C_icon_validate_14, + "Approve", + }); + +// Step with reject button +UX_STEP_CB(ux_display_message_reject_step, + pb, + (*g_validate_callback)(false), + { + &C_icon_crossmark, + "Reject", + }); + +// Step with icon and text +UX_STEP_NOCB(ux_display_review_message_step, + pnn, + { + &C_icon_eye, + "Review", + "message", + }); + +// FLOW to display message: +// #1 screen : eye icon + "Review message" +// #2 screen : display BIP32 path +// #3 n screens : display message content +// #4 screen : approve button +// #5 screen : reject button +UX_FLOW(ux_display_message_flow, + &ux_display_review_message_step, + &ux_display_message_path_step, + &ux_display_message_step, + &ux_display_message_approve_step, + &ux_display_message_reject_step, + FLOW_LOOP); + +// Message signing message step +UX_STEP_NOCB(ux_display_signing_message_step, + pnn, + { + &C_icon_processing, + "Signing", + "message", + }); + +// FLOW to display message signing message: +// #1 screen : eye processing + "Signing message" +UX_FLOW(ux_display_signing_message_flow, &ux_display_signing_message_step); + +void ui_display_signing_message_message() { + ux_flow_init(0, ux_display_signing_message_flow, NULL); +} + +int ui_display_message() { + if (G_context.req_type != CONFIRM_MESSAGE || G_context.state != STATE_PARSED) { + G_context.state = STATE_NONE; + return io_send_sw(SW_BAD_STATE); + } + + memset(g_bip32_path, 0, sizeof(g_bip32_path)); + if (!bip32_path_format(G_context.bip32_path, G_context.bip32_path_len, g_bip32_path, sizeof(g_bip32_path))) { + return io_send_sw(SW_WRONG_BIP32_PATH); + } + + memset(&g_screen_text, 0, sizeof(field_t)); + snprintf(g_screen_text.value, sizeof(g_screen_text.value), "%s", G_context.message_info.string.ptr + G_context.message_info.string.offset); + + g_validate_callback = &ui_action_validate_message; + + ux_flow_init(0, ux_display_message_flow, NULL); + + return 0; +} \ No newline at end of file diff --git a/src/ui/screens/review_message.h b/src/ui/screens/review_message.h new file mode 100644 index 0000000..ee851c4 --- /dev/null +++ b/src/ui/screens/review_message.h @@ -0,0 +1,30 @@ +#pragma once + +#include + +#include "os.h" +#include "ux.h" +#include "glyphs.h" + +#include "constants.h" +#include "globals.h" +#include "io.h" +#include "sw.h" +#include "common/bip32.h" +#include "common/format.h" +#include "common/wif.h" +#include "common/macros.h" +#include "ui/action/validate.h" + +/** + * Display message string on the device and ask confirmation before signing + * + * @return 0 if success, negative integer otherwise. + * + */ +int ui_display_message(void); + +/** + * Initialize "Signing message" display when the message got accepted + */ +void ui_display_signing_message_message(void); \ No newline at end of file diff --git a/src/ui/screens/review_transaction.c b/src/ui/screens/review_transaction.c index ecc69e6..1eb4f1a 100644 --- a/src/ui/screens/review_transaction.c +++ b/src/ui/screens/review_transaction.c @@ -20,12 +20,10 @@ #include // memset #include "ui/screens/review_transaction.h" +#include "ui/screens/variables.h" -static action_validate_cb g_validate_callback; -static char g_bip32_path[60]; static enum e_state g_current_state; static int8_t g_tx_field_position; -static field_t g_tx_field_parsed; // This is a special function you must call for bn_paging to work properly in an edgecase. // It does some weird stuff with the `G_ux` global which is defined by the SDK. @@ -50,8 +48,8 @@ UX_STEP_NOCB(ux_display_tx_path_step, UX_STEP_NOCB(ux_display_tx_field_step, bn_paging, { - .title = g_tx_field_parsed.title, - .text = g_tx_field_parsed.value, + .title = g_screen_text.title, + .text = g_screen_text.value, }); // For Nano X utilize all three lines of text @@ -69,8 +67,8 @@ UX_STEP_NOCB(ux_display_tx_path_step, UX_STEP_NOCB(ux_display_tx_field_step, bnnn_paging, { - .title = g_tx_field_parsed.title, - .text = g_tx_field_parsed.value, + .title = g_screen_text.title, + .text = g_screen_text.value, }); #endif @@ -156,7 +154,7 @@ int ui_display_transaction() { return io_send_sw(SW_WRONG_BIP32_PATH); } - memset(&g_tx_field_parsed, 0, sizeof(field_t)); + memset(&g_screen_text, 0, sizeof(field_t)); g_tx_field_position = -1; g_validate_callback = &ui_action_validate_transaction; @@ -172,7 +170,7 @@ void display_next_state(bool is_upper_delimiter) { if (g_current_state == STATIC_SCREEN) { // make sure we start from the first field g_tx_field_position = -1; - bool more_data = parse_field(&g_tx_field_parsed, false, false); + bool more_data = parse_field(&g_screen_text, false, false); if (more_data) { // We found some data to display so we now enter in dynamic mode. g_current_state = DYNAMIC_SCREEN; @@ -182,7 +180,7 @@ void display_next_state(bool is_upper_delimiter) { } else { // The previous screen was NOT a static screen, so we were already in a dynamic screen. // Fetch new data. - bool more_data = parse_field(&g_tx_field_parsed, true, false); + bool more_data = parse_field(&g_screen_text, true, false); if (more_data) { // We found some data so simply display it. ux_flow_next(); @@ -199,7 +197,7 @@ void display_next_state(bool is_upper_delimiter) { // We're called from the lower delimiter. if (g_current_state == STATIC_SCREEN) { // Fetch new data - bool more_data = parse_field(&g_tx_field_parsed, true, true); + bool more_data = parse_field(&g_screen_text, true, true); if (more_data) { // We found some data to display so enter in dynamic mode. g_current_state = DYNAMIC_SCREEN; @@ -209,7 +207,7 @@ void display_next_state(bool is_upper_delimiter) { ux_flow_prev(); } else { // We're being called from a dynamic screen, so the user was already browsing the array. - bool more_data = parse_field(&g_tx_field_parsed, false, false); + bool more_data = parse_field(&g_screen_text, false, false); if (more_data) { // We found some data, so display it. // Similar to `ux_flow_prev()` but updates layout to account for `bn_paging`'s diff --git a/src/ui/screens/settings.c b/src/ui/screens/settings.c index 7f2da44..2601a43 100644 --- a/src/ui/screens/settings.c +++ b/src/ui/screens/settings.c @@ -22,10 +22,9 @@ #include "globals.h" #include "menu.h" #include "settings.h" +#include "ui/screens/variables.h" -static char sign_hash_policy_prompt[9]; // max size of longest settings name which is "Disabled" - -UX_STEP_CB(ux_settings_hash_sign_step, bn_paging, switch_settings_hash_signing(), {.title = "Hash signing", .text = sign_hash_policy_prompt}); +UX_STEP_CB(ux_settings_hash_sign_step, bn_paging, switch_settings_hash_signing(), {.title = "Hash signing", .text = g_screen_text.value}); UX_STEP_VALID(ux_settings_back_step, pb, ui_menu_main(NULL), {&C_icon_back, "Back"}); // TODO make it back to ux_menu_settings_step // FLOW for the settings submenu: @@ -34,7 +33,8 @@ UX_STEP_VALID(ux_settings_back_step, pb, ui_menu_main(NULL), {&C_icon_back, "Bac UX_FLOW(ux_settings_flow, &ux_settings_hash_sign_step, &ux_settings_back_step, FLOW_LOOP); void ui_display_settings(const ux_flow_step_t* const start_step) { - strlcpy(sign_hash_policy_prompt, N_settings.sign_hash_policy == ENABLED ? "Enabled" : "Disabled", sizeof(sign_hash_policy_prompt)); + memset(&g_screen_text, 0, sizeof(g_screen_text)); + strlcpy(g_screen_text.value, N_settings.sign_hash_policy == ENABLED ? "Enabled" : "Disabled", sizeof(g_screen_text.value)); ux_flow_init(0, ux_settings_flow, start_step); } diff --git a/src/ui/screens/variables.c b/src/ui/screens/variables.c new file mode 100644 index 0000000..51cd3f1 --- /dev/null +++ b/src/ui/screens/variables.c @@ -0,0 +1,25 @@ +/***************************************************************************** + * Ledger App Hive. + * (c) 2023 Bartłomiej (@engrave) Górnicki + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *****************************************************************************/ + +#include +#include + +#include "variables.h" + +action_validate_cb g_validate_callback; +char g_bip32_path[60]; +field_t g_screen_text; \ No newline at end of file diff --git a/src/ui/screens/variables.h b/src/ui/screens/variables.h new file mode 100644 index 0000000..f1eaa32 --- /dev/null +++ b/src/ui/screens/variables.h @@ -0,0 +1,7 @@ +#pragma once + +#include "types.h" + +extern action_validate_cb g_validate_callback; +extern char g_bip32_path[60]; +extern field_t g_screen_text; \ No newline at end of file diff --git a/test/README.md b/test/README.md index d0b3dff..4accb13 100644 --- a/test/README.md +++ b/test/README.md @@ -8,7 +8,7 @@ Install dependencies npm ci ``` -Run app within speculos emulator +Run app within speculos emulator (you should build it first, instructions in main README file) ```bash docker run --rm -it -v $(realpath .)/../bin:/speculos/apps -p 5000:5000 -p 40000:40000 speculos --display headless --apdu-port 40000 -s "salon stock memory business develop elegant chronic kite aspect nothing tone essay huge knock flip bar noise main cloth coin flavor only melody gain" apps/app.elf @@ -18,4 +18,4 @@ Run tests ``` npm test -``` \ No newline at end of file +``` diff --git a/test/package-lock.json b/test/package-lock.json index a2dc374..db3bf9c 100644 --- a/test/package-lock.json +++ b/test/package-lock.json @@ -1,8 +1,2264 @@ { "name": "ledger-app-hive-tests", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "ledger-app-hive-tests", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@engrave/ledger-app-hive": "3.5.0", + "@ledgerhq/hw-transport-node-hid": "6.27.10", + "@ledgerhq/hw-transport-node-hid-noevents": "6.27.10", + "@ledgerhq/hw-transport-node-speculos": "6.27.10", + "axios": "0.27.2", + "chai": "4.3.6", + "mocha": "10.0.0", + "ts-node": "10.7.0", + "ts-node-register": "1.0.0", + "typescript": "4.6.4" + }, + "devDependencies": { + "@types/chai": "4.3.1", + "@types/mocha": "9.1.1", + "@types/node": "17.0.33" + } + }, + "node_modules/@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dependencies": { + "@cspotcode/source-map-consumer": "0.8.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@engrave/ledger-app-hive": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.0.tgz", + "integrity": "sha512-VdDOXAT0QdXMh8o5Ey1WWr5StnteyJ5eOLZBMo8daxcKw8FixChrilv1JgtVV3LBzsIEJa65RhuSQ9PyFomojQ==", + "dependencies": { + "@hiveio/dhive": "1.2.5", + "@ledgerhq/errors": "6.12.3", + "@ledgerhq/hw-transport": "6.27.10", + "asn1.js": "5.4.1", + "bip32-path": "0.4.2", + "bs58": "5.0.0", + "moment": "2.29.4", + "varint": "6.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@hiveio/dhive": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@hiveio/dhive/-/dhive-1.2.5.tgz", + "integrity": "sha512-9D1kT+kWtQUoVkre9BQbfM13kC7f0a/OwS5QeDKeurZEeVIpr4pfTBwV2dTrym8fL7EMMscIQljxmc3fBSP5gA==", + "dependencies": { + "bigi": "^1.4.2", + "bs58": "^4.0.1", + "bytebuffer": "^5.0.1", + "core-js": "^3.6.4", + "cross-fetch": "^3.0.4", + "ecurve": "^1.0.6", + "https": "^1.0.0", + "jsbi": "^3.1.4", + "node-fetch": "^2.6.0", + "ripemd160": "^2.0.2", + "secp256k1": "^3.8.0", + "verror": "^1.10.0", + "whatwg-fetch": "^3.0.0" + } + }, + "node_modules/@hiveio/dhive/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@ledgerhq/devices": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.7.tgz", + "integrity": "sha512-PZ9TtaTGBYUm/g0qNKPbECZt7DDNvqM3ILS5wAtOMna2cBR+mrywUGXrkjuOWlHpuqZ8wenaAKveQBbzF2ba8w==", + "dependencies": { + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/logs": "^6.10.1", + "rxjs": "6", + "semver": "^7.3.5" + } + }, + "node_modules/@ledgerhq/errors": { + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.12.3.tgz", + "integrity": "sha512-djiMSgB/7hnK3aLR/c5ZMMivxjcI7o2+y3VKcsZZpydPoVf9+FXqeJPRfOwmJ0JxbQ//LinUfWpIfHew8LkaVw==" + }, + "node_modules/@ledgerhq/hw-transport": { + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.10.tgz", + "integrity": "sha512-3cmwQZsiRKe6VcHA1kAtC8+Wt0xjCa9Y0TO/Ns2k4BmEhIlG143I4H1dJntkX6XhDpE1pK9Xn2niBQsTTeGhqA==", + "dependencies": { + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", + "events": "^3.3.0" + } + }, + "node_modules/@ledgerhq/hw-transport-node-hid": { + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.27.10.tgz", + "integrity": "sha512-+08Js51ED1OvnqS+qMnC0bxTYVQ1X3GBvKXRbh3w2IOAdp7ji8srD2VnSe1fz2iXJ19OR7KZL5quRpcv+TOWQw==", + "dependencies": { + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/hw-transport-node-hid-noevents": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", + "lodash": "^4.17.21", + "node-hid": "^2.1.2", + "usb": "^1.7.0" + } + }, + "node_modules/@ledgerhq/hw-transport-node-hid-noevents": { + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.27.10.tgz", + "integrity": "sha512-IyZO88VJubSnfDePSiOG83Ly1n7xfvvErtf7ESQxFhwCrkObkUczQDarYo8XJLCJBDuRr2UgiOfb/yAZrlf+vA==", + "dependencies": { + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", + "node-hid": "^2.1.2" + } + }, + "node_modules/@ledgerhq/hw-transport-node-speculos": { + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.27.10.tgz", + "integrity": "sha512-b0H58H0iYSh0ZKJA90+1RZJnSVRyeqj7OxxoWBcBbfjJRB3qCQnMmzcU71tUl2deKUlK6UVzT+mE6BwKf6VOCQ==", + "dependencies": { + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", + "rxjs": "6" + } + }, + "node_modules/@ledgerhq/logs": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1.tgz", + "integrity": "sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w==" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + }, + "node_modules/@types/chai": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.1.tgz", + "integrity": "sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.33.tgz", + "integrity": "sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==" + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, + "node_modules/acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bigi": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz", + "integrity": "sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bip32-path": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz", + "integrity": "sha1-XbBBataCJxLwd4NuJVe4aXwMfJk=" + }, + "node_modules/bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "node_modules/bs58/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + }, + "node_modules/bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", + "dependencies": { + "long": "~3" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/core-js": { + "version": "3.27.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.27.2.tgz", + "integrity": "sha512-9ashVQskuh5AZEZ1JdQWp1GqSoC1e1G87MzRqg2gIfVAQ7Qn9K+uFj8EcniUFA4P2NLZfV+TOlX1SzoKfo+s7w==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", + "dependencies": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/ecurve": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ecurve/-/ecurve-1.0.6.tgz", + "integrity": "sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w==", + "dependencies": { + "bigi": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/extsprintf": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", + "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.0.tgz", + "integrity": "sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "engines": { + "node": "*" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", + "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbi": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", + "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "node_modules/mocha": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", + "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "node_modules/node-abi": { + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz", + "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + }, + "node_modules/node-fetch": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", + "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-hid": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-2.1.2.tgz", + "integrity": "sha512-qhCyQqrPpP93F/6Wc/xUR7L8mAJW0Z6R7HMQV8jCHHksAxNDe/4z4Un/H9CpLOT+5K39OPyt9tIQlavxWES3lg==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "node-addon-api": "^3.0.2", + "prebuild-install": "^7.1.1" + }, + "bin": { + "hid-showdevices": "src/show-devices.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "engines": { + "node": "*" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "hasInstallScript": true, + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-node": { + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", + "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "dependencies": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node-register": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ts-node-register/-/ts-node-register-1.0.0.tgz", + "integrity": "sha512-0i5qFowh0t1phylWB0Y0l6+K2bv1He0ncYhM+jLSzOWGYM37qjDQJQV5yER63+97q7VFETC5mkPXZH+4JgZlng==", + "dependencies": { + "ts-node": ">=0.9.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/usb": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/usb/-/usb-1.9.2.tgz", + "integrity": "sha512-dryNz030LWBPAf6gj8vyq0Iev3vPbCLHCT8dBw3gQRXRzVNsIdeuU+VjPp3ksmSPkeMAl1k+kQ14Ij0QHyeiAg==", + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^4.2.0", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/usb/node_modules/node-addon-api": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, + "node_modules/verror": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", + "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, "dependencies": { "@cspotcode/source-map-consumer": { "version": "0.8.0", @@ -18,30 +2274,35 @@ } }, "@engrave/ledger-app-hive": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.3.0.tgz", - "integrity": "sha512-aAnsyRy0MjcEo39A7D4okA89Wt4+YDpZDD238n/ASavJHI75c+T/VsYBT25DEU0B1xdar6XWa2IbYpRe++Q6Gg==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.0.tgz", + "integrity": "sha512-VdDOXAT0QdXMh8o5Ey1WWr5StnteyJ5eOLZBMo8daxcKw8FixChrilv1JgtVV3LBzsIEJa65RhuSQ9PyFomojQ==", "requires": { - "@hiveio/dhive": "1.2.0", - "@ledgerhq/errors": "6.10.0", - "@ledgerhq/hw-transport": "6.27.1", + "@hiveio/dhive": "1.2.5", + "@ledgerhq/errors": "6.12.3", + "@ledgerhq/hw-transport": "6.27.10", "asn1.js": "5.4.1", "bip32-path": "0.4.2", "bs58": "5.0.0", - "moment": "2.29.3" + "moment": "2.29.4", + "varint": "6.0.0" } }, "@hiveio/dhive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@hiveio/dhive/-/dhive-1.2.0.tgz", - "integrity": "sha512-TEOLwmA2ZOqgakf5ZJ1a8hzI7CwTcv4Cgz7afRQk7oVIo+D1iF3Q3/w8V0OuRvgp96dv8LxHMbJQYbT5JQ38Mw==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@hiveio/dhive/-/dhive-1.2.5.tgz", + "integrity": "sha512-9D1kT+kWtQUoVkre9BQbfM13kC7f0a/OwS5QeDKeurZEeVIpr4pfTBwV2dTrym8fL7EMMscIQljxmc3fBSP5gA==", "requires": { + "bigi": "^1.4.2", "bs58": "^4.0.1", "bytebuffer": "^5.0.1", "core-js": "^3.6.4", "cross-fetch": "^3.0.4", + "ecurve": "^1.0.6", + "https": "^1.0.0", "jsbi": "^3.1.4", "node-fetch": "^2.6.0", + "ripemd160": "^2.0.2", "secp256k1": "^3.8.0", "verror": "^1.10.0", "whatwg-fetch": "^3.0.0" @@ -50,7 +2311,7 @@ "bs58": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", "requires": { "base-x": "^3.0.2" } @@ -58,172 +2319,73 @@ } }, "@ledgerhq/devices": { - "version": "6.27.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.27.1.tgz", - "integrity": "sha512-jX++oy89jtv7Dp2X6gwt3MMkoajel80JFWcdc0HCouwDsV1mVJ3SQdwl/bQU0zd8HI6KebvUP95QTwbQLLK/RQ==", + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.7.tgz", + "integrity": "sha512-PZ9TtaTGBYUm/g0qNKPbECZt7DDNvqM3ILS5wAtOMna2cBR+mrywUGXrkjuOWlHpuqZ8wenaAKveQBbzF2ba8w==", "requires": { - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/logs": "^6.10.0", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/logs": "^6.10.1", "rxjs": "6", "semver": "^7.3.5" } }, "@ledgerhq/errors": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", - "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.12.3.tgz", + "integrity": "sha512-djiMSgB/7hnK3aLR/c5ZMMivxjcI7o2+y3VKcsZZpydPoVf9+FXqeJPRfOwmJ0JxbQ//LinUfWpIfHew8LkaVw==" }, "@ledgerhq/hw-transport": { - "version": "6.27.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.1.tgz", - "integrity": "sha512-hnE4/Fq1YzQI4PA1W0H8tCkI99R3UWDb3pJeZd6/Xs4Qw/q1uiQO+vNLC6KIPPhK0IajUfuI/P2jk0qWcMsuAQ==", + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.10.tgz", + "integrity": "sha512-3cmwQZsiRKe6VcHA1kAtC8+Wt0xjCa9Y0TO/Ns2k4BmEhIlG143I4H1dJntkX6XhDpE1pK9Xn2niBQsTTeGhqA==", "requires": { - "@ledgerhq/devices": "^6.27.1", - "@ledgerhq/errors": "^6.10.0", + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", "events": "^3.3.0" } }, "@ledgerhq/hw-transport-node-hid": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.24.1.tgz", - "integrity": "sha512-onbxunq8FsiY2sVRR+jRCjC1nx376ANuAtnQsmoHsgxONOVTb5asXWWOV4Cjm8y7RZTCtDw3d1fbziEGRhwiqA==", - "requires": { - "@ledgerhq/devices": "^6.24.1", - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/hw-transport": "^6.24.1", - "@ledgerhq/hw-transport-node-hid-noevents": "^6.24.1", - "@ledgerhq/logs": "^6.10.0", + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-6.27.10.tgz", + "integrity": "sha512-+08Js51ED1OvnqS+qMnC0bxTYVQ1X3GBvKXRbh3w2IOAdp7ji8srD2VnSe1fz2iXJ19OR7KZL5quRpcv+TOWQw==", + "requires": { + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/hw-transport-node-hid-noevents": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", "lodash": "^4.17.21", - "node-hid": "2.1.1", + "node-hid": "^2.1.2", "usb": "^1.7.0" - }, - "dependencies": { - "@ledgerhq/devices": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.24.1.tgz", - "integrity": "sha512-6SNXWXxojUF6WKXMVIbRs15Mveg+9k0RKJK/PKlwZh929Lnr/NcbONWdwPjWKZAp1g82eEPT4jIkG6qc4QXlcA==", - "requires": { - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/logs": "^6.10.0", - "rxjs": "6", - "semver": "^7.3.5" - } - }, - "@ledgerhq/errors": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", - "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" - }, - "@ledgerhq/hw-transport": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.24.1.tgz", - "integrity": "sha512-cOhxkQJrN7DvPFLLXAS2nqAZ7NIDaFqnbgu9ugTccgbJm2/z7ClRZX/uQoI4FscswZ47MuJQdXqz4nK48phteQ==", - "requires": { - "@ledgerhq/devices": "^6.24.1", - "@ledgerhq/errors": "^6.10.0", - "events": "^3.3.0" - } - }, - "@ledgerhq/logs": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", - "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" - } } }, "@ledgerhq/hw-transport-node-hid-noevents": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.24.1.tgz", - "integrity": "sha512-z3uXCU13oayRX51MOaTREdrn83ujrBkccdXn3ljdMy4H3pmAvG6QGn4m30gursEUUJkogA6dkcXs3G8IRfOdxA==", + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-6.27.10.tgz", + "integrity": "sha512-IyZO88VJubSnfDePSiOG83Ly1n7xfvvErtf7ESQxFhwCrkObkUczQDarYo8XJLCJBDuRr2UgiOfb/yAZrlf+vA==", "requires": { - "@ledgerhq/devices": "^6.24.1", - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/hw-transport": "^6.24.1", - "@ledgerhq/logs": "^6.10.0", - "node-hid": "2.1.1" - }, - "dependencies": { - "@ledgerhq/devices": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.24.1.tgz", - "integrity": "sha512-6SNXWXxojUF6WKXMVIbRs15Mveg+9k0RKJK/PKlwZh929Lnr/NcbONWdwPjWKZAp1g82eEPT4jIkG6qc4QXlcA==", - "requires": { - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/logs": "^6.10.0", - "rxjs": "6", - "semver": "^7.3.5" - } - }, - "@ledgerhq/errors": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", - "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" - }, - "@ledgerhq/hw-transport": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.24.1.tgz", - "integrity": "sha512-cOhxkQJrN7DvPFLLXAS2nqAZ7NIDaFqnbgu9ugTccgbJm2/z7ClRZX/uQoI4FscswZ47MuJQdXqz4nK48phteQ==", - "requires": { - "@ledgerhq/devices": "^6.24.1", - "@ledgerhq/errors": "^6.10.0", - "events": "^3.3.0" - } - }, - "@ledgerhq/logs": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", - "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" - } + "@ledgerhq/devices": "^7.0.7", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", + "node-hid": "^2.1.2" } }, "@ledgerhq/hw-transport-node-speculos": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.24.1.tgz", - "integrity": "sha512-xkOqK7m1HOALqnwxMTxrBU8N54/PnQJpGx9Xg9RRUpLVEU7m84LAI9uXemx4AKfs6CEL8D5EP51WIRlQlnhdCQ==", + "version": "6.27.10", + "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-node-speculos/-/hw-transport-node-speculos-6.27.10.tgz", + "integrity": "sha512-b0H58H0iYSh0ZKJA90+1RZJnSVRyeqj7OxxoWBcBbfjJRB3qCQnMmzcU71tUl2deKUlK6UVzT+mE6BwKf6VOCQ==", "requires": { - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/hw-transport": "^6.24.1", - "@ledgerhq/logs": "^6.10.0", + "@ledgerhq/errors": "^6.12.3", + "@ledgerhq/hw-transport": "^6.27.10", + "@ledgerhq/logs": "^6.10.1", "rxjs": "6" - }, - "dependencies": { - "@ledgerhq/devices": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-6.24.1.tgz", - "integrity": "sha512-6SNXWXxojUF6WKXMVIbRs15Mveg+9k0RKJK/PKlwZh929Lnr/NcbONWdwPjWKZAp1g82eEPT4jIkG6qc4QXlcA==", - "requires": { - "@ledgerhq/errors": "^6.10.0", - "@ledgerhq/logs": "^6.10.0", - "rxjs": "6", - "semver": "^7.3.5" - } - }, - "@ledgerhq/errors": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.0.tgz", - "integrity": "sha512-fQFnl2VIXh9Yd41lGjReCeK+Q2hwxQJvLZfqHnKqWapTz68NHOv5QcI0OHuZVNEbv0xhgdLhi5b65kgYeQSUVg==" - }, - "@ledgerhq/hw-transport": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.24.1.tgz", - "integrity": "sha512-cOhxkQJrN7DvPFLLXAS2nqAZ7NIDaFqnbgu9ugTccgbJm2/z7ClRZX/uQoI4FscswZ47MuJQdXqz4nK48phteQ==", - "requires": { - "@ledgerhq/devices": "^6.24.1", - "@ledgerhq/errors": "^6.10.0", - "events": "^3.3.0" - } - }, - "@ledgerhq/logs": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", - "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" - } } }, "@ledgerhq/logs": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz", - "integrity": "sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw==" + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1.tgz", + "integrity": "sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w==" }, "@tsconfig/node10": { "version": "1.0.8", @@ -260,8 +2422,7 @@ "@types/node": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.33.tgz", - "integrity": "sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==", - "dev": true + "integrity": "sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==" }, "@ungap/promise-all-settled": { "version": "1.1.2", @@ -283,11 +2444,6 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -305,20 +2461,6 @@ "picomatch": "^2.0.4" } }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -343,7 +2485,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" }, "assertion-error": { "version": "1.1.0", @@ -382,6 +2524,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "bigi": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz", + "integrity": "sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw==" + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -403,7 +2550,7 @@ "bip66": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", - "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==", "requires": { "safe-buffer": "^5.0.1" } @@ -416,18 +2563,6 @@ "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "bn.js": { @@ -455,7 +2590,7 @@ "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "browser-stdout": { "version": "1.3.1", @@ -502,12 +2637,12 @@ "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" }, "bytebuffer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", "requires": { "long": "~3" } @@ -624,11 +2759,6 @@ } } }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -655,20 +2785,15 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" - }, "core-js": { - "version": "3.22.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz", - "integrity": "sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==" + "version": "3.27.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.27.2.tgz", + "integrity": "sha512-9ashVQskuh5AZEZ1JdQWp1GqSoC1e1G87MzRqg2gIfVAQ7Qn9K+uFj8EcniUFA4P2NLZfV+TOlX1SzoKfo+s7w==" }, "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "create-hash": { "version": "1.2.0", @@ -706,6 +2831,16 @@ "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { "node-fetch": "2.6.7" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "debug": { @@ -729,11 +2864,11 @@ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" }, "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "requires": { - "mimic-response": "^2.0.0" + "mimic-response": "^3.1.0" } }, "deep-eql": { @@ -754,15 +2889,10 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" }, "diff": { "version": "5.0.0", @@ -772,13 +2902,22 @@ "drbg.js": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", "requires": { "browserify-aes": "^1.0.6", "create-hash": "^1.1.2", "create-hmac": "^1.1.4" } }, + "ecurve": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ecurve/-/ecurve-1.0.6.tgz", + "integrity": "sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w==", + "requires": { + "bigi": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, "elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", @@ -898,21 +3037,6 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "optional": true }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -926,7 +3050,7 @@ "github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "glob": { "version": "7.2.0", @@ -964,11 +3088,6 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -977,18 +3096,6 @@ "inherits": "^2.0.4", "readable-stream": "^3.6.0", "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "hash.js": { @@ -1008,13 +3115,18 @@ "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, + "https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", + "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==" + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -1052,14 +3164,6 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -1083,11 +3187,6 @@ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1126,7 +3225,7 @@ "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==" }, "loupe": { "version": "2.3.4", @@ -1173,9 +3272,9 @@ } }, "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" }, "minimalistic-assert": { "version": "1.0.1", @@ -1185,7 +3284,7 @@ "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" }, "minimatch": { "version": "5.0.1", @@ -1206,9 +3305,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" }, "mkdirp-classic": { "version": "0.5.3", @@ -1252,9 +3351,9 @@ } }, "moment": { - "version": "2.29.3", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz", - "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==" + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" }, "ms": { "version": "2.1.3", @@ -1262,9 +3361,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" }, "nanoid": { "version": "3.3.3", @@ -1277,18 +3376,11 @@ "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, "node-abi": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", - "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "version": "3.31.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz", + "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==", "requires": { - "semver": "^5.4.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } + "semver": "^7.3.5" } }, "node-addon-api": { @@ -1297,9 +3389,9 @@ "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "requires": { "whatwg-url": "^5.0.0" } @@ -1310,13 +3402,13 @@ "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==" }, "node-hid": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-2.1.1.tgz", - "integrity": "sha512-Skzhqow7hyLZU93eIPthM9yjot9lszg9xrKxESleEs05V2NcbUptZc5HFqzjOkSmL0sFlZFr3kmvaYebx06wrw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-hid/-/node-hid-2.1.2.tgz", + "integrity": "sha512-qhCyQqrPpP93F/6Wc/xUR7L8mAJW0Z6R7HMQV8jCHHksAxNDe/4z4Un/H9CpLOT+5K39OPyt9tIQlavxWES3lg==", "requires": { "bindings": "^1.5.0", "node-addon-api": "^3.0.2", - "prebuild-install": "^6.0.0" + "prebuild-install": "^7.1.1" } }, "normalize-path": { @@ -1324,27 +3416,6 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1390,30 +3461,24 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, "prebuild-install": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", - "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", "requires": { - "detect-libc": "^1.0.3", + "detect-libc": "^2.0.0", "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.3", "mkdirp-classic": "^0.5.3", "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "npmlog": "^4.0.1", + "node-abi": "^3.3.0", "pump": "^3.0.0", "rc": "^1.2.7", - "simple-get": "^3.0.3", + "simple-get": "^4.0.0", "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0" } }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -1443,24 +3508,13 @@ } }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, "readdirp": { @@ -1519,9 +3573,9 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "requires": { "lru-cache": "^6.0.0" } @@ -1534,11 +3588,6 @@ "randombytes": "^2.1.0" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -1548,63 +3597,33 @@ "safe-buffer": "^5.0.1" } }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, "simple-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" }, "simple-get": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", - "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "requires": { - "decompress-response": "^4.2.0", + "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "ansi-regex": "^2.0.0" + "safe-buffer": "~5.2.0" } }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==" }, "supports-color": { "version": "8.1.1", @@ -1635,18 +3654,6 @@ "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "to-regex-range": { @@ -1660,7 +3667,7 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "ts-node": { "version": "10.7.0", @@ -1705,7 +3712,7 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "requires": { "safe-buffer": "^5.0.1" } @@ -1739,13 +3746,18 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" }, + "varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==" + }, "verror": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", @@ -1754,19 +3766,12 @@ "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - } } }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-fetch": { "version": "3.6.2", @@ -1776,20 +3781,12 @@ "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/test/package.json b/test/package.json index caedc5f..01f436d 100644 --- a/test/package.json +++ b/test/package.json @@ -8,10 +8,10 @@ "author": "Bartłomiej (@engrave) Górnicki", "license": "MIT", "dependencies": { - "@engrave/ledger-app-hive": "3.3.0", - "@ledgerhq/hw-transport-node-hid": "6.24.1", - "@ledgerhq/hw-transport-node-hid-noevents": "6.24.1", - "@ledgerhq/hw-transport-node-speculos": "6.24.1", + "@engrave/ledger-app-hive": "3.5.0", + "@ledgerhq/hw-transport-node-hid": "6.27.10", + "@ledgerhq/hw-transport-node-hid-noevents": "6.27.10", + "@ledgerhq/hw-transport-node-speculos": "6.27.10", "axios": "0.27.2", "chai": "4.3.6", "mocha": "10.0.0", diff --git a/test/tests/getAppVersion.test.ts b/test/tests/getAppVersion.test.ts index a6ffc4c..5f733c0 100644 --- a/test/tests/getAppVersion.test.ts +++ b/test/tests/getAppVersion.test.ts @@ -9,7 +9,7 @@ describe('Get app version', async () => { try { const hive = new Hive(transport); const version = await hive.getAppVersion(); - expect(version).to.be.equal('1.1.1'); + expect(version).to.be.equal('1.2.0'); } finally { await transport.close(); } diff --git a/test/tests/signMessage.test.ts b/test/tests/signMessage.test.ts new file mode 100644 index 0000000..fb2c437 --- /dev/null +++ b/test/tests/signMessage.test.ts @@ -0,0 +1,34 @@ +import Transport from '@ledgerhq/hw-transport-node-speculos'; +import Hive from '@engrave/ledger-app-hive'; +import { expect } from 'chai'; +import * as speculosButtons from '../utils/speculosButtons'; + +const prepareExpectedSignature = (msg: string, expectedSignature: string) => ({msg, expectedSignature}); + +describe('Sign message', async () => { + [ + prepareExpectedSignature('Test', '1f52721df9ed62bf7eb064547a3fa2443dc850e82eda7baa434c9fa1243f608155208ab694cc8e71295e593a2d4b5a33563eb4544b8d1c626f04e65951c49e2464'), + prepareExpectedSignature('{"msg": "This is a longer string imitating JSON"}', '1f28bcb4ca91fdc92c407a63d297911e92814226ba79ce7803c7aaf9a1a055a2bc2e9591da1518be7f55c88317b7032a05e28bb47904c2fcc130ac9d32bfe797f5'), + ].forEach(input => { + it(`should properly sign message`, async function () { + const transport = await Transport.open({ apduPort: 40000, buttonPort: 5000, automationPort: 5000 }); + try { + const hive = new Hive(transport); + + const signingMsgPromise = hive.signMessage(input.msg, `48'/13'/0'/0'/0'`); + + // accept message + await speculosButtons.pressLeft(); + await speculosButtons.pressLeft(); + await speculosButtons.pressBoth(); + + const signature = await signingMsgPromise; + expect(signature).to.be.equal(input.expectedSignature); + } finally { + await transport.close(); + } + }).timeout(10000) + }) + + +}) \ No newline at end of file From 153c1f1102d76a9a87e06d55f4d8669054ced061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C3=B3rnicki?= Date: Wed, 15 Feb 2023 22:24:30 +0100 Subject: [PATCH 3/5] fix: extensions parsers --- CHANGELOG.md | 1 + src/common/format.c | 10 +++++----- src/common/format.h | 4 ++-- src/transaction/decoders.c | 13 ++++++------- src/transaction/parsers.c | 30 +++++++++++++++--------------- test/package-lock.json | 14 +++++++------- test/package.json | 2 +- test/tests/signTransaction.test.ts | 10 +++++----- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fba11d..3e1c705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - use varint when necessary +- add empty extensions encoders for some operation types ## [1.1.0] - 2022-04-13 diff --git a/src/common/format.c b/src/common/format.c index 4df1584..81c00c6 100644 --- a/src/common/format.c +++ b/src/common/format.c @@ -79,7 +79,7 @@ bool format_timestamp(uint32_t timestamp, char *out, size_t out_len) { return true; } -bool format_i64(const int64_t i, char *out, uint8_t out_len) { +bool format_i64(const int64_t i, char *out, size_t out_len) { char temp[] = "-9223372036854775808"; char *ptr = temp; @@ -101,9 +101,9 @@ bool format_i64(const int64_t i, char *out, uint8_t out_len) { *ptr++ = '0'; } - int distance = (ptr - temp) + 1; + size_t distance = (ptr - temp) + 1; - if ((int) out_len < distance) { + if (out_len < distance) { return false; } @@ -118,7 +118,7 @@ bool format_i64(const int64_t i, char *out, uint8_t out_len) { return true; } -bool format_u64(const uint64_t i, char *out, uint8_t out_len) { +bool format_u64(const uint64_t i, char *out, size_t out_len) { if (out_len < MAX_U64_LEN) { return false; } @@ -142,7 +142,7 @@ bool format_u64(const uint64_t i, char *out, uint8_t out_len) { return true; } -static bool insert_string(char *out, uint8_t out_len, const char *source, size_t position) { +static bool insert_string(char *out, size_t out_len, const char *source, size_t position) { if (strlen(source) + position > out_len - 1) { // need space for null character return false; } diff --git a/src/common/format.h b/src/common/format.h index 2f59d54..44b86d8 100644 --- a/src/common/format.h +++ b/src/common/format.h @@ -50,7 +50,7 @@ bool format_timestamp(uint32_t timestamp, char *out, size_t out_size); * @return true if success, false otherwise. * */ -bool format_i64(const int64_t i, char *out, uint8_t out_len); +bool format_i64(const int64_t i, char *out, size_t out_len); /** * Format 64-bit unsigned integer as string. @@ -65,7 +65,7 @@ bool format_i64(const int64_t i, char *out, uint8_t out_len); * @return true if success, false otherwise. * */ -bool format_u64(const uint64_t i, char *out, uint8_t out_len); +bool format_u64(const uint64_t i, char *out, size_t out_len); /** * Convert serialized asset into readable form and replace STEEM/SBD with HIVE equivalents diff --git a/src/transaction/decoders.c b/src/transaction/decoders.c index ef0f3dd..4087fc5 100644 --- a/src/transaction/decoders.c +++ b/src/transaction/decoders.c @@ -491,34 +491,33 @@ bool decoder_empty_extensions(buffer_t *buf, field_t *field, bool should_hash_on bool decoder_beneficiaries_extensions(buffer_t *buf, field_t *field, bool should_hash_only) { size_t initial_offset = buf->offset; - uint64_t account_name_len; - uint8_t size, type, beneficiaries; + uint64_t size, account_name_len, type, beneficiaries; uint16_t weight; char account_name[MAX_ACCOUNT_NAME_LEN + 1] = {0}; char value[MEMBER_SIZE(field_t, value)] = {0}; - if (!buffer_read_u8(buf, &size)) { + if (!buffer_read_varint(buf, &size)) { return false; } if (size == 0) { if (should_hash_only) { - cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, &size, sizeof(size), NULL, 0); + cx_hash((cx_hash_t *) &G_context.tx_info.sha, 0, buf->ptr + initial_offset, buf->offset - initial_offset, NULL, 0); } else { snprintf(field->value, MEMBER_SIZE(field_t, value), "[ ]"); } } else if (size == 1) { - if (!buffer_read_u8(buf, &type) || type != EXT_TYPE_BENEFICIARIES) { // only allow beneficiaries extension + if (!buffer_read_varint(buf, &type) || type != EXT_TYPE_BENEFICIARIES) { // only allow beneficiaries extension return false; } - if (!buffer_read_u8(buf, &beneficiaries)) { + if (!buffer_read_varint(buf, &beneficiaries)) { return false; } snprintf(value, sizeof(value), "Beneficiaries: ["); - for (uint8_t i = 0; i < beneficiaries; i++) { + for (uint64_t i = 0; i < beneficiaries; i++) { // clang-format off if (!buffer_read_varint(buf, &account_name_len) || account_name_len >= sizeof(value) || diff --git a/src/transaction/parsers.c b/src/transaction/parsers.c index 7f4e62b..9c79532 100644 --- a/src/transaction/parsers.c +++ b/src/transaction/parsers.c @@ -153,16 +153,16 @@ const parser_t set_withdraw_vesting_route_parser = { // 22 claim_account const parser_t claim_account_parser = { - .decoders = {&decoder_operation_name, &decoder_string, &decoder_asset}, - .names = {"Operation", "Creator", "Fee"}, - .size = 3 + .decoders = {&decoder_operation_name, &decoder_string, &decoder_asset, &decoder_empty_extensions}, + .names = {"Operation", "Creator", "Fee", "Extensions"}, + .size = 4 }; // 23 create_claimed_account const parser_t create_claimed_account_parser = { - .decoders = {&decoder_operation_name, &decoder_string, &decoder_string, &decoder_authority_type, &decoder_authority_type, &decoder_authority_type, &decoder_public_key, &decoder_string}, - .names = {"Operation", "Creator", "New acc. name", "Owner", "Active", "Posting", "Memo key", "JSON metadata"}, - .size = 8 + .decoders = {&decoder_operation_name, &decoder_string, &decoder_string, &decoder_authority_type, &decoder_authority_type, &decoder_authority_type, &decoder_public_key, &decoder_string, &decoder_empty_extensions}, + .names = {"Operation", "Creator", "New acc. name", "Owner", "Active", "Posting", "Memo key", "JSON metadata", "Extensions"}, + .size = 9 }; @@ -253,16 +253,16 @@ const parser_t update_proposal_votes_parser = { // 46 remove_proposal const parser_t remove_proposal_parser = { - .decoders = {&decoder_operation_name, &decoder_string, &decoder_array_of_u64}, - .names = {"Operation", "Proposal owner", "Proposals"}, - .size = 3 + .decoders = {&decoder_operation_name, &decoder_string, &decoder_array_of_u64, &decoder_empty_extensions}, + .names = {"Operation", "Proposal owner", "Proposals", "Extensions"}, + .size = 4 }; // 47 update_proposal const parser_t update_proposal_parser = { - .decoders = {&decoder_operation_name, &decoder_uint32, &decoder_array_of_u64}, - .names = {"Operation", "Proposal owner", "Proposals"}, - .size = 3 + .decoders = {&decoder_operation_name, &decoder_uint32, &decoder_array_of_u64, &decoder_empty_extensions}, + .names = {"Operation", "Proposal owner", "Proposals", "Extensions"}, + .size = 4 }; // 48 collateralized_convert @@ -274,9 +274,9 @@ const parser_t collateralized_convert_parser = { // 49 recurrent_transfer const parser_t recurrent_transfer_parser = { - .decoders = {&decoder_operation_name, &decoder_string, &decoder_string, &decoder_asset, &decoder_string, &decoder_uint16, &decoder_uint16}, - .names = {"Operation", "From", "To", "Amount", "Memo", "Recurrence", "Executions"}, - .size = 7 + .decoders = {&decoder_operation_name, &decoder_string, &decoder_string, &decoder_asset, &decoder_string, &decoder_uint16, &decoder_uint16, &decoder_empty_extensions}, + .names = {"Operation", "From", "To", "Amount", "Memo", "Recurrence", "Executions", "Extensions"}, + .size = 8 }; // clang-format on diff --git a/test/package-lock.json b/test/package-lock.json index db3bf9c..273f371 100644 --- a/test/package-lock.json +++ b/test/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@engrave/ledger-app-hive": "3.5.0", + "@engrave/ledger-app-hive": "3.5.3", "@ledgerhq/hw-transport-node-hid": "6.27.10", "@ledgerhq/hw-transport-node-hid-noevents": "6.27.10", "@ledgerhq/hw-transport-node-speculos": "6.27.10", @@ -46,9 +46,9 @@ } }, "node_modules/@engrave/ledger-app-hive": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.0.tgz", - "integrity": "sha512-VdDOXAT0QdXMh8o5Ey1WWr5StnteyJ5eOLZBMo8daxcKw8FixChrilv1JgtVV3LBzsIEJa65RhuSQ9PyFomojQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.3.tgz", + "integrity": "sha512-6Qj8jMk8D45f1swdJ45iI2zKho1MkZXulfo0OFiUfBtEC50N5FKVpc7WuvUxIyhZLc4fbVX3fOrkUtsjxSDxKw==", "dependencies": { "@hiveio/dhive": "1.2.5", "@ledgerhq/errors": "6.12.3", @@ -2274,9 +2274,9 @@ } }, "@engrave/ledger-app-hive": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.0.tgz", - "integrity": "sha512-VdDOXAT0QdXMh8o5Ey1WWr5StnteyJ5eOLZBMo8daxcKw8FixChrilv1JgtVV3LBzsIEJa65RhuSQ9PyFomojQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@engrave/ledger-app-hive/-/ledger-app-hive-3.5.3.tgz", + "integrity": "sha512-6Qj8jMk8D45f1swdJ45iI2zKho1MkZXulfo0OFiUfBtEC50N5FKVpc7WuvUxIyhZLc4fbVX3fOrkUtsjxSDxKw==", "requires": { "@hiveio/dhive": "1.2.5", "@ledgerhq/errors": "6.12.3", diff --git a/test/package.json b/test/package.json index 01f436d..131fbad 100644 --- a/test/package.json +++ b/test/package.json @@ -8,7 +8,7 @@ "author": "Bartłomiej (@engrave) Górnicki", "license": "MIT", "dependencies": { - "@engrave/ledger-app-hive": "3.5.0", + "@engrave/ledger-app-hive": "3.5.3", "@ledgerhq/hw-transport-node-hid": "6.27.10", "@ledgerhq/hw-transport-node-hid-noevents": "6.27.10", "@ledgerhq/hw-transport-node-speculos": "6.27.10", diff --git a/test/tests/signTransaction.test.ts b/test/tests/signTransaction.test.ts index cb9c77a..4273f97 100644 --- a/test/tests/signTransaction.test.ts +++ b/test/tests/signTransaction.test.ts @@ -29,8 +29,8 @@ describe('Sign transaction', async () => { prepareExpectedSignature('custom_json', '1f4eab1e64b878d2a69ffccc132df420f5caf71e46a5b4a5b2c94aed4dc53dbde930b6f727d7241a09be6c15fbcc94b734e5ef000fd60d10acb1f57aa5f98ca803'), prepareExpectedSignature('comment_options', '205a5850d6dace3b168893bbcdc9e5ce8ec12f37deeaca366fa3dadb1a085303775a802c257bf4cbe6dd51ef5b7638b926e63a68e2c2cfc81f3b88844709b5c7a6'), prepareExpectedSignature('set_withdraw_vesting_route', '1f5519b506188a995c6f8a10e0bc1c299b55e99b189d32f3b2c025db895e62031e609a503296a791a436ee058aa5611469fa6811760003342d41fe2740c8a521df'), - prepareExpectedSignature('claim_account', '207436a6c83c1ec81cc6e4babdc123b8ea98b6072b522455643eb359a6eb7ea697068e2364678d23b539d7f7f815bf10983254d0c274c9e2c611b5632f2a6b9cdb'), - prepareExpectedSignature('create_claimed_account', '206f4b365ede329992a926024f4ee94e6ceae97abf79243cb6424406b3af455b4617ffcce56d56c44cad2fa6f9b54f75f49f8b9213e0083f02810477eeacaa30c5'), + prepareExpectedSignature('claim_account', '1f6295c85bd6eff71cd3d279653c315841d77973985b6f7f455e7f89a24a1bf17c1e9621908f34ae5f25a1613040a6f2670d47c544619fdf23bfe288e1d023db43'), + prepareExpectedSignature('create_claimed_account', '2003379f04a193d572293d974ea9bd10c268aa09c79225761d2625f8672f02b08e65aaa2665787ddee4d958cb152b3b8650dbbdf56a405ad442486a5eb01c1d37b'), prepareExpectedSignature('request_account_recovery', '1f146c40780bae972cda6b6d68dcb868361ec420666295ca7c6650eb006d993fb91292f3649e6f5499aac22f21cbdd941ec77c39d86da4892080a81995cdab4b5a'), prepareExpectedSignature('recover_account', '206d43fec3f16b23bf269744512e1c6a5e81043d6a44ab7d277449cd972a7f7e6b0d40ef62e234da2a31b63e903d49e91b5438c1ae188f55bdbc2b3fb3fd834bfb'), prepareExpectedSignature('change_recovery_account', '1f1d7152c4ce34898025ac1ff7b91a1c9a3a6b272c2ef85da2c307b441a30d02ea1e76a3b2566710f6d3ca9eab12a2c95d8cbac81137c56433bdb9119d93343f2f'), @@ -44,10 +44,10 @@ describe('Sign transaction', async () => { prepareExpectedSignature('delegate_vesting_shares', '205cecbad305dbf38847b6cab04b2d05ac8b5cd4afb3ca4972d9f7ce11eacbe0a5271c31b151e43f53c1f14468993c0c647206999e9c5b8aeef92acfb78e72cad0'), prepareExpectedSignature('create_proposal', '1f741ec5bbda3fa814a697e613f74308dff51fb2d5e03fe79645b9d89e98110dc640b2abe32d9a493164910e9838fbb9821552f6fdef377dde1aa3ab28b0bbc969'), prepareExpectedSignature('update_proposal_votes', '1f176b9203a6f75e45ce3c4077030cc907a0a7b207c31931bf9ebede8524cdcbc4286843c00f125886da8fe1785ec04070e71daf5bf2822e7645473b064cabf3f5'), - prepareExpectedSignature('remove_proposal', '1f1b3813b2e45cd1edc80bfca39739ec81ab959815dcd6d1754c44ff5244c4e8cf4065324f33f2305cc69cdb124de646d5192bb8b61276a847307356d3c01e3fca'), - prepareExpectedSignature('update_proposal', '202c7bf53e7427a2037e6529d3b89a97c74e5a64555ca5e9062d502fcd299abe295bfca3f4b58e7d0c2b3500fd47268c1342587d4230bbe20737f3b62a81b5a4da'), + prepareExpectedSignature('remove_proposal', '203de03fd29dcfc90523bc0ed9a19ee120dfea9d63f6b4c9c43ed9f3ce7611c7c36ed918953743691e46a76cb6eb4e8c9b0f768a2e32f80b42af10bfb09a5e1e5d'), + prepareExpectedSignature('update_proposal', '204e356db374ba31c988ab9bfa3d5ad905444dd2888e803a613bdeeba787a443c02988152a4f9011275ad87fc4e1a47d4763808883aa579c8ee9a2fab34f00449d'), prepareExpectedSignature('collateralized_convert', '20771cc128dbf1f8c841c826e1b29fa2de31e1bf3ec0e54b42e9f00b8df4aac6e90d2026c77fc383f70e433cfd05cbae9e6f83ffd6406b463882728c3c8adab6f6'), - prepareExpectedSignature('recurrent_transfer', '1f22d8dd7df3051b0bc864763fbfccb177b24ba19d019a32ed6728638c4912bce77381d6d438b7cc18963a97319eb199fbf5cf8192586c6d616bbefa824cbcbc1f'), + prepareExpectedSignature('recurrent_transfer', '1f6cb4225060272b497de0668db023945e2cc485af0a72c5e77062d707eaca0c627d1290f5d0a8f796de18656e8df8e96b473b83d4461bc92c390ba7668fb16204'), ].forEach(input => { it(`should properly sign transaction with ${input.operation} operation`, async function () { const tx = JSON.parse(await fsPromises.readFile(`./transactions/${input.operation}.json`, 'utf8')); From fd3cc020ee0687e8c40f02f6787975bb421df838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C3=B3rnicki?= Date: Thu, 16 Feb 2023 22:48:44 +0100 Subject: [PATCH 4/5] chore: additional signMessage test --- test/tests/signMessage.test.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/test/tests/signMessage.test.ts b/test/tests/signMessage.test.ts index fb2c437..8774a35 100644 --- a/test/tests/signMessage.test.ts +++ b/test/tests/signMessage.test.ts @@ -2,13 +2,17 @@ import Transport from '@ledgerhq/hw-transport-node-speculos'; import Hive from '@engrave/ledger-app-hive'; import { expect } from 'chai'; import * as speculosButtons from '../utils/speculosButtons'; +import {cryptoUtils, Signature} from "@hiveio/dhive"; +import {PublicKey} from "@hiveio/dhive/lib/crypto"; const prepareExpectedSignature = (msg: string, expectedSignature: string) => ({msg, expectedSignature}); describe('Sign message', async () => { [ + // short message prepareExpectedSignature('Test', '1f52721df9ed62bf7eb064547a3fa2443dc850e82eda7baa434c9fa1243f608155208ab694cc8e71295e593a2d4b5a33563eb4544b8d1c626f04e65951c49e2464'), - prepareExpectedSignature('{"msg": "This is a longer string imitating JSON"}', '1f28bcb4ca91fdc92c407a63d297911e92814226ba79ce7803c7aaf9a1a055a2bc2e9591da1518be7f55c88317b7032a05e28bb47904c2fcc130ac9d32bfe797f5'), + // max length message + prepareExpectedSignature('x'.repeat(512), '2065458416d886ecc537eebb10dba459bd537fd3d651a877398d9dba38fda63ecb2412beca7e967de5f15ebc6a17b5f2d528f35ba4b7489b64a6a26dadc30ff91c'), ].forEach(input => { it(`should properly sign message`, async function () { const transport = await Transport.open({ apduPort: 40000, buttonPort: 5000, automationPort: 5000 }); @@ -30,5 +34,27 @@ describe('Sign message', async () => { }).timeout(10000) }) + it('should generate signature compatible with Hive Keychain', async function () { + const transport = await Transport.open({ apduPort: 40000, buttonPort: 5000, automationPort: 5000 }); + try { + const hive = new Hive(transport); + const message = 'This is a message to sign'; + + const publicKey = await hive.getPublicKey(`48'/13'/0'/0'/0'`); + const signingMsgPromise = hive.signMessage(message, `48'/13'/0'/0'/0'`); + + // accept message + await speculosButtons.pressLeft(); + await speculosButtons.pressLeft(); + await speculosButtons.pressBoth(); + + const signature = await signingMsgPromise; + const key = PublicKey.fromString(publicKey); + const isSignedByKey = key.verify(cryptoUtils.sha256(message), Signature.fromString(signature)); + expect(isSignedByKey).to.be.true; + } finally { + await transport.close(); + } + }); }) \ No newline at end of file From e3e3b13917221a2989a678ac65584ceda3e686a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C3=B3rnicki?= Date: Thu, 16 Feb 2023 23:21:08 +0100 Subject: [PATCH 5/5] fix: limit signMessage string size --- src/transaction/transaction_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction/transaction_parse.c b/src/transaction/transaction_parse.c index 12bb7c1..a46ed71 100644 --- a/src/transaction/transaction_parse.c +++ b/src/transaction/transaction_parse.c @@ -135,7 +135,7 @@ parser_status_e message_parse(buffer_t *buf) { buffer_t string = {0}; - if (!buffer_read_varint(buf, (uint64_t *) &string.size)) { + if (!buffer_read_varint(buf, (uint64_t *) &string.size) || string.size > MAX_SCREEN_TEXT_LEN) { return MESSAGE_PARSING_ERROR; }