]> git.codecow.com Git - libnemo.git/commitdiff
So much code has to be excluded for useful test coverage that it's not worth keeping...
authorChris Duncan <chris@zoso.dev>
Mon, 15 Sep 2025 23:21:16 +0000 (16:21 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 15 Sep 2025 23:21:16 +0000 (16:21 -0700)
35 files changed:
esbuild/config.mjs
src/lib/account/address.ts
src/lib/account/index.ts
src/lib/account/refresh.ts
src/lib/account/validate.ts
src/lib/block.ts
src/lib/constants.ts
src/lib/convert.ts
src/lib/crypto/bip39.ts
src/lib/crypto/bip44.ts
src/lib/crypto/blake2b.ts
src/lib/crypto/nano-nacl.ts
src/lib/crypto/wallet-aes-gcm.ts
src/lib/database.ts
src/lib/rolodex.ts
src/lib/rpc.ts
src/lib/tools.ts
src/lib/vault/index.ts
src/lib/wallet/accounts.ts
src/lib/wallet/backup.ts
src/lib/wallet/config.ts
src/lib/wallet/create.ts
src/lib/wallet/destroy.ts
src/lib/wallet/get.ts
src/lib/wallet/index.ts
src/lib/wallet/load.ts
src/lib/wallet/lock.ts
src/lib/wallet/refresh.ts
src/lib/wallet/restore.ts
src/lib/wallet/sign.ts
src/lib/wallet/unlock.ts
src/lib/wallet/unopened.ts
src/lib/wallet/update.ts
src/lib/wallet/verify.ts
test/test.ledger.mjs

index da1c8d9e6b7bf5a42e71816982fb04b7240726fc..c8abe39c0f0b46dc1bd1305a299841263286968a 100644 (file)
@@ -55,9 +55,6 @@ export const nodeOptions = {
        entryPoints: [
                { in: './src/main.ts', out: 'nodejs.min' }
        ],
-       banner: {
-               js: '/* node:coverage disable */'
-       },
        dropLabels: ['BROWSER'],
        external: ['node:worker_threads'],
        inject: ['./esbuild/inject/fake-indexeddb.mjs']
index ccecb4e40ef135d35dde9473f5aae25a7efd81ce..26a7fd37000afed76722583caa5ce0f425757a77 100644 (file)
@@ -6,8 +6,6 @@ import { base32, bytes, hex } from "../convert"
 import { Blake2b } from "../crypto"
 
 export class Address {
-       /*!
-       /* node:coverage enable */
        #address: string
 
        /**
@@ -73,6 +71,4 @@ export class Address {
                }
                return publicKey
        }
-       /*!
-       /* node:coverage disable */
 }
index 895c16156aeaaae4db8a2c03a498813c154e2e44..7ecdc748f85a870d724c43968d048a17a4a4757a 100644 (file)
@@ -18,8 +18,6 @@ import { _validate } from './validate'
 * be fetched from the network.\r
 */\r
 export class Account {\r
-       /*!\r
-       /* node:coverage enable */\r
        [key: string]: any\r
        static get DB_NAME (): 'Account' { return 'Account' }\r
 \r
@@ -379,6 +377,4 @@ export class Account {
                }\r
                return true\r
        }\r
-       /*!\r
-       /* node:coverage disable */\r
 }\r
index 3a692e6a948d01ec6f61cb2bf1c6c340c70dbe4c..713dc95f92e8bfb5680bbd584126b3a7dabb6436 100644 (file)
@@ -7,8 +7,6 @@ import { Account } from '.'
 
 export async function _refresh (account: Account, rpc: Rpc | string | URL): Promise<void>
 export async function _refresh (account: Account, rpc: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        if (typeof rpc === 'string' || rpc instanceof URL) {
                rpc = new Rpc(rpc)
        }
@@ -51,6 +49,4 @@ export async function _refresh (account: Account, rpc: unknown): Promise<void> {
        }
        frontierBlock[frontierSubtype](frontierContents.link, 0).sign(frontierContents.signature)
        account.frontier_block = frontierBlock
-       /*!
-       /* node:coverage disable */
 }
index 5b472e05cc25ed8bc6bc0ff0cbda84f37821ef8a..0f00695c238c4635ead0487a39bd2a1b31db53c8 100644 (file)
@@ -6,8 +6,6 @@ import { base32, bytes } from "../convert"
 import { Blake2b } from "../crypto"
 
 export function _validate (address: unknown): asserts address is string {
-       /*!
-       /* node:coverage enable */
        if (address === undefined) {
                throw new ReferenceError('Address is undefined.')
        }
@@ -29,6 +27,4 @@ export function _validate (address: unknown): asserts address is string {
        if (expectedChecksum !== actualChecksum) {
                throw new Error('Incorrect address checksum')
        }
-       /*!
-       /* node:coverage disable */
 }
index 3fa4906f4ddc1816114591b221776d2dc24bb448..21b4da0597959c2b5f173e5c0e4f4fad5e5887cc 100644 (file)
@@ -14,8 +14,6 @@ import { Wallet } from './wallet'
 * Represents a block as defined by the Nano cryptocurrency protocol.
 */
 export class Block {
-       /*!
-       /* node:coverage enable */
        [key: string]: bigint | string | Account | Function | Uint8Array<ArrayBuffer> | 'send' | 'receive' | 'change' | undefined
        /**
         * Validates block data.
@@ -459,6 +457,4 @@ export class Block {
                        throw new Error('Failed to verify block signature', { cause: err })
                }
        }
-       /*!
-       /* node:coverage disable */
 }
index 49f7e51a82ab20870ef01b1376ea857b5ba7b0bc..d215a7def7fd23cf933f35061d233e28e72a0717 100644 (file)
@@ -1,8 +1,6 @@
 //! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
-/*!
-/* node:coverage enable */
 export const ACCOUNT_KEY_BYTE_LENGTH = 32
 export const ACCOUNT_KEY_HEX_LENGTH = 64
 export const ADDRESS_GAP = 20
@@ -61,5 +59,3 @@ export default `
        const XNO = '${XNO}'
        const UNITS = ${JSON.stringify(UNITS)}
 `
-/*!
-/* node:coverage disable */
index be886d8a0cdf9c1349eb741a274a638e28da0fe5..af1c3d79e144fe63ec270296f2629b84fcd89400 100644 (file)
@@ -1,8 +1,6 @@
 //! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>\r
 //! SPDX-License-Identifier: GPL-3.0-or-later\r
 \r
-/*!\r
-/* node:coverage enable */\r
 import { ALPHABET } from './constants'\r
 \r
 export class base32 {\r
@@ -363,5 +361,3 @@ export default `
        const obj = ${obj}\r
        const utf8 = ${utf8}\r
 `\r
-/*!\r
-/* node:coverage disable */\r
index 0b8df13ade32492b6ae9115d03dc2fc9f39c2228..2843821dd70151f7d6fde2a87dd2a52f8a5bc41f 100644 (file)
@@ -5,8 +5,6 @@
 * Represents a mnemonic phrase that identifies a wallet as defined by BIP-39.\r
 */\r
 export class Bip39 {\r
-       /*!\r
-       /* node:coverage enable */\r
        encoder: TextEncoder = new TextEncoder()\r
 \r
        /**\r
@@ -257,6 +255,4 @@ export class Bip39 {
        * https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt\r
        */\r
        static wordlist: readonly string[] = Object.freeze(['abandon', 'ability', 'able', 'about', 'above', 'absent', 'absorb', 'abstract', 'absurd', 'abuse', 'access', 'accident', 'account', 'accuse', 'achieve', 'acid', 'acoustic', 'acquire', 'across', 'act', 'action', 'actor', 'actress', 'actual', 'adapt', 'add', 'addict', 'address', 'adjust', 'admit', 'adult', 'advance', 'advice', 'aerobic', 'affair', 'afford', 'afraid', 'again', 'age', 'agent', 'agree', 'ahead', 'aim', 'air', 'airport', 'aisle', 'alarm', 'album', 'alcohol', 'alert', 'alien', 'all', 'alley', 'allow', 'almost', 'alone', 'alpha', 'already', 'also', 'alter', 'always', 'amateur', 'amazing', 'among', 'amount', 'amused', 'analyst', 'anchor', 'ancient', 'anger', 'angle', 'angry', 'animal', 'ankle', 'announce', 'annual', 'another', 'answer', 'antenna', 'antique', 'anxiety', 'any', 'apart', 'apology', 'appear', 'apple', 'approve', 'april', 'arch', 'arctic', 'area', 'arena', 'argue', 'arm', 'armed', 'armor', 'army', 'around', 'arrange', 'arrest', 'arrive', 'arrow', 'art', 'artefact', 'artist', 'artwork', 'ask', 'aspect', 'assault', 'asset', 'assist', 'assume', 'asthma', 'athlete', 'atom', 'attack', 'attend', 'attitude', 'attract', 'auction', 'audit', 'august', 'aunt', 'author', 'auto', 'autumn', 'average', 'avocado', 'avoid', 'awake', 'aware', 'away', 'awesome', 'awful', 'awkward', 'axis', 'baby', 'bachelor', 'bacon', 'badge', 'bag', 'balance', 'balcony', 'ball', 'bamboo', 'banana', 'banner', 'bar', 'barely', 'bargain', 'barrel', 'base', 'basic', 'basket', 'battle', 'beach', 'bean', 'beauty', 'because', 'become', 'beef', 'before', 'begin', 'behave', 'behind', 'believe', 'below', 'belt', 'bench', 'benefit', 'best', 'betray', 'better', 'between', 'beyond', 'bicycle', 'bid', 'bike', 'bind', 'biology', 'bird', 'birth', 'bitter', 'black', 'blade', 'blame', 'blanket', 'blast', 'bleak', 'bless', 'blind', 'blood', 'blossom', 'blouse', 'blue', 'blur', 'blush', 'board', 'boat', 'body', 'boil', 'bomb', 'bone', 'bonus', 'book', 'boost', 'border', 'boring', 'borrow', 'boss', 'bottom', 'bounce', 'box', 'boy', 'bracket', 'brain', 'brand', 'brass', 'brave', 'bread', 'breeze', 'brick', 'bridge', 'brief', 'bright', 'bring', 'brisk', 'broccoli', 'broken', 'bronze', 'broom', 'brother', 'brown', 'brush', 'bubble', 'buddy', 'budget', 'buffalo', 'build', 'bulb', 'bulk', 'bullet', 'bundle', 'bunker', 'burden', 'burger', 'burst', 'bus', 'business', 'busy', 'butter', 'buyer', 'buzz', 'cabbage', 'cabin', 'cable', 'cactus', 'cage', 'cake', 'call', 'calm', 'camera', 'camp', 'can', 'canal', 'cancel', 'candy', 'cannon', 'canoe', 'canvas', 'canyon', 'capable', 'capital', 'captain', 'car', 'carbon', 'card', 'cargo', 'carpet', 'carry', 'cart', 'case', 'cash', 'casino', 'castle', 'casual', 'cat', 'catalog', 'catch', 'category', 'cattle', 'caught', 'cause', 'caution', 'cave', 'ceiling', 'celery', 'cement', 'census', 'century', 'cereal', 'certain', 'chair', 'chalk', 'champion', 'change', 'chaos', 'chapter', 'charge', 'chase', 'chat', 'cheap', 'check', 'cheese', 'chef', 'cherry', 'chest', 'chicken', 'chief', 'child', 'chimney', 'choice', 'choose', 'chronic', 'chuckle', 'chunk', 'churn', 'cigar', 'cinnamon', 'circle', 'citizen', 'city', 'civil', 'claim', 'clap', 'clarify', 'claw', 'clay', 'clean', 'clerk', 'clever', 'click', 'client', 'cliff', 'climb', 'clinic', 'clip', 'clock', 'clog', 'close', 'cloth', 'cloud', 'clown', 'club', 'clump', 'cluster', 'clutch', 'coach', 'coast', 'coconut', 'code', 'coffee', 'coil', 'coin', 'collect', 'color', 'column', 'combine', 'come', 'comfort', 'comic', 'common', 'company', 'concert', 'conduct', 'confirm', 'congress', 'connect', 'consider', 'control', 'convince', 'cook', 'cool', 'copper', 'copy', 'coral', 'core', 'corn', 'correct', 'cost', 'cotton', 'couch', 'country', 'couple', 'course', 'cousin', 'cover', 'coyote', 'crack', 'cradle', 'craft', 'cram', 'crane', 'crash', 'crater', 'crawl', 'crazy', 'cream', 'credit', 'creek', 'crew', 'cricket', 'crime', 'crisp', 'critic', 'crop', 'cross', 'crouch', 'crowd', 'crucial', 'cruel', 'cruise', 'crumble', 'crunch', 'crush', 'cry', 'crystal', 'cube', 'culture', 'cup', 'cupboard', 'curious', 'current', 'curtain', 'curve', 'cushion', 'custom', 'cute', 'cycle', 'dad', 'damage', 'damp', 'dance', 'danger', 'daring', 'dash', 'daughter', 'dawn', 'day', 'deal', 'debate', 'debris', 'decade', 'december', 'decide', 'decline', 'decorate', 'decrease', 'deer', 'defense', 'define', 'defy', 'degree', 'delay', 'deliver', 'demand', 'demise', 'denial', 'dentist', 'deny', 'depart', 'depend', 'deposit', 'depth', 'deputy', 'derive', 'describe', 'desert', 'design', 'desk', 'despair', 'destroy', 'detail', 'detect', 'develop', 'device', 'devote', 'diagram', 'dial', 'diamond', 'diary', 'dice', 'diesel', 'diet', 'differ', 'digital', 'dignity', 'dilemma', 'dinner', 'dinosaur', 'direct', 'dirt', 'disagree', 'discover', 'disease', 'dish', 'dismiss', 'disorder', 'display', 'distance', 'divert', 'divide', 'divorce', 'dizzy', 'doctor', 'document', 'dog', 'doll', 'dolphin', 'domain', 'donate', 'donkey', 'donor', 'door', 'dose', 'double', 'dove', 'draft', 'dragon', 'drama', 'drastic', 'draw', 'dream', 'dress', 'drift', 'drill', 'drink', 'drip', 'drive', 'drop', 'drum', 'dry', 'duck', 'dumb', 'dune', 'during', 'dust', 'dutch', 'duty', 'dwarf', 'dynamic', 'eager', 'eagle', 'early', 'earn', 'earth', 'easily', 'east', 'easy', 'echo', 'ecology', 'economy', 'edge', 'edit', 'educate', 'effort', 'egg', 'eight', 'either', 'elbow', 'elder', 'electric', 'elegant', 'element', 'elephant', 'elevator', 'elite', 'else', 'embark', 'embody', 'embrace', 'emerge', 'emotion', 'employ', 'empower', 'empty', 'enable', 'enact', 'end', 'endless', 'endorse', 'enemy', 'energy', 'enforce', 'engage', 'engine', 'enhance', 'enjoy', 'enlist', 'enough', 'enrich', 'enroll', 'ensure', 'enter', 'entire', 'entry', 'envelope', 'episode', 'equal', 'equip', 'era', 'erase', 'erode', 'erosion', 'error', 'erupt', 'escape', 'essay', 'essence', 'estate', 'eternal', 'ethics', 'evidence', 'evil', 'evoke', 'evolve', 'exact', 'example', 'excess', 'exchange', 'excite', 'exclude', 'excuse', 'execute', 'exercise', 'exhaust', 'exhibit', 'exile', 'exist', 'exit', 'exotic', 'expand', 'expect', 'expire', 'explain', 'expose', 'express', 'extend', 'extra', 'eye', 'eyebrow', 'fabric', 'face', 'faculty', 'fade', 'faint', 'faith', 'fall', 'false', 'fame', 'family', 'famous', 'fan', 'fancy', 'fantasy', 'farm', 'fashion', 'fat', 'fatal', 'father', 'fatigue', 'fault', 'favorite', 'feature', 'february', 'federal', 'fee', 'feed', 'feel', 'female', 'fence', 'festival', 'fetch', 'fever', 'few', 'fiber', 'fiction', 'field', 'figure', 'file', 'film', 'filter', 'final', 'find', 'fine', 'finger', 'finish', 'fire', 'firm', 'first', 'fiscal', 'fish', 'fit', 'fitness', 'fix', 'flag', 'flame', 'flash', 'flat', 'flavor', 'flee', 'flight', 'flip', 'float', 'flock', 'floor', 'flower', 'fluid', 'flush', 'fly', 'foam', 'focus', 'fog', 'foil', 'fold', 'follow', 'food', 'foot', 'force', 'forest', 'forget', 'fork', 'fortune', 'forum', 'forward', 'fossil', 'foster', 'found', 'fox', 'fragile', 'frame', 'frequent', 'fresh', 'friend', 'fringe', 'frog', 'front', 'frost', 'frown', 'frozen', 'fruit', 'fuel', 'fun', 'funny', 'furnace', 'fury', 'future', 'gadget', 'gain', 'galaxy', 'gallery', 'game', 'gap', 'garage', 'garbage', 'garden', 'garlic', 'garment', 'gas', 'gasp', 'gate', 'gather', 'gauge', 'gaze', 'general', 'genius', 'genre', 'gentle', 'genuine', 'gesture', 'ghost', 'giant', 'gift', 'giggle', 'ginger', 'giraffe', 'girl', 'give', 'glad', 'glance', 'glare', 'glass', 'glide', 'glimpse', 'globe', 'gloom', 'glory', 'glove', 'glow', 'glue', 'goat', 'goddess', 'gold', 'good', 'goose', 'gorilla', 'gospel', 'gossip', 'govern', 'gown', 'grab', 'grace', 'grain', 'grant', 'grape', 'grass', 'gravity', 'great', 'green', 'grid', 'grief', 'grit', 'grocery', 'group', 'grow', 'grunt', 'guard', 'guess', 'guide', 'guilt', 'guitar', 'gun', 'gym', 'habit', 'hair', 'half', 'hammer', 'hamster', 'hand', 'happy', 'harbor', 'hard', 'harsh', 'harvest', 'hat', 'have', 'hawk', 'hazard', 'head', 'health', 'heart', 'heavy', 'hedgehog', 'height', 'hello', 'helmet', 'help', 'hen', 'hero', 'hidden', 'high', 'hill', 'hint', 'hip', 'hire', 'history', 'hobby', 'hockey', 'hold', 'hole', 'holiday', 'hollow', 'home', 'honey', 'hood', 'hope', 'horn', 'horror', 'horse', 'hospital', 'host', 'hotel', 'hour', 'hover', 'hub', 'huge', 'human', 'humble', 'humor', 'hundred', 'hungry', 'hunt', 'hurdle', 'hurry', 'hurt', 'husband', 'hybrid', 'ice', 'icon', 'idea', 'identify', 'idle', 'ignore', 'ill', 'illegal', 'illness', 'image', 'imitate', 'immense', 'immune', 'impact', 'impose', 'improve', 'impulse', 'inch', 'include', 'income', 'increase', 'index', 'indicate', 'indoor', 'industry', 'infant', 'inflict', 'inform', 'inhale', 'inherit', 'initial', 'inject', 'injury', 'inmate', 'inner', 'innocent', 'input', 'inquiry', 'insane', 'insect', 'inside', 'inspire', 'install', 'intact', 'interest', 'into', 'invest', 'invite', 'involve', 'iron', 'island', 'isolate', 'issue', 'item', 'ivory', 'jacket', 'jaguar', 'jar', 'jazz', 'jealous', 'jeans', 'jelly', 'jewel', 'job', 'join', 'joke', 'journey', 'joy', 'judge', 'juice', 'jump', 'jungle', 'junior', 'junk', 'just', 'kangaroo', 'keen', 'keep', 'ketchup', 'key', 'kick', 'kid', 'kidney', 'kind', 'kingdom', 'kiss', 'kit', 'kitchen', 'kite', 'kitten', 'kiwi', 'knee', 'knife', 'knock', 'know', 'lab', 'label', 'labor', 'ladder', 'lady', 'lake', 'lamp', 'language', 'laptop', 'large', 'later', 'latin', 'laugh', 'laundry', 'lava', 'law', 'lawn', 'lawsuit', 'layer', 'lazy', 'leader', 'leaf', 'learn', 'leave', 'lecture', 'left', 'leg', 'legal', 'legend', 'leisure', 'lemon', 'lend', 'length', 'lens', 'leopard', 'lesson', 'letter', 'level', 'liar', 'liberty', 'library', 'license', 'life', 'lift', 'light', 'like', 'limb', 'limit', 'link', 'lion', 'liquid', 'list', 'little', 'live', 'lizard', 'load', 'loan', 'lobster', 'local', 'lock', 'logic', 'lonely', 'long', 'loop', 'lottery', 'loud', 'lounge', 'love', 'loyal', 'lucky', 'luggage', 'lumber', 'lunar', 'lunch', 'luxury', 'lyrics', 'machine', 'mad', 'magic', 'magnet', 'maid', 'mail', 'main', 'major', 'make', 'mammal', 'man', 'manage', 'mandate', 'mango', 'mansion', 'manual', 'maple', 'marble', 'march', 'margin', 'marine', 'market', 'marriage', 'mask', 'mass', 'master', 'match', 'material', 'math', 'matrix', 'matter', 'maximum', 'maze', 'meadow', 'mean', 'measure', 'meat', 'mechanic', 'medal', 'media', 'melody', 'melt', 'member', 'memory', 'mention', 'menu', 'mercy', 'merge', 'merit', 'merry', 'mesh', 'message', 'metal', 'method', 'middle', 'midnight', 'milk', 'million', 'mimic', 'mind', 'minimum', 'minor', 'minute', 'miracle', 'mirror', 'misery', 'miss', 'mistake', 'mix', 'mixed', 'mixture', 'mobile', 'model', 'modify', 'mom', 'moment', 'monitor', 'monkey', 'monster', 'month', 'moon', 'moral', 'more', 'morning', 'mosquito', 'mother', 'motion', 'motor', 'mountain', 'mouse', 'move', 'movie', 'much', 'muffin', 'mule', 'multiply', 'muscle', 'museum', 'mushroom', 'music', 'must', 'mutual', 'myself', 'mystery', 'myth', 'naive', 'name', 'napkin', 'narrow', 'nasty', 'nation', 'nature', 'near', 'neck', 'need', 'negative', 'neglect', 'neither', 'nephew', 'nerve', 'nest', 'net', 'network', 'neutral', 'never', 'news', 'next', 'nice', 'night', 'noble', 'noise', 'nominee', 'noodle', 'normal', 'north', 'nose', 'notable', 'note', 'nothing', 'notice', 'novel', 'now', 'nuclear', 'number', 'nurse', 'nut', 'oak', 'obey', 'object', 'oblige', 'obscure', 'observe', 'obtain', 'obvious', 'occur', 'ocean', 'october', 'odor', 'off', 'offer', 'office', 'often', 'oil', 'okay', 'old', 'olive', 'olympic', 'omit', 'once', 'one', 'onion', 'online', 'only', 'open', 'opera', 'opinion', 'oppose', 'option', 'orange', 'orbit', 'orchard', 'order', 'ordinary', 'organ', 'orient', 'original', 'orphan', 'ostrich', 'other', 'outdoor', 'outer', 'output', 'outside', 'oval', 'oven', 'over', 'own', 'owner', 'oxygen', 'oyster', 'ozone', 'pact', 'paddle', 'page', 'pair', 'palace', 'palm', 'panda', 'panel', 'panic', 'panther', 'paper', 'parade', 'parent', 'park', 'parrot', 'party', 'pass', 'patch', 'path', 'patient', 'patrol', 'pattern', 'pause', 'pave', 'payment', 'peace', 'peanut', 'pear', 'peasant', 'pelican', 'pen', 'penalty', 'pencil', 'people', 'pepper', 'perfect', 'permit', 'person', 'pet', 'phone', 'photo', 'phrase', 'physical', 'piano', 'picnic', 'picture', 'piece', 'pig', 'pigeon', 'pill', 'pilot', 'pink', 'pioneer', 'pipe', 'pistol', 'pitch', 'pizza', 'place', 'planet', 'plastic', 'plate', 'play', 'please', 'pledge', 'pluck', 'plug', 'plunge', 'poem', 'poet', 'point', 'polar', 'pole', 'police', 'pond', 'pony', 'pool', 'popular', 'portion', 'position', 'possible', 'post', 'potato', 'pottery', 'poverty', 'powder', 'power', 'practice', 'praise', 'predict', 'prefer', 'prepare', 'present', 'pretty', 'prevent', 'price', 'pride', 'primary', 'print', 'priority', 'prison', 'private', 'prize', 'problem', 'process', 'produce', 'profit', 'program', 'project', 'promote', 'proof', 'property', 'prosper', 'protect', 'proud', 'provide', 'public', 'pudding', 'pull', 'pulp', 'pulse', 'pumpkin', 'punch', 'pupil', 'puppy', 'purchase', 'purity', 'purpose', 'purse', 'push', 'put', 'puzzle', 'pyramid', 'quality', 'quantum', 'quarter', 'question', 'quick', 'quit', 'quiz', 'quote', 'rabbit', 'raccoon', 'race', 'rack', 'radar', 'radio', 'rail', 'rain', 'raise', 'rally', 'ramp', 'ranch', 'random', 'range', 'rapid', 'rare', 'rate', 'rather', 'raven', 'raw', 'razor', 'ready', 'real', 'reason', 'rebel', 'rebuild', 'recall', 'receive', 'recipe', 'record', 'recycle', 'reduce', 'reflect', 'reform', 'refuse', 'region', 'regret', 'regular', 'reject', 'relax', 'release', 'relief', 'rely', 'remain', 'remember', 'remind', 'remove', 'render', 'renew', 'rent', 'reopen', 'repair', 'repeat', 'replace', 'report', 'require', 'rescue', 'resemble', 'resist', 'resource', 'response', 'result', 'retire', 'retreat', 'return', 'reunion', 'reveal', 'review', 'reward', 'rhythm', 'rib', 'ribbon', 'rice', 'rich', 'ride', 'ridge', 'rifle', 'right', 'rigid', 'ring', 'riot', 'ripple', 'risk', 'ritual', 'rival', 'river', 'road', 'roast', 'robot', 'robust', 'rocket', 'romance', 'roof', 'rookie', 'room', 'rose', 'rotate', 'rough', 'round', 'route', 'royal', 'rubber', 'rude', 'rug', 'rule', 'run', 'runway', 'rural', 'sad', 'saddle', 'sadness', 'safe', 'sail', 'salad', 'salmon', 'salon', 'salt', 'salute', 'same', 'sample', 'sand', 'satisfy', 'satoshi', 'sauce', 'sausage', 'save', 'say', 'scale', 'scan', 'scare', 'scatter', 'scene', 'scheme', 'school', 'science', 'scissors', 'scorpion', 'scout', 'scrap', 'screen', 'script', 'scrub', 'sea', 'search', 'season', 'seat', 'second', 'secret', 'section', 'security', 'seed', 'seek', 'segment', 'select', 'sell', 'seminar', 'senior', 'sense', 'sentence', 'series', 'service', 'session', 'settle', 'setup', 'seven', 'shadow', 'shaft', 'shallow', 'share', 'shed', 'shell', 'sheriff', 'shield', 'shift', 'shine', 'ship', 'shiver', 'shock', 'shoe', 'shoot', 'shop', 'short', 'shoulder', 'shove', 'shrimp', 'shrug', 'shuffle', 'shy', 'sibling', 'sick', 'side', 'siege', 'sight', 'sign', 'silent', 'silk', 'silly', 'silver', 'similar', 'simple', 'since', 'sing', 'siren', 'sister', 'situate', 'six', 'size', 'skate', 'sketch', 'ski', 'skill', 'skin', 'skirt', 'skull', 'slab', 'slam', 'sleep', 'slender', 'slice', 'slide', 'slight', 'slim', 'slogan', 'slot', 'slow', 'slush', 'small', 'smart', 'smile', 'smoke', 'smooth', 'snack', 'snake', 'snap', 'sniff', 'snow', 'soap', 'soccer', 'social', 'sock', 'soda', 'soft', 'solar', 'soldier', 'solid', 'solution', 'solve', 'someone', 'song', 'soon', 'sorry', 'sort', 'soul', 'sound', 'soup', 'source', 'south', 'space', 'spare', 'spatial', 'spawn', 'speak', 'special', 'speed', 'spell', 'spend', 'sphere', 'spice', 'spider', 'spike', 'spin', 'spirit', 'split', 'spoil', 'sponsor', 'spoon', 'sport', 'spot', 'spray', 'spread', 'spring', 'spy', 'square', 'squeeze', 'squirrel', 'stable', 'stadium', 'staff', 'stage', 'stairs', 'stamp', 'stand', 'start', 'state', 'stay', 'steak', 'steel', 'stem', 'step', 'stereo', 'stick', 'still', 'sting', 'stock', 'stomach', 'stone', 'stool', 'story', 'stove', 'strategy', 'street', 'strike', 'strong', 'struggle', 'student', 'stuff', 'stumble', 'style', 'subject', 'submit', 'subway', 'success', 'such', 'sudden', 'suffer', 'sugar', 'suggest', 'suit', 'summer', 'sun', 'sunny', 'sunset', 'super', 'supply', 'supreme', 'sure', 'surface', 'surge', 'surprise', 'surround', 'survey', 'suspect', 'sustain', 'swallow', 'swamp', 'swap', 'swarm', 'swear', 'sweet', 'swift', 'swim', 'swing', 'switch', 'sword', 'symbol', 'symptom', 'syrup', 'system', 'table', 'tackle', 'tag', 'tail', 'talent', 'talk', 'tank', 'tape', 'target', 'task', 'taste', 'tattoo', 'taxi', 'teach', 'team', 'tell', 'ten', 'tenant', 'tennis', 'tent', 'term', 'test', 'text', 'thank', 'that', 'theme', 'then', 'theory', 'there', 'they', 'thing', 'this', 'thought', 'three', 'thrive', 'throw', 'thumb', 'thunder', 'ticket', 'tide', 'tiger', 'tilt', 'timber', 'time', 'tiny', 'tip', 'tired', 'tissue', 'title', 'toast', 'tobacco', 'today', 'toddler', 'toe', 'together', 'toilet', 'token', 'tomato', 'tomorrow', 'tone', 'tongue', 'tonight', 'tool', 'tooth', 'top', 'topic', 'topple', 'torch', 'tornado', 'tortoise', 'toss', 'total', 'tourist', 'toward', 'tower', 'town', 'toy', 'track', 'trade', 'traffic', 'tragic', 'train', 'transfer', 'trap', 'trash', 'travel', 'tray', 'treat', 'tree', 'trend', 'trial', 'tribe', 'trick', 'trigger', 'trim', 'trip', 'trophy', 'trouble', 'truck', 'true', 'truly', 'trumpet', 'trust', 'truth', 'try', 'tube', 'tuition', 'tumble', 'tuna', 'tunnel', 'turkey', 'turn', 'turtle', 'twelve', 'twenty', 'twice', 'twin', 'twist', 'two', 'type', 'typical', 'ugly', 'umbrella', 'unable', 'unaware', 'uncle', 'uncover', 'under', 'undo', 'unfair', 'unfold', 'unhappy', 'uniform', 'unique', 'unit', 'universe', 'unknown', 'unlock', 'until', 'unusual', 'unveil', 'update', 'upgrade', 'uphold', 'upon', 'upper', 'upset', 'urban', 'urge', 'usage', 'use', 'used', 'useful', 'useless', 'usual', 'utility', 'vacant', 'vacuum', 'vague', 'valid', 'valley', 'valve', 'van', 'vanish', 'vapor', 'various', 'vast', 'vault', 'vehicle', 'velvet', 'vendor', 'venture', 'venue', 'verb', 'verify', 'version', 'very', 'vessel', 'veteran', 'viable', 'vibrant', 'vicious', 'victory', 'video', 'view', 'village', 'vintage', 'violin', 'virtual', 'virus', 'visa', 'visit', 'visual', 'vital', 'vivid', 'vocal', 'voice', 'void', 'volcano', 'volume', 'vote', 'voyage', 'wage', 'wagon', 'wait', 'walk', 'wall', 'walnut', 'want', 'warfare', 'warm', 'warrior', 'wash', 'wasp', 'waste', 'water', 'wave', 'way', 'wealth', 'weapon', 'wear', 'weasel', 'weather', 'web', 'wedding', 'weekend', 'weird', 'welcome', 'west', 'wet', 'whale', 'what', 'wheat', 'wheel', 'when', 'where', 'whip', 'whisper', 'wide', 'width', 'wife', 'wild', 'will', 'win', 'window', 'wine', 'wing', 'wink', 'winner', 'winter', 'wire', 'wisdom', 'wise', 'wish', 'witness', 'wolf', 'woman', 'wonder', 'wood', 'wool', 'word', 'work', 'world', 'worry', 'worth', 'wrap', 'wreck', 'wrestle', 'wrist', 'write', 'wrong', 'yard', 'year', 'yellow', 'you', 'young', 'youth', 'zebra', 'zero', 'zone', 'zoo'])\r
-       /*!\r
-       /* node:coverage disable */\r
 }\r
index 5357c307a62eb49d10f2f4c650b0f0b696cea9d5..b0989bd613ef6f54c4b4db33ce59a71e461ecfa3 100644 (file)
@@ -7,8 +7,6 @@ type ExtendedKey = {
 }
 
 export class Bip44 {
-       /*!
-       /* node:coverage enable */
        static get BIP44_PURPOSE (): 44 { return 44 }
        static get HARDENED_OFFSET (): 0x80000000 { return 0x80000000 }
        static get SLIP10_ED25519 (): 'ed25519 seed' { return 'ed25519 seed' }
@@ -98,6 +96,4 @@ export class Bip44 {
                                        })
                        })
        }
-       /*!
-       /* node:coverage disable */
 }
index 72c92110af164de81794a9ee84497a51f33af418..829dc50a7c2baf010fd460de7a0b395d54f06b88 100644 (file)
@@ -11,8 +11,6 @@
 * Original source commit: https://github.com/emilbayes/blake2b/blob/1f63e02e3f226642959506cdaa67c8819ff145cd/index.js
 */
 export class Blake2b {
-       /*!
-       /* node:coverage enable */
        /**
        * Derives account private keys from a wallet seed using the BLAKE2b hashing
        * algorithm.
@@ -288,6 +286,4 @@ export class Blake2b {
                this.#blake2bFinal(buf)
                return buf
        }
-       /*!
-       /* node:coverage disable */
 }
index b1422ba69716f4942ed1377383f740422109aa35..8ce4bd367496279a5b57dae65db1b8c25d26e8a4 100644 (file)
@@ -15,8 +15,6 @@ import { Blake2b } from '.'
 * Original source commit: https://github.com/dchest/tweetnacl-js/blob/71df1d6a1d78236ca3e9f6c788786e21f5a651a6/nacl-fast.js\r
 */\r
 export class NanoNaCl {\r
-       /*!\r
-       /* node:coverage enable */\r
        static crypto_sign_BYTES: 64 = 64\r
        static crypto_sign_PUBLICKEYBYTES: 32 = 32\r
        static crypto_sign_PRIVATEKEYBYTES: 32 = 32\r
@@ -608,6 +606,4 @@ export class NanoNaCl {
                        throw new Error('Failed to verify signature on message with the given public key', { cause: err })\r
                }\r
        }\r
-       /*!\r
-       /* node:coverage disable */\r
 }\r
index 84a2b119e5290ff6656a4fc343900cae124f549e..b2e1013c7facef9be99d4716a5fe4a4f00b96f5c 100644 (file)
@@ -6,8 +6,6 @@
 import { NamedData } from "#types"
 
 export class WalletAesGcm {
-       /*!
-       /* node:coverage enable */
        static encoder: TextEncoder = new TextEncoder()
 
        static decrypt (type: string, key: CryptoKey, iv: ArrayBuffer, encrypted: ArrayBuffer): Promise<NamedData<ArrayBuffer>> {
@@ -44,6 +42,4 @@ export class WalletAesGcm {
                                return { iv, encrypted }
                        })
        }
-       /*!
-       /* node:coverage disable */
 }
index e3affbe0db5b24569d036f625e2a71fc7f796529..db6b9de0b28768ac6498f9e2c4903da0f609982b 100644 (file)
@@ -7,8 +7,6 @@ import { Data, NamedData } from '#types'
 * Encrypts and stores data in the browser using IndexedDB.
 */
 export class Database {
-       /*!
-       /* node:coverage enable */
        static DB_NAME = 'libnemo'
        static DB_STORES = ['Wallet', 'Account', 'Rolodex']
        static #storage: IDBDatabase
@@ -196,6 +194,4 @@ export class Database {
                        }
                })
        }
-       /*!
-       /* node:coverage disable */
 }
index 1c2e7f5cc4721339f37e64fc5c67bafad20e3103..93284c120372695ff2e3b4f1990043e229d6fecc 100644 (file)
@@ -11,8 +11,6 @@ import { verify } from './tools'
 * saved under one nickname.
 */
 export class Rolodex {
-       /*!
-       /* node:coverage enable */
        static get DB_NAME (): 'Rolodex' { return 'Rolodex' }
        /**
        * Adds an address to the rolodex under a specific nickname.
@@ -193,6 +191,4 @@ export class Rolodex {
                }
                return false
        }
-       /*!
-       /* node:coverage disable */
 }
index 0809dd7e1bc551816fa4bbc577bfda75a569585d..885f42ff29e559b22890c547df89fff5a69a44ac 100644 (file)
@@ -9,8 +9,6 @@
 * other value will be changed automatically.
 */
 export class Rpc {
-       /*!
-       /* node:coverage enable */
        #u: URL
        #n?: string
 
@@ -87,6 +85,4 @@ export class Rpc {
                        throw new TypeError('RPC action contains invalid characters')
                }
        }
-       /*!
-       /* node:coverage disable */
 }
index a9a9f0180a77211e5b78877fa8da5981495e56e2..7ab2c9fc30f2d648776986ff02772432f358a06a 100644 (file)
@@ -1,8 +1,6 @@
 //! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
 //! SPDX-License-Identifier: GPL-3.0-or-later
 
-/*!
-/* node:coverage enable */
 import { SweepResult } from '#types'
 import { Account } from './account'
 import { Block } from './block'
@@ -210,5 +208,3 @@ export async function verify (key: string | Uint8Array<ArrayBuffer>, signature:
 }
 
 export const Tools = { convert, hash, sign, sweep, verify }
-/*!
-/* node:coverage disable */
index 53d25be7812fba2df3d7448a9a976bc71a647e87..d90db6bf2ba9f342e56eb1d0c1d522c88761c8db 100644 (file)
@@ -17,8 +17,6 @@ type Task = {
 }
 
 export class Vault {
-       /*!
-       /* node:coverage enable */
        static #instances: Vault[] = []
        static get instances (): Vault[] { return this.#instances }
 
@@ -116,8 +114,6 @@ export class Vault {
                        this.#process()
                }
        }
-       /*!
-       /* node:coverage disable */
 }
 
 const blob = `
index c909c202d000eea2bbe1056e9db6ded08849645b..1939c408f0fe4eb62f51742a0500b401a2f8f658 100644 (file)
@@ -8,8 +8,6 @@ import { Vault } from '../vault'
 export async function _accounts (type: WalletType, accounts: Map<number, Account>, vault: Vault, index: number): Promise<Account>
 export async function _accounts (type: WalletType, accounts: Map<number, Account>, vault: Vault, from: number, to: number): Promise<Map<number, Account>>
 export async function _accounts (type: WalletType, accounts: Map<number, Account>, vault: Vault, from: unknown, to?: unknown): Promise<Account | Map<number, Account>> {
-       /*!
-       /* node:coverage enable */
        const isSingle = to === undefined
        to ??= from
        if (typeof from !== 'number' || typeof to !== 'number') {
@@ -66,6 +64,4 @@ export async function _accounts (type: WalletType, accounts: Map<number, Account
                return account
        }
        return output
-       /*!
-       /* node:coverage disable */
 }
index 477aac2bfa27230f41dfb1aa5365063b7d2734fd..860ecd31e93f7b57eb384c233cc3c5f9f06293e0 100644 (file)
@@ -6,8 +6,6 @@ import { Database } from '../database'
 import { Wallet } from '../wallet'
 
 export async function _backup () {
-       /*!
-       /* node:coverage enable */
        try {
                const records = await Database.getAll<NamedData>(Wallet.DB_NAME)
                const recordIds = Object.keys(records)
@@ -37,6 +35,4 @@ export async function _backup () {
                console.error(err)
                return []
        }
-       /*!
-       /* node:coverage disable */
 }
index ec1c5ed5ca5bf4d312262c0c39565f6fd9dd9cd5..e9b7d979a6195ad80691aa49de2bba276a97b12d 100644 (file)
@@ -6,8 +6,6 @@ import { Vault } from '../vault'
 
 export async function _config (type: WalletType, vault: Vault, settings: { connection: 'hid' | 'ble' | 'usb' } | { timeout: number }): Promise<void>
 export async function _config (type: WalletType, vault: Vault, settings: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                if (settings == null || typeof settings !== 'object') {
                        throw new TypeError('Invalid configuration settings')
@@ -33,6 +31,4 @@ export async function _config (type: WalletType, vault: Vault, settings: unknown
        } catch (err) {
                throw new Error('Failed to lock wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index c6669342091ba4257d22fd7c31287ac90f0eb946..2aec6fe944842176b1264f0c1050609d2c26f1d9 100644 (file)
@@ -10,8 +10,6 @@ import { _load } from './load'
 
 export async function _create (wallet: Wallet, vault: Vault, password?: string, mnemonicSalt?: string): Promise<NamedData<ArrayBuffer>>
 export async function _create (wallet: Wallet, vault: Vault, password: unknown, mnemonicSalt?: unknown): Promise<NamedData<ArrayBuffer>> {
-       /*!
-       /* node:coverage enable */
        try {
                const result: NamedData<ArrayBuffer> = {}
                const record: NamedData = {
@@ -54,6 +52,4 @@ export async function _create (wallet: Wallet, vault: Vault, password: unknown,
                await wallet.destroy()
                throw new Error('Error creating new Wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index b0f216d50c0f13810ab7309738c01165aee1372b..f01024091d10d68559721f0f0dd3d73f128b64fb 100644 (file)
@@ -6,8 +6,6 @@ import { Vault } from '../vault'
 import { Wallet } from '../wallet'
 
 export async function _destroy (wallet: Wallet, vault: Vault) {
-       /*!
-       /* node:coverage enable */
        try {
                vault.terminate()
                if (wallet.type === 'Ledger') {
@@ -21,6 +19,4 @@ export async function _destroy (wallet: Wallet, vault: Vault) {
                console.error(err)
                throw new Error('Failed to destroy wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 875116d089cdc0fde649c2b874ce99cf08c11317..3e47f2484362408b31a05675cbf241f6b5e7715b 100644 (file)
@@ -6,8 +6,6 @@ import { Database } from '../database'
 import { Wallet } from '../wallet'
 
 export async function _get (recordId: string) {
-       /*!
-       /* node:coverage enable */
        try {
                const record = await Database.get<NamedData>(recordId, Wallet.DB_NAME)
                const { id, type, iv, salt, encrypted } = record[recordId]
@@ -30,6 +28,4 @@ export async function _get (recordId: string) {
        } catch (err) {
                throw new Error('Failed to get wallet from database', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 87282497f0ba1942fb159bbca6ca4fb7efc8c60a..e567420a92fb7bf505fd175c2e24afae8a98efda 100644 (file)
@@ -30,8 +30,6 @@ import { _verify } from './verify'
 * three types of wallets are supported: BIP-44, BLAKE2b, and Ledger.\r
 */\r
 export class Wallet {\r
-       /*!\r
-       /* node:coverage enable */\r
        static get DB_NAME (): 'Wallet' { return 'Wallet' }\r
 \r
        /**\r
@@ -397,6 +395,4 @@ export class Wallet {
        #seed?: ArrayBuffer\r
        #type: WalletType\r
        #vault: Vault\r
-       /*!\r
-       /* node:coverage disable */\r
 }\r
index af3b2b20ef478e1e45ffcd63a9207b4fcbc25c06..406c539245e9dfaaf39e485e748129d557843f48 100644 (file)
@@ -10,8 +10,6 @@ import { Wallet } from '../wallet'
 
 export async function _load (wallet: Wallet, vault: Vault, password: string, secret: string, mnemonicSalt?: string): Promise<void>
 export async function _load (wallet: Wallet, vault: Vault, password: unknown, secret: unknown, mnemonicSalt?: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                const record: NamedData = {
                        id: wallet.id,
@@ -62,6 +60,4 @@ export async function _load (wallet: Wallet, vault: Vault, password: unknown, se
                await wallet.destroy()
                throw new Error('Error creating new Wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 04007f9fe37417f3dc4324d171a79d15a7ee19f0..a65773fc20aacc2fbc824e62eb0632fb17f4b959 100644 (file)
@@ -5,8 +5,6 @@ import { Vault } from '../vault'
 import { Wallet } from '../wallet'
 
 export async function _lock (wallet: Wallet, vault: Vault): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                if (wallet.type === 'Ledger') {
                        const { Ledger } = await import('./ledger')
@@ -22,6 +20,4 @@ export async function _lock (wallet: Wallet, vault: Vault): Promise<void> {
        } catch (err) {
                throw new Error('Failed to lock wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 802d4c09aae92931425d9a3159319bbb73b7cfd7..3166a81a80771a28ffd5807320005d3efe982e51 100644 (file)
@@ -9,8 +9,6 @@ import { Wallet } from '../wallet'
 
 export async function _refresh (wallet: Wallet, rpc: Rpc | string | URL, from: number, to: number): Promise<Map<number, Account>>
 export async function _refresh (wallet: Wallet, rpc: unknown, from: unknown, to: unknown): Promise<Map<number, Account>> {
-       /*!
-       /* node:coverage enable */
        try {
                if (typeof rpc === 'string' || rpc instanceof URL) {
                        rpc = new Rpc(rpc)
@@ -56,6 +54,4 @@ export async function _refresh (wallet: Wallet, rpc: unknown, from: unknown, to:
                console.error(err)
                throw new Error('Failed to refresh accounts', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index a8cffbd1b4ee84071c089589d77af911fa5eabcd..5178546ab2596c3c17354e65c756369ce29f2ae9 100644 (file)
@@ -5,8 +5,6 @@ import { _backup } from './backup'
 import { _get } from './get'
 
 export async function _restore (id?: unknown) {
-       /*!
-       /* node:coverage enable */
        try {
                if (id !== undefined && typeof id !== 'string') {
                        throw new TypeError('ID to restore must be a string')
@@ -26,6 +24,4 @@ export async function _restore (id?: unknown) {
        } catch (err) {
                throw new Error('Failed to restore wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index e25f3e222c9165176479b1f5a689832803d9c8e3..3078172900f3c2c665327d9afc4d924403778be3 100644 (file)
@@ -9,8 +9,6 @@ import { Wallet } from '../wallet'
 
 export async function _signData (wallet: Wallet, vault: Vault, index: number, data: string | string[]): Promise<string>
 export async function _signData (wallet: Wallet, vault: Vault, index: unknown, data: unknown): Promise<string> {
-       /*!
-       /* node:coverage enable */
        try {
                if (wallet.type === 'Ledger') {
                        throw new TypeError('Ledger wallet cannot sign arbitrary data')
@@ -33,15 +31,11 @@ export async function _signData (wallet: Wallet, vault: Vault, index: unknown, d
        } catch (err) {
                throw new Error('Failed to sign data', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
 
 
 export async function _signBlock (wallet: Wallet, vault: Vault, index: number, block: Block, frontier?: Block): Promise<void>
 export async function _signBlock (wallet: Wallet, vault: Vault, index: unknown, block: unknown, frontier?: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                if (typeof index !== 'number') {
                        throw new TypeError('Index must be a number', { cause: index })
@@ -71,6 +65,4 @@ export async function _signBlock (wallet: Wallet, vault: Vault, index: unknown,
        } catch (err) {
                throw new Error(`Failed to sign block`, { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 11183d897ea818b2a0f795a3efef949fb9721199..bf5ba375f49ae2232d202f4a3b3189a4113a60a9 100644 (file)
@@ -9,8 +9,6 @@ import { _get } from './get'
 
 export async function _unlock (wallet: Wallet, vault: Vault, password?: string): Promise<void>
 export async function _unlock (wallet: Wallet, vault: Vault, password: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                const data: NamedData = {
                        action: 'unlock',
@@ -43,6 +41,4 @@ export async function _unlock (wallet: Wallet, vault: Vault, password: unknown):
        } catch (err) {
                throw new Error('Failed to unlock wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index 768431b59ebff16177cd9649b5662c2af9a7ee05..6ffaa3be825b4e0b585686421bc30f14c571a788 100644 (file)
@@ -7,8 +7,6 @@ import { Wallet } from '../wallet'
 
 export async function _unopened (wallet: Wallet, rpc: Rpc, batchSize: number, from: number): Promise<Account>
 export async function _unopened (wallet: Wallet, rpc: unknown, batchSize: unknown, from: unknown): Promise<Account> {
-       /*!
-       /* node:coverage enable */
        if (!(rpc instanceof Rpc)) {
                throw new TypeError('Invalid RPC endpoint', { cause: rpc })
        }
@@ -40,6 +38,4 @@ export async function _unopened (wallet: Wallet, rpc: unknown, batchSize: unknow
                }
        }
        return await _unopened(wallet, rpc, batchSize, from + batchSize)
-       /*!
-       /* node:coverage disable */
 }
index c19a906a4e88bceea1dd268710530567852a0486..50d3f92556ff9f1b699d58d24e9794b35b4c8fa7 100644 (file)
@@ -10,8 +10,6 @@ import { _get } from './get'
 
 export async function _update (wallet: Wallet, vault: Vault, password?: string): Promise<void>
 export async function _update (wallet: Wallet, vault: Vault, password: unknown): Promise<void> {
-       /*!
-       /* node:coverage enable */
        try {
                const record: NamedData = {
                        id: wallet.id,
@@ -36,6 +34,4 @@ export async function _update (wallet: Wallet, vault: Vault, password: unknown):
        } catch (err) {
                throw new Error('Failed to unlock wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index fd82f2ccc6e3e9a86a1f87d9d20b62dea15cd02b..8a5d22d1d8886d67b5791a2cc39dc5ca3bee9967 100644 (file)
@@ -7,8 +7,6 @@ import { Vault } from '../vault'
 
 export async function _verify (type: WalletType, vault: Vault, secret: string): Promise<boolean>
 export async function _verify (type: WalletType, vault: Vault, secret: unknown): Promise<boolean> {
-       /*!
-       /* node:coverage enable */
        try {
                if (typeof secret !== 'string') {
                        throw new TypeError('Wallet secret must be a string', { cause: typeof secret })
@@ -34,6 +32,4 @@ export async function _verify (type: WalletType, vault: Vault, secret: unknown):
        } catch (err) {
                throw new Error('Failed to verify wallet', { cause: err })
        }
-       /*!
-       /* node:coverage disable */
 }
index d3437bbc56d1d8e6ee6eed1663133550d12f9562..6837f9ad3e6826005b4858c391fd9cd262068597 100644 (file)
@@ -41,7 +41,6 @@ const rpc = new Rpc(env.NODE_URL ?? '', env.API_KEY_NAME)
 * from their own Ledger hardware wallets.
 */
 await Promise.all([
-       /* node:coverage disable */
        suite('Ledger hardware wallet', { skip: false || isNode || navigator?.usb == null }, async () => {
 
                const { LEDGER_MNEMONIC, LEDGER_SEED, LEDGER_PUBLIC_0, LEDGER_ADDRESS_0 } = CUSTOM_TEST_VECTORS
@@ -258,5 +257,4 @@ await Promise.all([
                        await assert.rejects(wallet.unlock())
                })
        })
-       /* node:coverage enable */
 ])