diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 37d08f73..650556ea 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -307,16 +307,17 @@ } }, "node_modules/@cashu/cashu-ts": { - "version": "2.0.0-rc1", - "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", - "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.7.2.tgz", + "integrity": "sha512-AOwL6+10AA0syRf2mtRYgoTvAz31gE4MnElj9TLS9xG3k8Msxy27awBlCX5MsBpBgcZZoqWOReYEuUgnbN3IQQ==", "license": "MIT", "dependencies": { - "@cashu/crypto": "^0.2.7", - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@scure/bip32": "^1.3.3", - "buffer": "^6.0.3" + "@noble/curves": "^1.9.5", + "@noble/hashes": "^1.5.0", + "@scure/bip32": "^1.5.0" + }, + "engines": { + "node": ">=22.4.0" } }, "node_modules/@cashu/crypto": { @@ -332,6 +333,19 @@ "buffer": "^6.0.3" } }, + "node_modules/@cashu/crypto/node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -1390,18 +1404,39 @@ } }, "node_modules/@scure/bip39": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", - "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", "license": "MIT", "dependencies": { - "@noble/hashes": "~1.8.0", - "@scure/base": "~1.2.5" + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1862,18 +1897,18 @@ } }, "node_modules/applesauce-content": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", - "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-4.0.0.tgz", + "integrity": "sha512-2ZrhM/UCQkcZcAldXJX+KfWAPAtkoTXH5BwPhYpaMw0UgHjWX8mYiy/801PtLBr2gWkKd/Dw1obdNDcPUO3idw==", "license": "MIT", "dependencies": { - "@cashu/cashu-ts": "2.0.0-rc1", + "@cashu/cashu-ts": "^2.7.2", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3", - "applesauce-core": "^3.1.0", + "applesauce-core": "^4.0.0", "mdast-util-find-and-replace": "^3.0.2", - "nostr-tools": "~2.15", + "nostr-tools": "~2.17", "remark": "^15.0.1", "remark-parse": "^11.0.0", "unified": "^11.0.5", @@ -1884,6 +1919,157 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-content/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.1" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/applesauce-core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/applesauce-core/-/applesauce-core-4.0.0.tgz", + "integrity": "sha512-cXg9lDU0PKpAeVw7FGN3jzKB/k9kX5YOI7uwzrZhibYB5PfpHAYRiVexxBuFdT2RNaDgQogXl75gV2hag5uLuw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.7.1", + "@scure/base": "^1.2.4", + "debug": "^4.4.0", + "fast-deep-equal": "^3.1.3", + "hash-sum": "^2.0.0", + "light-bolt11-decoder": "^3.2.0", + "nanoid": "^5.0.9", + "nostr-tools": "~2.17", + "rxjs": "^7.8.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.17.0.tgz", + "integrity": "sha512-lrvHM7cSaGhz7F0YuBvgHMoU2s8/KuThihDoOYk8w5gpVHTy0DeUCAgCN8uLGeuSl5MAWekJr9Dkfo5HClqO9w==", + "license": "Unlicense", + "dependencies": { + "@noble/ciphers": "^0.5.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.1", + "@scure/base": "1.1.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1", + "nostr-wasm": "0.1.0" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools/node_modules/@scure/base": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", + "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, "node_modules/applesauce-core": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-core/-/applesauce-core-3.1.0.tgz", @@ -1921,6 +2107,42 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-factory/node_modules/@cashu/cashu-ts": { + "version": "2.0.0-rc1", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", + "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "license": "MIT", + "dependencies": { + "@cashu/crypto": "^0.2.7", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@scure/bip32": "^1.3.3", + "buffer": "^6.0.3" + } + }, + "node_modules/applesauce-factory/node_modules/applesauce-content": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", + "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "license": "MIT", + "dependencies": { + "@cashu/cashu-ts": "2.0.0-rc1", + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "@types/unist": "^3.0.3", + "applesauce-core": "^3.1.0", + "mdast-util-find-and-replace": "^3.0.2", + "nostr-tools": "~2.15", + "remark": "^15.0.1", + "remark-parse": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit-parents": "^6.0.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, "node_modules/applesauce-loaders": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-loaders/-/applesauce-loaders-3.1.0.tgz", @@ -1959,6 +2181,42 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-react/node_modules/@cashu/cashu-ts": { + "version": "2.0.0-rc1", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", + "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "license": "MIT", + "dependencies": { + "@cashu/crypto": "^0.2.7", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@scure/bip32": "^1.3.3", + "buffer": "^6.0.3" + } + }, + "node_modules/applesauce-react/node_modules/applesauce-content": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", + "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "license": "MIT", + "dependencies": { + "@cashu/cashu-ts": "2.0.0-rc1", + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "@types/unist": "^3.0.3", + "applesauce-core": "^3.1.0", + "mdast-util-find-and-replace": "^3.0.2", + "nostr-tools": "~2.15", + "remark": "^15.0.1", + "remark-parse": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit-parents": "^6.0.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, "node_modules/applesauce-relay": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-relay/-/applesauce-relay-3.1.0.tgz", @@ -3910,19 +4168,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/nostr-tools/node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/nostr-wasm": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz", diff --git a/node_modules/@cashu/cashu-ts/.eslintignore b/node_modules/@cashu/cashu-ts/.eslintignore deleted file mode 100644 index 379fab7b..00000000 --- a/node_modules/@cashu/cashu-ts/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -/node_modules -/dist -/test -/coverage -/.jest -jest.config.ts \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/.eslintrc.json b/node_modules/@cashu/cashu-ts/.eslintrc.json deleted file mode 100644 index ffa38d65..00000000 --- a/node_modules/@cashu/cashu-ts/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module", - "project": "tsconfig.json" - }, - "plugins": ["@typescript-eslint"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - - "rules": { - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/consistent-type-definitions": ["warn", "type"], - "@typescript-eslint/array-type": ["error", { "default": "generic" }], - "require-await": "off", - "@typescript-eslint/require-await": "error", - "@typescript-eslint/await-thenable": "warn", - "@typescript-eslint/consistent-type-exports": "warn", - "no-else-return": "warn" - }, - - "env": { - "browser": true, - "es2021": true - } -} diff --git a/node_modules/@cashu/cashu-ts/.prettierignore b/node_modules/@cashu/cashu-ts/.prettierignore deleted file mode 100644 index 3f9a9497..00000000 --- a/node_modules/@cashu/cashu-ts/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -dist -node_modules -package-lock.json -coverage -docs \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/.prettierrc b/node_modules/@cashu/cashu-ts/.prettierrc deleted file mode 100644 index 57792108..00000000 --- a/node_modules/@cashu/cashu-ts/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "pluginSearchDirs": ["."] -} diff --git a/node_modules/@cashu/cashu-ts/README.md b/node_modules/@cashu/cashu-ts/README.md index 1fda2f75..508a3e12 100644 --- a/node_modules/@cashu/cashu-ts/README.md +++ b/node_modules/@cashu/cashu-ts/README.md @@ -21,6 +21,7 @@ Wallet Features: - [x] receiving tokens - [x] melting tokens - [x] check if tokens are spent +- [x] payment methods: bolt11, bolt12 - [ ] ... Implemented [NUTs](https://github.com/cashubtc/nuts/): @@ -36,6 +37,9 @@ Implemented [NUTs](https://github.com/cashubtc/nuts/): - [x] [NUT-08](https://github.com/cashubtc/nuts/blob/main/08.md) - [x] [NUT-09](https://github.com/cashubtc/nuts/blob/main/09.md) - [x] [NUT-11](https://github.com/cashubtc/nuts/blob/main/11.md) +- [x] [NUT-18](https://github.com/cashubtc/nuts/blob/main/18.md) +- [x] [NUT-23](https://github.com/cashubtc/nuts/blob/main/23.md) +- [x] [NUT-25](https://github.com/cashubtc/nuts/blob/main/25.md) Supported token formats: @@ -46,7 +50,7 @@ Supported token formats: ## Usage -Go to the [docs](https://cashubtc.github.io/cashu-ts/docs) for detailed usage, or have a look at the [integration tests](./test/integration.test.ts) for examples on how to implement a wallet. +Go to the [docs](https://cashubtc.github.io/cashu-ts/docs/main) for detailed usage, or have a look at the [integration tests](./test/integration.test.ts) for examples on how to implement a wallet. ### Install @@ -54,13 +58,26 @@ Go to the [docs](https://cashubtc.github.io/cashu-ts/docs) for detailed usage, o npm i @cashu/cashu-ts ``` +### Logging + +By default, cashu-ts does not log to the console. If you want to enable logging for debugging purposes, you can set the `logger` option when creating a wallet or mint. A `ConsoleLogger` is provided, or you can wrap your existing logger to conform to the `Logger` interface: + +```typescript +import { CashuMint, CashuWallet, ConsoleLogger, LogLevel } from '@cashu/cashu-ts'; +const mintUrl = 'http://localhost:3338'; +const mintLogger = new ConsoleLogger(LogLevel.ERROR); +const mint = new CashuMint(mintUrl, undefined, { logger: mintLogger }); // Enable logging for the mint +const walletLogger = new ConsoleLogger(LogLevel.DEBUG); +const wallet = new CashuWallet(mint, { logger: walletLogger }); // Enable logging for the wallet +``` + ### Examples #### Mint tokens ```typescript import { CashuMint, CashuWallet, MintQuoteState } from '@cashu/cashu-ts'; -const mintUrl = 'http://localhost:3338'; // the mint URL +const mintUrl = 'http://localhost:3338'; const mint = new CashuMint(mintUrl); const wallet = new CashuWallet(mint); await wallet.loadMint(); // persist wallet.keys and wallet.keysets to avoid calling loadMint() in the future @@ -68,7 +85,7 @@ const mintQuote = await wallet.createMintQuote(64); // pay the invoice here before you continue... const mintQuoteChecked = await wallet.checkMintQuote(mintQuote.quote); if (mintQuoteChecked.state == MintQuoteState.PAID) { - const { proofs } = await wallet.mintProofs(64, mintQuote.quote); + const proofs = await wallet.mintProofs(64, mintQuote.quote); } ``` @@ -88,7 +105,7 @@ const amountToSend = meltQuote.amount + meltQuote.fee_reserve; // if no appropriate amount can be selected offline. We must include potential // ecash fees that the mint might require to melt the resulting proofsToSend later. const { keep: proofsToKeep, send: proofsToSend } = await wallet.send(amountToSend, proofs, { - includeFees: true + includeFees: true, }); // store proofsToKeep in wallet .. @@ -101,13 +118,55 @@ const meltResponse = await wallet.meltProofs(meltQuote, proofsToSend); ```typescript // we assume that `wallet` already minted `proofs`, as above const { keep, send } = await wallet.send(32, proofs); -const token = getEncodedTokenV4({ token: [{ mint: mintUrl, proofs: send }] }); +const token = getEncodedTokenV4({ mint: mintUrl, proofs: send }); console.log(token); const wallet2 = new CashuWallet(mint); // receiving wallet const receiveProofs = await wallet2.receive(token); ``` +#### Get token data + +```typescript +try { + const decodedToken = getDecodedToken(token); + console.log(decodedToken); // { mint: "https://mint.0xchat.com", unit: "sat", proofs: [...] } +} catch (_) { + console.log('Invalid token'); +} +``` + +#### BOLT12 (Reusable Offers) + +BOLT12 enables reusable Lightning offers that can be paid multiple times, unlike BOLT11 invoices which are single-use. Key differences: + +- **Reusable**: Same offer can receive multiple payments +- **Amount flexibility**: Offers can be amountless (payer chooses amount) + +```typescript +// Create reusable BOLT12 offer +const bolt12Quote = await wallet.createMintQuoteBolt12(bytesToHex(pubkey), { + amount: 1000, // Optional: omit to create an amountless offer + description: 'My reusable offer', // The mint must signal in their settings that offers with a description are supported +}); + +// Pay a BOLT12 offer +const meltQuote = await wallet.createMeltQuoteBolt12(offer, 1000000); // amount in msat +const { keep, send } = await wallet.send(meltQuote.amount + meltQuote.fee_reserve, proofs); +const { change } = await wallet.meltProofsBolt12(meltQuote, send); + +// Mint from accumulated BOLT12 payments +const updatedQuote = await wallet.checkMintQuoteBolt12(bolt12Quote.quote); +const availableAmount = updatedQuote.amount_paid - updatedQuote.amount_issued; +if (availableAmount > 0) { + const newProofs = await wallet.mintProofsBolt12( + availableAmount, + updatedQuote, + bytesToHex(privateKey), + ); +} +``` + ## Contribute Contributions are very welcome. @@ -115,28 +174,13 @@ Contributions are very welcome. If you want to contribute, please open an Issue or a PR. If you open a PR, please do so from the `development` branch as the base branch. -### Version +## Release strategy -``` -* `main` -|\ -|\ \ -| | * `hotfix` -| | -| * `staging` -| |\ -| |\ \ -| | | * `bugfix` -| | | -| | * `development` -| | |\ -| | | * `feature1` -| | | | -| | |/ -| | * -| | |\ -| | | * `feature2` -| | |/ -| |/ -|/ (create new version) -``` +Features and fixes should be implemented by branching off `development`. Hotfixes can be implemented by branching off a given `tag`. A new release can be created if at least one new feature or fix has been added to the `development` branch. If the release has breaking API changes, the major version must be incremented (X.0.0). If not, the release can increment the minor version (0.X.0). Patches and hotfixes increment the patch version (0.0.X). To create a new release, the following steps must be taken: + +1. `git checkout development && git pull` Checkout and pull latest changes from `development` +2. `npm version ` create new release commit & tag +3. `git push && git push --tags` push commit and tag +4. Create a new release on github, targeting the newly created tag +5. The CI will build and deploy to npm, with provenance +6. `git checkout main && git pull && git merge ` After creating a new version, merge the tag into `main` diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.d.ts deleted file mode 100644 index 79493603..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -import type { CheckStatePayload, CheckStateResponse, GetInfoResponse, MeltPayload, MintActiveKeys, MintAllKeysets, PostRestoreResponse, MintQuoteResponse, SerializedBlindedMessage, SwapPayload, SwapResponse, MintQuotePayload, MintPayload, MintResponse, PostRestorePayload, MeltQuotePayload, MeltQuoteResponse } from './model/types/index.js'; -import request from './request.js'; -/** - * Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet. - */ -declare class CashuMint { - private _mintUrl; - private _customRequest?; - /** - * @param _mintUrl requires mint URL to create this object - * @param _customRequest if passed, use custom request implementation for network communication with the mint - */ - constructor(_mintUrl: string, _customRequest?: typeof request); - get mintUrl(): string; - /** - * fetches mints info at the /info endpoint - * @param mintUrl - * @param customRequest - */ - static getInfo(mintUrl: string, customRequest?: typeof request): Promise; - /** - * fetches mints info at the /info endpoint - */ - getInfo(): Promise; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param mintUrl - * @param swapPayload payload containing inputs and outputs - * @param customRequest - * @returns signed outputs - */ - static swap(mintUrl: string, swapPayload: SwapPayload, customRequest?: typeof request): Promise; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param swapPayload payload containing inputs and outputs - * @returns signed outputs - */ - swap(swapPayload: SwapPayload): Promise; - /** - * Requests a new mint quote from the mint. - * @param mintUrl - * @param mintQuotePayload Payload for creating a new mint quote - * @param customRequest - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - static createMintQuote(mintUrl: string, mintQuotePayload: MintQuotePayload, customRequest?: typeof request): Promise; - /** - * Requests a new mint quote from the mint. - * @param mintQuotePayload Payload for creating a new mint quote - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - createMintQuote(mintQuotePayload: MintQuotePayload): Promise; - /** - * Gets an existing mint quote from the mint. - * @param mintUrl - * @param quote Quote ID - * @param customRequest - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - static checkMintQuote(mintUrl: string, quote: string, customRequest?: typeof request): Promise; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - checkMintQuote(quote: string): Promise; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintUrl - * @param mintPayload Payload containing the outputs to get blind signatures on - * @param customRequest - * @returns serialized blinded signatures - */ - static mint(mintUrl: string, mintPayload: MintPayload, customRequest?: typeof request): Promise; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintPayload Payload containing the outputs to get blind signatures on - * @returns serialized blinded signatures - */ - mint(mintPayload: MintPayload): Promise; - /** - * Requests a new melt quote from the mint. - * @param mintUrl - * @param MeltQuotePayload - * @returns - */ - static createMeltQuote(mintUrl: string, meltQuotePayload: MeltQuotePayload, customRequest?: typeof request): Promise; - /** - * Requests a new melt quote from the mint. - * @param MeltQuotePayload - * @returns - */ - createMeltQuote(meltQuotePayload: MeltQuotePayload): Promise; - /** - * Gets an existing melt quote. - * @param mintUrl - * @param quote Quote ID - * @returns - */ - static checkMeltQuote(mintUrl: string, quote: string, customRequest?: typeof request): Promise; - /** - * Gets an existing melt quote. - * @param quote Quote ID - * @returns - */ - checkMeltQuote(quote: string): Promise; - /** - * Requests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees. - * @param mintUrl - * @param meltPayload - * @param customRequest - * @returns - */ - static melt(mintUrl: string, meltPayload: MeltPayload, customRequest?: typeof request): Promise; - /** - * Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees - * @param meltPayload - * @returns - */ - melt(meltPayload: MeltPayload): Promise; - /** - * Checks if specific proofs have already been redeemed - * @param mintUrl - * @param checkPayload - * @param customRequest - * @returns redeemed and unredeemed ordered list of booleans - */ - static check(mintUrl: string, checkPayload: CheckStatePayload, customRequest?: typeof request): Promise; - /** - * Get the mints public keys - * @param mintUrl - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @param customRequest - * @returns - */ - static getKeys(mintUrl: string, keysetId?: string, customRequest?: typeof request): Promise; - /** - * Get the mints public keys - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @returns the mints public keys - */ - getKeys(keysetId?: string, mintUrl?: string): Promise; - /** - * Get the mints keysets in no specific order - * @param mintUrl - * @param customRequest - * @returns all the mints past and current keysets. - */ - static getKeySets(mintUrl: string, customRequest?: typeof request): Promise; - /** - * Get the mints keysets in no specific order - * @returns all the mints past and current keysets. - */ - getKeySets(): Promise; - /** - * Checks if specific proofs have already been redeemed - * @param checkPayload - * @returns redeemed and unredeemed ordered list of booleans - */ - check(checkPayload: CheckStatePayload): Promise; - static restore(mintUrl: string, restorePayload: PostRestorePayload, customRequest?: typeof request): Promise; - restore(restorePayload: { - outputs: Array; - }): Promise; -} -export { CashuMint }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.js deleted file mode 100644 index aa69d612..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuMint.js +++ /dev/null @@ -1,544 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CashuMint = void 0; -var index_js_1 = require("./model/types/index.js"); -var request_js_1 = __importDefault(require("./request.js")); -var utils_js_1 = require("./utils.js"); -var nut_05_js_1 = require("./legacy/nut-05.js"); -var nut_04_js_1 = require("./legacy/nut-04.js"); -var nut_06_js_1 = require("./legacy/nut-06.js"); -/** - * Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet. - */ -var CashuMint = /** @class */ (function () { - /** - * @param _mintUrl requires mint URL to create this object - * @param _customRequest if passed, use custom request implementation for network communication with the mint - */ - function CashuMint(_mintUrl, _customRequest) { - this._mintUrl = _mintUrl; - this._customRequest = _customRequest; - this._mintUrl = (0, utils_js_1.sanitizeUrl)(_mintUrl); - this._customRequest = _customRequest; - } - Object.defineProperty(CashuMint.prototype, "mintUrl", { - get: function () { - return this._mintUrl; - }, - enumerable: false, - configurable: true - }); - /** - * fetches mints info at the /info endpoint - * @param mintUrl - * @param customRequest - */ - CashuMint.getInfo = function (mintUrl, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/info') - })]; - case 1: - response = _a.sent(); - data = (0, nut_06_js_1.handleMintInfoContactFieldDeprecated)(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * fetches mints info at the /info endpoint - */ - CashuMint.prototype.getInfo = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.getInfo(this._mintUrl, this._customRequest)]; - }); - }); - }; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param mintUrl - * @param swapPayload payload containing inputs and outputs - * @param customRequest - * @returns signed outputs - */ - CashuMint.swap = function (mintUrl, swapPayload, customRequest) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/swap'), - method: 'POST', - requestBody: swapPayload - })]; - case 1: - data = _b.sent(); - if (!(0, utils_js_1.isObj)(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.signatures)) { - throw new Error((_a = data.detail) !== null && _a !== void 0 ? _a : 'bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param swapPayload payload containing inputs and outputs - * @returns signed outputs - */ - CashuMint.prototype.swap = function (swapPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.swap(this._mintUrl, swapPayload, this._customRequest)]; - }); - }); - }; - /** - * Requests a new mint quote from the mint. - * @param mintUrl - * @param mintQuotePayload Payload for creating a new mint quote - * @param customRequest - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - CashuMint.createMintQuote = function (mintUrl, mintQuotePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/mint/quote/bolt11'), - method: 'POST', - requestBody: mintQuotePayload - })]; - case 1: - response = _a.sent(); - data = (0, nut_04_js_1.handleMintQuoteResponseDeprecated)(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Requests a new mint quote from the mint. - * @param mintQuotePayload Payload for creating a new mint quote - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - CashuMint.prototype.createMintQuote = function (mintQuotePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.createMintQuote(this._mintUrl, mintQuotePayload, this._customRequest)]; - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param mintUrl - * @param quote Quote ID - * @param customRequest - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuMint.checkMintQuote = function (mintUrl, quote, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/mint/quote/bolt11', quote), - method: 'GET' - })]; - case 1: - response = _a.sent(); - data = (0, nut_04_js_1.handleMintQuoteResponseDeprecated)(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuMint.prototype.checkMintQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.checkMintQuote(this._mintUrl, quote, this._customRequest)]; - }); - }); - }; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintUrl - * @param mintPayload Payload containing the outputs to get blind signatures on - * @param customRequest - * @returns serialized blinded signatures - */ - CashuMint.mint = function (mintUrl, mintPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/mint/bolt11'), - method: 'POST', - requestBody: mintPayload - })]; - case 1: - data = _a.sent(); - if (!(0, utils_js_1.isObj)(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.signatures)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintPayload Payload containing the outputs to get blind signatures on - * @returns serialized blinded signatures - */ - CashuMint.prototype.mint = function (mintPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.mint(this._mintUrl, mintPayload, this._customRequest)]; - }); - }); - }; - /** - * Requests a new melt quote from the mint. - * @param mintUrl - * @param MeltQuotePayload - * @returns - */ - CashuMint.createMeltQuote = function (mintUrl, meltQuotePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/melt/quote/bolt11'), - method: 'POST', - requestBody: meltQuotePayload - })]; - case 1: - response = _a.sent(); - data = (0, nut_05_js_1.handleMeltQuoteResponseDeprecated)(response); - if (!(0, utils_js_1.isObj)(data) || - typeof (data === null || data === void 0 ? void 0 : data.amount) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.fee_reserve) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.quote) !== 'string') { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Requests a new melt quote from the mint. - * @param MeltQuotePayload - * @returns - */ - CashuMint.prototype.createMeltQuote = function (meltQuotePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.createMeltQuote(this._mintUrl, meltQuotePayload, this._customRequest)]; - }); - }); - }; - /** - * Gets an existing melt quote. - * @param mintUrl - * @param quote Quote ID - * @returns - */ - CashuMint.checkMeltQuote = function (mintUrl, quote, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/melt/quote/bolt11', quote), - method: 'GET' - })]; - case 1: - response = _a.sent(); - data = (0, nut_05_js_1.handleMeltQuoteResponseDeprecated)(response); - if (!(0, utils_js_1.isObj)(data) || - typeof (data === null || data === void 0 ? void 0 : data.amount) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.fee_reserve) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.quote) !== 'string' || - typeof (data === null || data === void 0 ? void 0 : data.state) !== 'string' || - !Object.values(index_js_1.MeltQuoteState).includes(data.state)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Gets an existing melt quote. - * @param quote Quote ID - * @returns - */ - CashuMint.prototype.checkMeltQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.checkMeltQuote(this._mintUrl, quote, this._customRequest)]; - }); - }); - }; - /** - * Requests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees. - * @param mintUrl - * @param meltPayload - * @param customRequest - * @returns - */ - CashuMint.melt = function (mintUrl, meltPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/melt/bolt11'), - method: 'POST', - requestBody: meltPayload - })]; - case 1: - response = _a.sent(); - data = (0, nut_05_js_1.handleMeltQuoteResponseDeprecated)(response); - if (!(0, utils_js_1.isObj)(data) || - typeof (data === null || data === void 0 ? void 0 : data.state) !== 'string' || - !Object.values(index_js_1.MeltQuoteState).includes(data.state)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees - * @param meltPayload - * @returns - */ - CashuMint.prototype.melt = function (meltPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.melt(this._mintUrl, meltPayload, this._customRequest)]; - }); - }); - }; - /** - * Checks if specific proofs have already been redeemed - * @param mintUrl - * @param checkPayload - * @param customRequest - * @returns redeemed and unredeemed ordered list of booleans - */ - CashuMint.check = function (mintUrl, checkPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/checkstate'), - method: 'POST', - requestBody: checkPayload - })]; - case 1: - data = _a.sent(); - if (!(0, utils_js_1.isObj)(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.states)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Get the mints public keys - * @param mintUrl - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @param customRequest - * @returns - */ - CashuMint.getKeys = function (mintUrl, keysetId, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - // backwards compatibility for base64 encoded keyset ids - if (keysetId) { - // make the keysetId url safe - keysetId = keysetId.replace(/\//g, '_').replace(/\+/g, '-'); - } - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: keysetId ? (0, utils_js_1.joinUrls)(mintUrl, '/v1/keys', keysetId) : (0, utils_js_1.joinUrls)(mintUrl, '/v1/keys') - })]; - case 1: - data = _a.sent(); - if (!(0, utils_js_1.isObj)(data) || !Array.isArray(data.keysets)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Get the mints public keys - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @returns the mints public keys - */ - CashuMint.prototype.getKeys = function (keysetId, mintUrl) { - return __awaiter(this, void 0, void 0, function () { - var allKeys; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, CashuMint.getKeys(mintUrl || this._mintUrl, keysetId, this._customRequest)]; - case 1: - allKeys = _a.sent(); - return [2 /*return*/, allKeys]; - } - }); - }); - }; - /** - * Get the mints keysets in no specific order - * @param mintUrl - * @param customRequest - * @returns all the mints past and current keysets. - */ - CashuMint.getKeySets = function (mintUrl, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance; - return __generator(this, function (_a) { - requestInstance = customRequest || request_js_1.default; - return [2 /*return*/, requestInstance({ endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/keysets') })]; - }); - }); - }; - /** - * Get the mints keysets in no specific order - * @returns all the mints past and current keysets. - */ - CashuMint.prototype.getKeySets = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.getKeySets(this._mintUrl, this._customRequest)]; - }); - }); - }; - /** - * Checks if specific proofs have already been redeemed - * @param checkPayload - * @returns redeemed and unredeemed ordered list of booleans - */ - CashuMint.prototype.check = function (checkPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.check(this._mintUrl, checkPayload, this._customRequest)]; - }); - }); - }; - CashuMint.restore = function (mintUrl, restorePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request_js_1.default; - return [4 /*yield*/, requestInstance({ - endpoint: (0, utils_js_1.joinUrls)(mintUrl, '/v1/restore'), - method: 'POST', - requestBody: restorePayload - })]; - case 1: - data = _a.sent(); - if (!(0, utils_js_1.isObj)(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.outputs) || !Array.isArray(data === null || data === void 0 ? void 0 : data.promises)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - CashuMint.prototype.restore = function (restorePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.restore(this._mintUrl, restorePayload, this._customRequest)]; - }); - }); - }; - return CashuMint; -}()); -exports.CashuMint = CashuMint; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.d.ts deleted file mode 100644 index c6db0a81..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.d.ts +++ /dev/null @@ -1,287 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { type MeltQuoteResponse, type MintKeys, type MintKeyset, type MeltProofsResponse, type Proof, type SendResponse, type Token, GetInfoResponse, OutputAmounts, ProofState } from './model/types/index.js'; -/** - * Class that represents a Cashu wallet. - * This class should act as the entry point for this library - */ -declare class CashuWallet { - private _keys; - private _keysetId; - private _keysets; - private _seed; - private _unit; - private _mintInfo; - private _denominationTarget; - mint: CashuMint; - /** - * @param mint Cashu mint instance is used to make api calls - * @param options.unit optionally set unit (default is 'sat') - * @param options.keys public keys from the mint (will be fetched from mint if not provided) - * @param options.keysets keysets from the mint (will be fetched from mint if not provided) - * @param options.mintInfo mint info from the mint (will be fetched from mint if not provided) - * @param options.denominationTarget target number proofs per denomination (default: see @constant DEFAULT_DENOMINATION_TARGET) - * @param options.bip39seed BIP39 seed for deterministic secrets. - * This can lead to poor performance, in which case the seed should be directly provided - */ - constructor(mint: CashuMint, options?: { - unit?: string; - keys?: Array | MintKeys; - keysets?: Array; - mintInfo?: GetInfoResponse; - bip39seed?: Uint8Array; - denominationTarget?: number; - }); - get unit(): string; - get keys(): Map; - get keysetId(): string; - set keysetId(keysetId: string); - get keysets(): Array; - get mintInfo(): GetInfoResponse; - /** - * Get information about the mint - * @returns mint info - */ - getMintInfo(): Promise; - /** - * Load mint information, keysets and keys. This function can be called if no keysets are passed in the constructor - */ - loadMint(): Promise; - /** - * Choose a keyset to activate based on the lowest input fee - * - * Note: this function will filter out deprecated base64 keysets - * - * @param keysets keysets to choose from - * @returns active keyset - */ - getActiveKeyset(keysets: Array): MintKeyset; - /** - * Get keysets from the mint with the unit of the wallet - * @returns keysets with wallet's unit - */ - getKeySets(): Promise>; - /** - * Get all active keys from the mint and set the keyset with the lowest fees as the active wallet keyset. - * @returns keyset - */ - getAllKeys(): Promise>; - /** - * Get public keys from the mint. If keys were already fetched, it will return those. - * - * If `keysetId` is set, it will fetch and return that specific keyset. - * Otherwise, we select an active keyset with the unit of the wallet. - * - * @param keysetId optional keysetId to get keys for - * @param forceRefresh? if set to true, it will force refresh the keyset from the mint - * @returns keyset - */ - getKeys(keysetId?: string, forceRefresh?: boolean): Promise; - /** - * Receive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array) - * @param {(string|Token)} token - Cashu token, either as string or decoded - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param token secrets if set - * @returns New token with newly created proofs, token entries that had errors - */ - receive(token: string | Token, options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - }): Promise>; - /** - * Send proofs of a given amount, by providing at least the required amount of proofs - * @param amount amount to send - * @param proofs array of proofs (accumulated amount of proofs must be >= than amount) - * @param options.outputAmounts? optionally specify the output's amounts to keep and send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the output secrets if set - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.offline? optionally send proofs offline. - * @param options.includeFees? optionally include fees in the response. - * @returns {SendResponse} - */ - send(amount: number, proofs: Array, options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - offline?: boolean; - includeFees?: boolean; - }): Promise; - selectProofsToSend(proofs: Array, amountToSend: number, includeFees?: boolean): SendResponse; - /** - * calculates the fees based on inputs (proofs) - * @param proofs input proofs to calculate fees for - * @returns fee amount - */ - getFeesForProofs(proofs: Array): number; - /** - * calculates the fees based on inputs for a given keyset - * @param nInputs number of inputs - * @param keysetId keysetId used to lookup `input_fee_ppk` - * @returns fee amount - */ - getFeesForKeyset(nInputs: number, keysetId: string): number; - /** - * Splits and creates sendable tokens - * if no amount is specified, the amount is implied by the cumulative amount of all proofs - * if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split - * @param amount amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set - * @param proofs proofs matching that amount - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.includeFees? include estimated fees for the receiver to receive the proofs - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param proofs secrets if set - * @returns promise of the change- and send-proofs - */ - swap(amount: number, proofs: Array, options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - includeFees?: boolean; - }): Promise; - /** - * Regenerates - * @param start set starting point for count (first cycle for each keyset should usually be 0) - * @param count set number of blinded messages that should be generated - * @param options.keysetId set a custom keysetId to restore from. keysetIds can be loaded with `CashuMint.getKeySets()` - * @returns proofs - */ - restore(start: number, count: number, options?: { - keysetId?: string; - }): Promise<{ - proofs: Array; - }>; - /** - * Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit. - * @param amount Amount requesting for mint. - * @param description optional description for the mint quote - * @returns the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit - */ - createMintQuote(amount: number, description?: string): Promise; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - checkMintQuote(quote: string): Promise; - /** - * Mint proofs for a given mint quote - * @param amount amount to request - * @param quote ID of mint quote - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.preference? Deprecated. Use `outputAmounts` instead. Optional preference for splitting proofs into specific amounts. - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns proofs - */ - mintProofs(amount: number, quote: string, options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - }): Promise<{ - proofs: Array; - }>; - /** - * Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice. - * @param invoice LN invoice that needs to get a fee estimate - * @returns the mint will create and return a melt quote for the invoice with an amount and fee reserve - */ - createMeltQuote(invoice: string): Promise; - /** - * Return an existing melt quote from the mint. - * @param quote ID of the melt quote - * @returns the mint will return an existing melt quote - */ - checkMeltQuote(quote: string): Promise; - /** - * Melt proofs for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. This function does not perform coin selection!. - * Returns melt quote and change proofs - * @param meltQuote ID of the melt quote - * @param proofsToSend proofs to melt - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.privkey? optionally set a private key to unlock P2PK locked secrets - * @returns - */ - meltProofs(meltQuote: MeltQuoteResponse, proofsToSend: Array, options?: { - keysetId?: string; - counter?: number; - privkey?: string; - }): Promise; - /** - * Creates a split payload - * @param amount amount to send - * @param proofsToSend proofs to split* - * @param outputAmounts? optionally specify the output's amounts to keep and to send. - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param privkey? will create a signature on the @param proofsToSend secrets if set - * @returns - */ - private createSwapPayload; - /** - * Get an array of the states of proofs from the mint (as an array of CheckStateEnum's) - * @param proofs (only the `secret` field is required) - * @returns - */ - checkProofsStates(proofs: Array): Promise>; - /** - * Creates blinded messages for a given amount - * @param amount amount to create blinded messages for - * @param split optional preference for splitting proofs into specific amounts. overrides amount param - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createRandomBlindedMessages; - /** - * Creates blinded messages for a according to @param amounts - * @param amount array of amounts to create blinded messages for - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createBlindedMessages; - /** - * Creates NUT-08 blank outputs (fee returns) for a given fee reserve - * See: https://github.com/cashubtc/nuts/blob/main/08.md - * @param amount amount to cover with blank outputs - * @param keysetId mint keysetId - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @returns blinded messages, secrets, and rs - */ - private createBlankOutputs; - /** - * construct proofs from @params promises, @params rs, @params secrets, and @params keyset - * @param promises array of serialized blinded signatures - * @param rs arrays of binding factors - * @param secrets array of secrets - * @param keyset mint keyset - * @returns array of serialized proofs - */ - private constructProofs; -} -export { CashuWallet }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.js deleted file mode 100644 index dde956eb..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/CashuWallet.js +++ /dev/null @@ -1,944 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CashuWallet = void 0; -var utils_1 = require("@noble/hashes/utils"); -var BlindedMessage_js_1 = require("./model/BlindedMessage.js"); -var utils_js_1 = require("./utils.js"); -var common_1 = require("@cashu/crypto/modules/common"); -var client_1 = require("@cashu/crypto/modules/client"); -var NUT09_1 = require("@cashu/crypto/modules/client/NUT09"); -var NUT11_1 = require("@cashu/crypto/modules/client/NUT11"); -/** - * The default number of proofs per denomination to keep in a wallet. - */ -var DEFAULT_DENOMINATION_TARGET = 3; -/** - * The default unit for the wallet, if not specified in constructor. - */ -var DEFAULT_UNIT = 'sat'; -/** - * Class that represents a Cashu wallet. - * This class should act as the entry point for this library - */ -var CashuWallet = /** @class */ (function () { - /** - * @param mint Cashu mint instance is used to make api calls - * @param options.unit optionally set unit (default is 'sat') - * @param options.keys public keys from the mint (will be fetched from mint if not provided) - * @param options.keysets keysets from the mint (will be fetched from mint if not provided) - * @param options.mintInfo mint info from the mint (will be fetched from mint if not provided) - * @param options.denominationTarget target number proofs per denomination (default: see @constant DEFAULT_DENOMINATION_TARGET) - * @param options.bip39seed BIP39 seed for deterministic secrets. - * This can lead to poor performance, in which case the seed should be directly provided - */ - function CashuWallet(mint, options) { - var _this = this; - this._keys = new Map(); - this._keysets = []; - this._seed = undefined; - this._unit = DEFAULT_UNIT; - this._mintInfo = undefined; - this._denominationTarget = DEFAULT_DENOMINATION_TARGET; - this.mint = mint; - var keys = []; - if ((options === null || options === void 0 ? void 0 : options.keys) && !Array.isArray(options.keys)) { - keys = [options.keys]; - } - else if ((options === null || options === void 0 ? void 0 : options.keys) && Array.isArray(options === null || options === void 0 ? void 0 : options.keys)) { - keys = options === null || options === void 0 ? void 0 : options.keys; - } - if (keys) - keys.forEach(function (key) { return _this._keys.set(key.id, key); }); - if (options === null || options === void 0 ? void 0 : options.unit) - this._unit = options === null || options === void 0 ? void 0 : options.unit; - if (options === null || options === void 0 ? void 0 : options.keysets) - this._keysets = options.keysets; - if (options === null || options === void 0 ? void 0 : options.denominationTarget) { - this._denominationTarget = options.denominationTarget; - } - if (options === null || options === void 0 ? void 0 : options.bip39seed) { - if (options.bip39seed instanceof Uint8Array) { - this._seed = options.bip39seed; - return; - } - throw new Error('bip39seed must be a valid UInt8Array'); - } - } - Object.defineProperty(CashuWallet.prototype, "unit", { - get: function () { - return this._unit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keys", { - get: function () { - return this._keys; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keysetId", { - get: function () { - if (!this._keysetId) { - throw new Error('No keysetId set'); - } - return this._keysetId; - }, - set: function (keysetId) { - this._keysetId = keysetId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keysets", { - get: function () { - return this._keysets; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "mintInfo", { - get: function () { - if (!this._mintInfo) { - throw new Error('Mint info not loaded'); - } - return this._mintInfo; - }, - enumerable: false, - configurable: true - }); - /** - * Get information about the mint - * @returns mint info - */ - CashuWallet.prototype.getMintInfo = function () { - return __awaiter(this, void 0, void 0, function () { - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this; - return [4 /*yield*/, this.mint.getInfo()]; - case 1: - _a._mintInfo = _b.sent(); - return [2 /*return*/, this._mintInfo]; - } - }); - }); - }; - /** - * Load mint information, keysets and keys. This function can be called if no keysets are passed in the constructor - */ - CashuWallet.prototype.loadMint = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.getMintInfo()]; - case 1: - _a.sent(); - return [4 /*yield*/, this.getKeySets()]; - case 2: - _a.sent(); - return [4 /*yield*/, this.getKeys()]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Choose a keyset to activate based on the lowest input fee - * - * Note: this function will filter out deprecated base64 keysets - * - * @param keysets keysets to choose from - * @returns active keyset - */ - CashuWallet.prototype.getActiveKeyset = function (keysets) { - var activeKeysets = keysets.filter(function (k) { return k.active; }); - // we only consider keyset IDs that start with "00" - activeKeysets = activeKeysets.filter(function (k) { return k.id.startsWith('00'); }); - var activeKeyset = activeKeysets.sort(function (a, b) { var _a, _b; return ((_a = a.input_fee_ppk) !== null && _a !== void 0 ? _a : 0) - ((_b = b.input_fee_ppk) !== null && _b !== void 0 ? _b : 0); })[0]; - if (!activeKeyset) { - throw new Error('No active keyset found'); - } - return activeKeyset; - }; - /** - * Get keysets from the mint with the unit of the wallet - * @returns keysets with wallet's unit - */ - CashuWallet.prototype.getKeySets = function () { - return __awaiter(this, void 0, void 0, function () { - var allKeysets, unitKeysets; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.getKeySets()]; - case 1: - allKeysets = _a.sent(); - unitKeysets = allKeysets.keysets.filter(function (k) { return k.unit === _this._unit; }); - this._keysets = unitKeysets; - return [2 /*return*/, this._keysets]; - } - }); - }); - }; - /** - * Get all active keys from the mint and set the keyset with the lowest fees as the active wallet keyset. - * @returns keyset - */ - CashuWallet.prototype.getAllKeys = function () { - return __awaiter(this, void 0, void 0, function () { - var keysets; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.getKeys()]; - case 1: - keysets = _a.sent(); - this._keys = new Map(keysets.keysets.map(function (k) { return [k.id, k]; })); - this.keysetId = this.getActiveKeyset(this._keysets).id; - return [2 /*return*/, keysets.keysets]; - } - }); - }); - }; - /** - * Get public keys from the mint. If keys were already fetched, it will return those. - * - * If `keysetId` is set, it will fetch and return that specific keyset. - * Otherwise, we select an active keyset with the unit of the wallet. - * - * @param keysetId optional keysetId to get keys for - * @param forceRefresh? if set to true, it will force refresh the keyset from the mint - * @returns keyset - */ - CashuWallet.prototype.getKeys = function (keysetId, forceRefresh) { - return __awaiter(this, void 0, void 0, function () { - var localKeyset, keys; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(!(this._keysets.length > 0) || forceRefresh)) return [3 /*break*/, 2]; - return [4 /*yield*/, this.getKeySets()]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - // no keyset id is chosen, let's choose one - if (!keysetId) { - localKeyset = this.getActiveKeyset(this._keysets); - keysetId = localKeyset.id; - } - if (!!this._keysets.find(function (k) { return k.id === keysetId; })) return [3 /*break*/, 4]; - return [4 /*yield*/, this.getKeySets()]; - case 3: - _a.sent(); - if (!this._keysets.find(function (k) { return k.id === keysetId; })) { - throw new Error("could not initialize keys. No keyset with id '".concat(keysetId, "' found")); - } - _a.label = 4; - case 4: - if (!!this._keys.get(keysetId)) return [3 /*break*/, 6]; - return [4 /*yield*/, this.mint.getKeys(keysetId)]; - case 5: - keys = _a.sent(); - this._keys.set(keysetId, keys.keysets[0]); - _a.label = 6; - case 6: - // set and return - this.keysetId = keysetId; - return [2 /*return*/, this._keys.get(keysetId)]; - } - }); - }); - }; - /** - * Receive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array) - * @param {(string|Token)} token - Cashu token, either as string or decoded - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param token secrets if set - * @returns New token with newly created proofs, token entries that had errors - */ - CashuWallet.prototype.receive = function (token, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, amount, _a, payload, blindingData, signatures, freshProofs; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (typeof token === 'string') { - token = (0, utils_js_1.getDecodedToken)(token); - } - return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _b.sent(); - amount = (0, utils_js_1.sumProofs)(token.proofs) - this.getFeesForProofs(token.proofs); - _a = this.createSwapPayload(amount, token.proofs, keys, options === null || options === void 0 ? void 0 : options.outputAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey, options === null || options === void 0 ? void 0 : options.privkey), payload = _a.payload, blindingData = _a.blindingData; - return [4 /*yield*/, this.mint.swap(payload)]; - case 2: - signatures = (_b.sent()).signatures; - freshProofs = this.constructProofs(signatures, blindingData.blindingFactors, blindingData.secrets, keys); - return [2 /*return*/, freshProofs]; - } - }); - }); - }; - /** - * Send proofs of a given amount, by providing at least the required amount of proofs - * @param amount amount to send - * @param proofs array of proofs (accumulated amount of proofs must be >= than amount) - * @param options.outputAmounts? optionally specify the output's amounts to keep and send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the output secrets if set - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.offline? optionally send proofs offline. - * @param options.includeFees? optionally include fees in the response. - * @returns {SendResponse} - */ - CashuWallet.prototype.send = function (amount, proofs, options) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, keepProofsOffline, sendProofOffline, expectedFee, _c, keepProofsSelect, sendProofs, _d, keep, send, keepProofs; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - if ((0, utils_js_1.sumProofs)(proofs) < amount) { - throw new Error('Not enough funds available to send'); - } - _b = this.selectProofsToSend(proofs, amount, options === null || options === void 0 ? void 0 : options.includeFees), keepProofsOffline = _b.keep, sendProofOffline = _b.send; - expectedFee = (options === null || options === void 0 ? void 0 : options.includeFees) ? this.getFeesForProofs(sendProofOffline) : 0; - if (!(!(options === null || options === void 0 ? void 0 : options.offline) && - ((0, utils_js_1.sumProofs)(sendProofOffline) != amount + expectedFee || // if the exact amount cannot be selected - (options === null || options === void 0 ? void 0 : options.outputAmounts) || - (options === null || options === void 0 ? void 0 : options.pubkey) || - (options === null || options === void 0 ? void 0 : options.privkey) || - (options === null || options === void 0 ? void 0 : options.keysetId))) // these options require a swap - ) return [3 /*break*/, 2]; // these options require a swap - _c = this.selectProofsToSend(proofs, amount, true), keepProofsSelect = _c.keep, sendProofs = _c.send; - (_a = options === null || options === void 0 ? void 0 : options.proofsWeHave) === null || _a === void 0 ? void 0 : _a.push.apply(_a, keepProofsSelect); - return [4 /*yield*/, this.swap(amount, sendProofs, options)]; - case 1: - _d = _e.sent(), keep = _d.keep, send = _d.send; - keepProofs = keepProofsSelect.concat(keep); - return [2 /*return*/, { keep: keepProofs, send: send }]; - case 2: - if ((0, utils_js_1.sumProofs)(sendProofOffline) < amount + expectedFee) { - throw new Error('Not enough funds available to send'); - } - return [2 /*return*/, { keep: keepProofsOffline, send: sendProofOffline }]; - } - }); - }); - }; - CashuWallet.prototype.selectProofsToSend = function (proofs, amountToSend, includeFees) { - var sortedProofs = proofs.sort(function (a, b) { return a.amount - b.amount; }); - var smallerProofs = sortedProofs - .filter(function (p) { return p.amount <= amountToSend; }) - .sort(function (a, b) { return b.amount - a.amount; }); - var biggerProofs = sortedProofs - .filter(function (p) { return p.amount > amountToSend; }) - .sort(function (a, b) { return a.amount - b.amount; }); - var nextBigger = biggerProofs[0]; - if (!smallerProofs.length && nextBigger) { - return { - keep: proofs.filter(function (p) { return p.secret !== nextBigger.secret; }), - send: [nextBigger] - }; - } - if (!smallerProofs.length && !nextBigger) { - return { keep: proofs, send: [] }; - } - var remainder = amountToSend; - var selectedProofs = [smallerProofs[0]]; - var returnedProofs = []; - var feePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - remainder -= selectedProofs[0].amount - feePPK / 1000; - if (remainder > 0) { - var _a = this.selectProofsToSend(smallerProofs.slice(1), remainder, includeFees), keep = _a.keep, send = _a.send; - selectedProofs.push.apply(selectedProofs, send); - returnedProofs.push.apply(returnedProofs, keep); - } - var selectedFeePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - if ((0, utils_js_1.sumProofs)(selectedProofs) < amountToSend + selectedFeePPK && nextBigger) { - selectedProofs = [nextBigger]; - } - return { - keep: proofs.filter(function (p) { return !selectedProofs.includes(p); }), - send: selectedProofs - }; - }; - /** - * calculates the fees based on inputs (proofs) - * @param proofs input proofs to calculate fees for - * @returns fee amount - */ - CashuWallet.prototype.getFeesForProofs = function (proofs) { - var _this = this; - if (!this._keysets.length) { - throw new Error('Could not calculate fees. No keysets found'); - } - var keysetIds = new Set(proofs.map(function (p) { return p.id; })); - keysetIds.forEach(function (id) { - if (!_this._keysets.find(function (k) { return k.id === id; })) { - throw new Error("Could not calculate fees. No keyset found with id: ".concat(id)); - } - }); - var fees = Math.floor(Math.max((proofs.reduce(function (total, curr) { var _a; return total + (((_a = _this._keysets.find(function (k) { return k.id === curr.id; })) === null || _a === void 0 ? void 0 : _a.input_fee_ppk) || 0); }, 0) + - 999) / - 1000, 0)); - return fees; - }; - /** - * calculates the fees based on inputs for a given keyset - * @param nInputs number of inputs - * @param keysetId keysetId used to lookup `input_fee_ppk` - * @returns fee amount - */ - CashuWallet.prototype.getFeesForKeyset = function (nInputs, keysetId) { - var _a; - var fees = Math.floor(Math.max((nInputs * (((_a = this._keysets.find(function (k) { return k.id === keysetId; })) === null || _a === void 0 ? void 0 : _a.input_fee_ppk) || 0) + - 999) / - 1000, 0)); - return fees; - }; - /** - * Splits and creates sendable tokens - * if no amount is specified, the amount is implied by the cumulative amount of all proofs - * if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split - * @param amount amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set - * @param proofs proofs matching that amount - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.includeFees? include estimated fees for the receiver to receive the proofs - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param proofs secrets if set - * @returns promise of the change- and send-proofs - */ - CashuWallet.prototype.swap = function (amount, proofs, options) { - var _a, _b, _c; - return __awaiter(this, void 0, void 0, function () { - var keyset, proofsToSend, amountToSend, amountAvailable, amountToKeep, sendAmounts, outputFee, sendAmountsFee, keepAmounts, _d, payload, blindingData, signatures, swapProofs, splitProofsToKeep, splitProofsToSend, amountToKeepCounter; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - if (!options) - options = {}; - return [4 /*yield*/, this.getKeys(options.keysetId)]; - case 1: - keyset = _e.sent(); - proofsToSend = proofs; - amountToSend = amount; - amountAvailable = (0, utils_js_1.sumProofs)(proofs); - amountToKeep = amountAvailable - amountToSend - this.getFeesForProofs(proofsToSend); - sendAmounts = ((_a = options === null || options === void 0 ? void 0 : options.outputAmounts) === null || _a === void 0 ? void 0 : _a.sendAmounts) || (0, utils_js_1.splitAmount)(amountToSend, keyset.keys); - // include the fees to spend the the outputs of the swap - if (options === null || options === void 0 ? void 0 : options.includeFees) { - outputFee = this.getFeesForKeyset(sendAmounts.length, keyset.id); - sendAmountsFee = (0, utils_js_1.splitAmount)(outputFee, keyset.keys); - while (this.getFeesForKeyset(sendAmounts.concat(sendAmountsFee).length, keyset.id) > outputFee) { - outputFee++; - sendAmountsFee = (0, utils_js_1.splitAmount)(outputFee, keyset.keys); - } - sendAmounts = sendAmounts.concat(sendAmountsFee); - amountToSend += outputFee; - amountToKeep -= outputFee; - } - if (options && !((_b = options.outputAmounts) === null || _b === void 0 ? void 0 : _b.keepAmounts) && options.proofsWeHave) { - keepAmounts = (0, utils_js_1.getKeepAmounts)(options.proofsWeHave, amountToKeep, keyset.keys, this._denominationTarget); - } - else if (options.outputAmounts) { - if (((_c = options.outputAmounts.keepAmounts) === null || _c === void 0 ? void 0 : _c.reduce(function (a, b) { return a + b; }, 0)) != - amountToKeep) { - throw new Error('Keep amounts do not match amount to keep'); - } - keepAmounts = options.outputAmounts.keepAmounts; - } - if (amountToSend + this.getFeesForProofs(proofsToSend) > amountAvailable) { - console.error("Not enough funds available (".concat(amountAvailable, ") for swap amountToSend: ").concat(amountToSend, " + fee: ").concat(this.getFeesForProofs(proofsToSend), " | length: ").concat(proofsToSend.length)); - throw new Error("Not enough funds available for swap"); - } - if (amountToSend + this.getFeesForProofs(proofsToSend) + amountToKeep != amountAvailable) { - throw new Error('Amounts do not match for swap'); - } - options.outputAmounts = { - keepAmounts: keepAmounts, - sendAmounts: sendAmounts - }; - _d = this.createSwapPayload(amountToSend, proofsToSend, keyset, options === null || options === void 0 ? void 0 : options.outputAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey, options === null || options === void 0 ? void 0 : options.privkey), payload = _d.payload, blindingData = _d.blindingData; - return [4 /*yield*/, this.mint.swap(payload)]; - case 2: - signatures = (_e.sent()).signatures; - swapProofs = this.constructProofs(signatures, blindingData.blindingFactors, blindingData.secrets, keyset); - splitProofsToKeep = []; - splitProofsToSend = []; - amountToKeepCounter = 0; - swapProofs.forEach(function (proof) { - if (amountToKeepCounter < amountToKeep) { - amountToKeepCounter += proof.amount; - splitProofsToKeep.push(proof); - return; - } - splitProofsToSend.push(proof); - }); - return [2 /*return*/, { - keep: splitProofsToKeep, - send: splitProofsToSend - }]; - } - }); - }); - }; - /** - * Regenerates - * @param start set starting point for count (first cycle for each keyset should usually be 0) - * @param count set number of blinded messages that should be generated - * @param options.keysetId set a custom keysetId to restore from. keysetIds can be loaded with `CashuMint.getKeySets()` - * @returns proofs - */ - CashuWallet.prototype.restore = function (start, count, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, amounts, _a, blindedMessages, blindingFactors, secrets, _b, outputs, promises, validBlindingFactors, validSecrets; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _c.sent(); - if (!this._seed) { - throw new Error('CashuWallet must be initialized with a seed to use restore'); - } - amounts = Array(count).fill(0); - _a = this.createBlindedMessages(amounts, keys.id, start), blindedMessages = _a.blindedMessages, blindingFactors = _a.blindingFactors, secrets = _a.secrets; - return [4 /*yield*/, this.mint.restore({ outputs: blindedMessages })]; - case 2: - _b = _c.sent(), outputs = _b.outputs, promises = _b.promises; - validBlindingFactors = blindingFactors.filter(function (_, i) { - return outputs.map(function (o) { return o.B_; }).includes(blindedMessages[i].B_); - }); - validSecrets = secrets.filter(function (_, i) { - return outputs.map(function (o) { return o.B_; }).includes(blindedMessages[i].B_); - }); - return [2 /*return*/, { - proofs: this.constructProofs(promises, validBlindingFactors, validSecrets, keys) - }]; - } - }); - }); - }; - /** - * Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit. - * @param amount Amount requesting for mint. - * @param description optional description for the mint quote - * @returns the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit - */ - CashuWallet.prototype.createMintQuote = function (amount, description) { - return __awaiter(this, void 0, void 0, function () { - var mintQuotePayload; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - mintQuotePayload = { - unit: this._unit, - amount: amount, - description: description - }; - return [4 /*yield*/, this.mint.createMintQuote(mintQuotePayload)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuWallet.prototype.checkMintQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.checkMintQuote(quote)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * Mint proofs for a given mint quote - * @param amount amount to request - * @param quote ID of mint quote - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.preference? Deprecated. Use `outputAmounts` instead. Optional preference for splitting proofs into specific amounts. - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns proofs - */ - CashuWallet.prototype.mintProofs = function (amount, quote, options) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var keyset, _b, blindedMessages, secrets, blindingFactors, mintPayload, signatures; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keyset = _c.sent(); - if (!(options === null || options === void 0 ? void 0 : options.outputAmounts) && (options === null || options === void 0 ? void 0 : options.proofsWeHave)) { - options.outputAmounts = { - keepAmounts: (0, utils_js_1.getKeepAmounts)(options.proofsWeHave, amount, keyset.keys, this._denominationTarget), - sendAmounts: [] - }; - } - _b = this.createRandomBlindedMessages(amount, keyset, (_a = options === null || options === void 0 ? void 0 : options.outputAmounts) === null || _a === void 0 ? void 0 : _a.keepAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey), blindedMessages = _b.blindedMessages, secrets = _b.secrets, blindingFactors = _b.blindingFactors; - mintPayload = { - outputs: blindedMessages, - quote: quote - }; - return [4 /*yield*/, this.mint.mint(mintPayload)]; - case 2: - signatures = (_c.sent()).signatures; - return [2 /*return*/, { - proofs: this.constructProofs(signatures, blindingFactors, secrets, keyset) - }]; - } - }); - }); - }; - /** - * Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice. - * @param invoice LN invoice that needs to get a fee estimate - * @returns the mint will create and return a melt quote for the invoice with an amount and fee reserve - */ - CashuWallet.prototype.createMeltQuote = function (invoice) { - return __awaiter(this, void 0, void 0, function () { - var meltQuotePayload, meltQuote; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - meltQuotePayload = { - unit: this._unit, - request: invoice - }; - return [4 /*yield*/, this.mint.createMeltQuote(meltQuotePayload)]; - case 1: - meltQuote = _a.sent(); - return [2 /*return*/, meltQuote]; - } - }); - }); - }; - /** - * Return an existing melt quote from the mint. - * @param quote ID of the melt quote - * @returns the mint will return an existing melt quote - */ - CashuWallet.prototype.checkMeltQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - var meltQuote; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.checkMeltQuote(quote)]; - case 1: - meltQuote = _a.sent(); - return [2 /*return*/, meltQuote]; - } - }); - }); - }; - /** - * Melt proofs for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. This function does not perform coin selection!. - * Returns melt quote and change proofs - * @param meltQuote ID of the melt quote - * @param proofsToSend proofs to melt - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.privkey? optionally set a private key to unlock P2PK locked secrets - * @returns - */ - CashuWallet.prototype.meltProofs = function (meltQuote, proofsToSend, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, _a, blindedMessages, secrets, blindingFactors, meltPayload, meltResponse, change; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _b.sent(); - _a = this.createBlankOutputs((0, utils_js_1.sumProofs)(proofsToSend) - meltQuote.amount, keys.id, options === null || options === void 0 ? void 0 : options.counter), blindedMessages = _a.blindedMessages, secrets = _a.secrets, blindingFactors = _a.blindingFactors; - if ((options === null || options === void 0 ? void 0 : options.privkey) != undefined) { - proofsToSend = (0, NUT11_1.getSignedProofs)(proofsToSend.map(function (p) { - return { - amount: p.amount, - C: (0, common_1.pointFromHex)(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), options.privkey).map(function (p) { return (0, client_1.serializeProof)(p); }); - } - meltPayload = { - quote: meltQuote.quote, - inputs: proofsToSend, - outputs: __spreadArray([], blindedMessages, true) - }; - return [4 /*yield*/, this.mint.melt(meltPayload)]; - case 2: - meltResponse = _b.sent(); - change = []; - if (meltResponse.change) { - change = this.constructProofs(meltResponse.change, blindingFactors, secrets, keys); - } - return [2 /*return*/, { - quote: meltResponse, - change: change - }]; - } - }); - }); - }; - /** - * Creates a split payload - * @param amount amount to send - * @param proofsToSend proofs to split* - * @param outputAmounts? optionally specify the output's amounts to keep and to send. - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param privkey? will create a signature on the @param proofsToSend secrets if set - * @returns - */ - CashuWallet.prototype.createSwapPayload = function (amount, proofsToSend, keyset, outputAmounts, counter, pubkey, privkey) { - var totalAmount = proofsToSend.reduce(function (total, curr) { return total + curr.amount; }, 0); - if (outputAmounts && outputAmounts.sendAmounts && !outputAmounts.keepAmounts) { - outputAmounts.keepAmounts = (0, utils_js_1.splitAmount)(totalAmount - amount - this.getFeesForProofs(proofsToSend), keyset.keys); - } - var keepBlindedMessages = this.createRandomBlindedMessages(totalAmount - amount - this.getFeesForProofs(proofsToSend), keyset, outputAmounts === null || outputAmounts === void 0 ? void 0 : outputAmounts.keepAmounts, counter); - if (this._seed && counter) { - counter = counter + keepBlindedMessages.secrets.length; - } - var sendBlindedMessages = this.createRandomBlindedMessages(amount, keyset, outputAmounts === null || outputAmounts === void 0 ? void 0 : outputAmounts.sendAmounts, counter, pubkey); - if (privkey) { - proofsToSend = (0, NUT11_1.getSignedProofs)(proofsToSend.map(function (p) { - return { - amount: p.amount, - C: (0, common_1.pointFromHex)(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), privkey).map(function (p) { return (0, client_1.serializeProof)(p); }); - } - // join keepBlindedMessages and sendBlindedMessages - var blindingData = { - blindedMessages: __spreadArray(__spreadArray([], keepBlindedMessages.blindedMessages, true), sendBlindedMessages.blindedMessages, true), - secrets: __spreadArray(__spreadArray([], keepBlindedMessages.secrets, true), sendBlindedMessages.secrets, true), - blindingFactors: __spreadArray(__spreadArray([], keepBlindedMessages.blindingFactors, true), sendBlindedMessages.blindingFactors, true) - }; - var payload = { - inputs: proofsToSend, - outputs: __spreadArray([], blindingData.blindedMessages, true) - }; - return { payload: payload, blindingData: blindingData }; - }; - /** - * Get an array of the states of proofs from the mint (as an array of CheckStateEnum's) - * @param proofs (only the `secret` field is required) - * @returns - */ - CashuWallet.prototype.checkProofsStates = function (proofs) { - return __awaiter(this, void 0, void 0, function () { - var enc, Ys, BATCH_SIZE, states, _loop_1, this_1, i; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - enc = new TextEncoder(); - Ys = proofs.map(function (p) { return (0, common_1.hashToCurve)(enc.encode(p.secret)).toHex(true); }); - BATCH_SIZE = 100; - states = []; - _loop_1 = function (i) { - var YsSlice, batchStates, stateMap, j, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - YsSlice = Ys.slice(i, i + BATCH_SIZE); - return [4 /*yield*/, this_1.mint.check({ - Ys: YsSlice - })]; - case 1: - batchStates = (_b.sent()).states; - stateMap = {}; - batchStates.forEach(function (s) { - stateMap[s.Y] = s; - }); - for (j = 0; j < YsSlice.length; j++) { - state = stateMap[YsSlice[j]]; - if (!state) { - throw new Error('Could not find state for proof with Y: ' + YsSlice[j]); - } - states.push(state); - } - return [2 /*return*/]; - } - }); - }; - this_1 = this; - i = 0; - _a.label = 1; - case 1: - if (!(i < Ys.length)) return [3 /*break*/, 4]; - return [5 /*yield**/, _loop_1(i)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - i += BATCH_SIZE; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/, states]; - } - }); - }); - }; - /** - * Creates blinded messages for a given amount - * @param amount amount to create blinded messages for - * @param split optional preference for splitting proofs into specific amounts. overrides amount param - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - CashuWallet.prototype.createRandomBlindedMessages = function (amount, keyset, split, counter, pubkey) { - var amounts = (0, utils_js_1.splitAmount)(amount, keyset.keys, split); - return this.createBlindedMessages(amounts, keyset.id, counter, pubkey); - }; - /** - * Creates blinded messages for a according to @param amounts - * @param amount array of amounts to create blinded messages for - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - CashuWallet.prototype.createBlindedMessages = function (amounts, keysetId, counter, pubkey) { - // if we atempt to create deterministic messages without a _seed, abort. - if (counter != undefined && !this._seed) { - throw new Error('Cannot create deterministic messages without seed. Instantiate CashuWallet with a bip39seed, or omit counter param.'); - } - var blindedMessages = []; - var secrets = []; - var blindingFactors = []; - for (var i = 0; i < amounts.length; i++) { - var deterministicR = undefined; - var secretBytes = undefined; - if (pubkey) { - secretBytes = (0, NUT11_1.createP2PKsecret)(pubkey); - } - else if (this._seed && counter != undefined) { - secretBytes = (0, NUT09_1.deriveSecret)(this._seed, keysetId, counter + i); - deterministicR = (0, utils_js_1.bytesToNumber)((0, NUT09_1.deriveBlindingFactor)(this._seed, keysetId, counter + i)); - } - else { - secretBytes = (0, utils_1.randomBytes)(32); - } - if (!pubkey) { - var secretHex = (0, utils_1.bytesToHex)(secretBytes); - secretBytes = new TextEncoder().encode(secretHex); - } - secrets.push(secretBytes); - var _a = (0, client_1.blindMessage)(secretBytes, deterministicR), B_ = _a.B_, r = _a.r; - blindingFactors.push(r); - var blindedMessage = new BlindedMessage_js_1.BlindedMessage(amounts[i], B_, keysetId); - blindedMessages.push(blindedMessage.getSerializedBlindedMessage()); - } - return { blindedMessages: blindedMessages, secrets: secrets, blindingFactors: blindingFactors, amounts: amounts }; - }; - /** - * Creates NUT-08 blank outputs (fee returns) for a given fee reserve - * See: https://github.com/cashubtc/nuts/blob/main/08.md - * @param amount amount to cover with blank outputs - * @param keysetId mint keysetId - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @returns blinded messages, secrets, and rs - */ - CashuWallet.prototype.createBlankOutputs = function (amount, keysetId, counter) { - var count = Math.ceil(Math.log2(amount)) || 1; - //Prevent count from being -Infinity - if (count < 0) { - count = 0; - } - var amounts = count ? Array(count).fill(1) : []; - var _a = this.createBlindedMessages(amounts, keysetId, counter), blindedMessages = _a.blindedMessages, blindingFactors = _a.blindingFactors, secrets = _a.secrets; - return { blindedMessages: blindedMessages, secrets: secrets, blindingFactors: blindingFactors }; - }; - /** - * construct proofs from @params promises, @params rs, @params secrets, and @params keyset - * @param promises array of serialized blinded signatures - * @param rs arrays of binding factors - * @param secrets array of secrets - * @param keyset mint keyset - * @returns array of serialized proofs - */ - CashuWallet.prototype.constructProofs = function (promises, rs, secrets, keyset) { - return promises - .map(function (p, i) { - var blindSignature = { id: p.id, amount: p.amount, C_: (0, common_1.pointFromHex)(p.C_) }; - var r = rs[i]; - var secret = secrets[i]; - var A = (0, common_1.pointFromHex)(keyset.keys[p.amount]); - return (0, client_1.constructProofFromPromise)(blindSignature, r, secret, A); - }) - .map(function (p) { return (0, client_1.serializeProof)(p); }); - }; - return CashuWallet; -}()); -exports.CashuWallet = CashuWallet; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.d.ts deleted file mode 100644 index a388775f..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare function encodeUint8toBase64(uint8array: Uint8Array): string; -declare function encodeUint8toBase64Url(bytes: Uint8Array): string; -declare function encodeBase64toUint8(base64String: string): Uint8Array; -declare function encodeJsonToBase64(jsonObj: unknown): string; -declare function encodeBase64ToJson(base64String: string): T; -export { encodeUint8toBase64, encodeUint8toBase64Url, encodeBase64toUint8, encodeJsonToBase64, encodeBase64ToJson }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.js deleted file mode 100644 index aa7dea9b..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/base64.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeBase64ToJson = exports.encodeJsonToBase64 = exports.encodeBase64toUint8 = exports.encodeUint8toBase64Url = exports.encodeUint8toBase64 = void 0; -var buffer_1 = require("buffer"); -function encodeUint8toBase64(uint8array) { - return buffer_1.Buffer.from(uint8array).toString('base64'); -} -exports.encodeUint8toBase64 = encodeUint8toBase64; -function encodeUint8toBase64Url(bytes) { - return buffer_1.Buffer.from(bytes) - .toString('base64') - .replace(/\+/g, '-') // Replace + with - - .replace(/\//g, '_') // Replace / with _ - .replace(/=+$/, ''); // Remove padding characters -} -exports.encodeUint8toBase64Url = encodeUint8toBase64Url; -function encodeBase64toUint8(base64String) { - return buffer_1.Buffer.from(base64String, 'base64'); -} -exports.encodeBase64toUint8 = encodeBase64toUint8; -function encodeJsonToBase64(jsonObj) { - var jsonString = JSON.stringify(jsonObj); - return base64urlFromBase64(buffer_1.Buffer.from(jsonString).toString('base64')); -} -exports.encodeJsonToBase64 = encodeJsonToBase64; -function encodeBase64ToJson(base64String) { - var jsonString = buffer_1.Buffer.from(base64urlToBase64(base64String), 'base64').toString(); - var jsonObj = JSON.parse(jsonString); - return jsonObj; -} -exports.encodeBase64ToJson = encodeBase64ToJson; -function base64urlToBase64(str) { - return str.replace(/-/g, '+').replace(/_/g, '/').split('=')[0]; - // .replace(/./g, '='); -} -function base64urlFromBase64(str) { - return str.replace(/\+/g, '-').replace(/\//g, '_').split('=')[0]; - // .replace(/=/g, '.'); -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.d.ts deleted file mode 100644 index 9e3afc13..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -type SimpleValue = boolean | null | undefined; -export type ResultObject = { - [key: string]: ResultValue; -}; -export type ResultValue = SimpleValue | number | string | Uint8Array | Array | ResultObject; -export type ValidDecodedType = Extract; -export declare function encodeCBOR(value: any): Uint8Array; -export declare function decodeCBOR(data: Uint8Array): ResultValue; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.js deleted file mode 100644 index 015b3cc8..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/cbor.js +++ /dev/null @@ -1,282 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeCBOR = exports.encodeCBOR = void 0; -function isResultKeyType(value) { - return typeof value === 'number' || typeof value === 'string'; -} -function encodeCBOR(value) { - var buffer = []; - encodeItem(value, buffer); - return new Uint8Array(buffer); -} -exports.encodeCBOR = encodeCBOR; -function encodeItem(value, buffer) { - if (value === null) { - buffer.push(0xf6); - } - else if (value === undefined) { - buffer.push(0xf7); - } - else if (typeof value === 'boolean') { - buffer.push(value ? 0xf5 : 0xf4); - } - else if (typeof value === 'number') { - encodeUnsigned(value, buffer); - } - else if (typeof value === 'string') { - encodeString(value, buffer); - } - else if (Array.isArray(value)) { - encodeArray(value, buffer); - } - else if (value instanceof Uint8Array) { - encodeByteString(value, buffer); - } - else if (typeof value === 'object') { - encodeObject(value, buffer); - } - else { - throw new Error('Unsupported type'); - } -} -function encodeUnsigned(value, buffer) { - if (value < 24) { - buffer.push(value); - } - else if (value < 256) { - buffer.push(0x18, value); - } - else if (value < 65536) { - buffer.push(0x19, value >> 8, value & 0xff); - } - else if (value < 4294967296) { - buffer.push(0x1a, value >> 24, (value >> 16) & 0xff, (value >> 8) & 0xff, value & 0xff); - } - else { - throw new Error('Unsupported integer size'); - } -} -function encodeByteString(value, buffer) { - var length = value.length; - if (length < 24) { - buffer.push(0x40 + length); - } - else if (length < 256) { - buffer.push(0x58, length); - } - else if (length < 65536) { - buffer.push(0x59, (length >> 8) & 0xff, length & 0xff); - } - else if (length < 4294967296) { - buffer.push(0x5a, (length >> 24) & 0xff, (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff); - } - else { - throw new Error('Byte string too long to encode'); - } - for (var i = 0; i < value.length; i++) { - buffer.push(value[i]); - } -} -function encodeString(value, buffer) { - var utf8 = new TextEncoder().encode(value); - var length = utf8.length; - if (length < 24) { - buffer.push(0x60 + length); - } - else if (length < 256) { - buffer.push(0x78, length); - } - else if (length < 65536) { - buffer.push(0x79, (length >> 8) & 0xff, length & 0xff); - } - else if (length < 4294967296) { - buffer.push(0x7a, (length >> 24) & 0xff, (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff); - } - else { - throw new Error('String too long to encode'); - } - for (var i = 0; i < utf8.length; i++) { - buffer.push(utf8[i]); - } -} -function encodeArray(value, buffer) { - var length = value.length; - if (length < 24) { - buffer.push(0x80 | length); - } - else if (length < 256) { - buffer.push(0x98, length); - } - else if (length < 65536) { - buffer.push(0x99, length >> 8, length & 0xff); - } - else { - throw new Error('Unsupported array length'); - } - for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { - var item = value_1[_i]; - encodeItem(item, buffer); - } -} -function encodeObject(value, buffer) { - var keys = Object.keys(value); - encodeUnsigned(keys.length, buffer); - buffer[buffer.length - 1] |= 0xa0; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - encodeString(key, buffer); - encodeItem(value[key], buffer); - } -} -function decodeCBOR(data) { - var view = new DataView(data.buffer, data.byteOffset, data.byteLength); - var result = decodeItem(view, 0); - return result.value; -} -exports.decodeCBOR = decodeCBOR; -function decodeItem(view, offset) { - if (offset >= view.byteLength) { - throw new Error('Unexpected end of data'); - } - var initialByte = view.getUint8(offset++); - var majorType = initialByte >> 5; - var additionalInfo = initialByte & 0x1f; - switch (majorType) { - case 0: - return decodeUnsigned(view, offset, additionalInfo); - case 1: - return decodeSigned(view, offset, additionalInfo); - case 2: - return decodeByteString(view, offset, additionalInfo); - case 3: - return decodeString(view, offset, additionalInfo); - case 4: - return decodeArray(view, offset, additionalInfo); - case 5: - return decodeMap(view, offset, additionalInfo); - case 7: - return decodeSimpleAndFloat(view, offset, additionalInfo); - default: - throw new Error("Unsupported major type: ".concat(majorType)); - } -} -function decodeLength(view, offset, additionalInfo) { - if (additionalInfo < 24) - return { value: additionalInfo, offset: offset }; - if (additionalInfo === 24) - return { value: view.getUint8(offset++), offset: offset }; - if (additionalInfo === 25) { - var value = view.getUint16(offset, false); - offset += 2; - return { value: value, offset: offset }; - } - if (additionalInfo === 26) { - var value = view.getUint32(offset, false); - offset += 4; - return { value: value, offset: offset }; - } - if (additionalInfo === 27) { - var hi = view.getUint32(offset, false); - var lo = view.getUint32(offset + 4, false); - offset += 8; - return { value: hi * Math.pow(2, 32) + lo, offset: offset }; - } - throw new Error("Unsupported length: ".concat(additionalInfo)); -} -function decodeUnsigned(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), value = _a.value, newOffset = _a.offset; - return { value: value, offset: newOffset }; -} -function decodeSigned(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), value = _a.value, newOffset = _a.offset; - return { value: -1 - value, offset: newOffset }; -} -function decodeByteString(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - if (newOffset + length > view.byteLength) { - throw new Error('Byte string length exceeds data length'); - } - var value = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - return { value: value, offset: newOffset + length }; -} -function decodeString(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - if (newOffset + length > view.byteLength) { - throw new Error('String length exceeds data length'); - } - var bytes = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - var value = new TextDecoder().decode(bytes); - return { value: value, offset: newOffset + length }; -} -function decodeArray(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - var array = []; - var currentOffset = newOffset; - for (var i = 0; i < length; i++) { - var result = decodeItem(view, currentOffset); - array.push(result.value); - currentOffset = result.offset; - } - return { value: array, offset: currentOffset }; -} -function decodeMap(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - var map = {}; - var currentOffset = newOffset; - for (var i = 0; i < length; i++) { - var keyResult = decodeItem(view, currentOffset); - if (!isResultKeyType(keyResult.value)) { - throw new Error('Invalid key type'); - } - var valueResult = decodeItem(view, keyResult.offset); - map[keyResult.value] = valueResult.value; - currentOffset = valueResult.offset; - } - return { value: map, offset: currentOffset }; -} -function decodeFloat16(uint16) { - var exponent = (uint16 & 0x7c00) >> 10; - var fraction = uint16 & 0x03ff; - var sign = uint16 & 0x8000 ? -1 : 1; - if (exponent === 0) { - return sign * Math.pow(2, -14) * (fraction / 1024); - } - else if (exponent === 0x1f) { - return fraction ? NaN : sign * Infinity; - } - return sign * Math.pow(2, (exponent - 15)) * (1 + fraction / 1024); -} -function decodeSimpleAndFloat(view, offset, additionalInfo) { - if (additionalInfo < 24) { - switch (additionalInfo) { - case 20: - return { value: false, offset: offset }; - case 21: - return { value: true, offset: offset }; - case 22: - return { value: null, offset: offset }; - case 23: - return { value: undefined, offset: offset }; - default: - throw new Error("Unknown simple value: ".concat(additionalInfo)); - } - } - if (additionalInfo === 24) - return { value: view.getUint8(offset++), offset: offset }; - if (additionalInfo === 25) { - var value = decodeFloat16(view.getUint16(offset, false)); - offset += 2; - return { value: value, offset: offset }; - } - if (additionalInfo === 26) { - var value = view.getFloat32(offset, false); - offset += 4; - return { value: value, offset: offset }; - } - if (additionalInfo === 27) { - var value = view.getFloat64(offset, false); - offset += 8; - return { value: value, offset: offset }; - } - throw new Error("Unknown simple or float value: ".concat(additionalInfo)); -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/index.d.ts deleted file mode 100644 index c88368b4..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { CashuWallet } from './CashuWallet.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -import { setGlobalRequestOptions } from './request.js'; -import { getEncodedToken, getEncodedTokenV4, getDecodedToken, deriveKeysetId, decodePaymentRequest } from './utils.js'; -export * from './model/types/index.js'; -export { CashuMint, CashuWallet, PaymentRequest, getDecodedToken, getEncodedToken, getEncodedTokenV4, decodePaymentRequest, deriveKeysetId, setGlobalRequestOptions }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/index.js deleted file mode 100644 index ffab8f4d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setGlobalRequestOptions = exports.deriveKeysetId = exports.decodePaymentRequest = exports.getEncodedTokenV4 = exports.getEncodedToken = exports.getDecodedToken = exports.PaymentRequest = exports.CashuWallet = exports.CashuMint = void 0; -var CashuMint_js_1 = require("./CashuMint.js"); -Object.defineProperty(exports, "CashuMint", { enumerable: true, get: function () { return CashuMint_js_1.CashuMint; } }); -var CashuWallet_js_1 = require("./CashuWallet.js"); -Object.defineProperty(exports, "CashuWallet", { enumerable: true, get: function () { return CashuWallet_js_1.CashuWallet; } }); -var PaymentRequest_js_1 = require("./model/PaymentRequest.js"); -Object.defineProperty(exports, "PaymentRequest", { enumerable: true, get: function () { return PaymentRequest_js_1.PaymentRequest; } }); -var request_js_1 = require("./request.js"); -Object.defineProperty(exports, "setGlobalRequestOptions", { enumerable: true, get: function () { return request_js_1.setGlobalRequestOptions; } }); -var utils_js_1 = require("./utils.js"); -Object.defineProperty(exports, "getEncodedToken", { enumerable: true, get: function () { return utils_js_1.getEncodedToken; } }); -Object.defineProperty(exports, "getEncodedTokenV4", { enumerable: true, get: function () { return utils_js_1.getEncodedTokenV4; } }); -Object.defineProperty(exports, "getDecodedToken", { enumerable: true, get: function () { return utils_js_1.getDecodedToken; } }); -Object.defineProperty(exports, "deriveKeysetId", { enumerable: true, get: function () { return utils_js_1.deriveKeysetId; } }); -Object.defineProperty(exports, "decodePaymentRequest", { enumerable: true, get: function () { return utils_js_1.decodePaymentRequest; } }); -__exportStar(require("./model/types/index.js"), exports); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.d.ts deleted file mode 100644 index 20d37f90..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { MintQuoteResponse } from '../model/types/index.js'; -export type MintQuoteResponsePaidDeprecated = { - paid?: boolean; -}; -export declare function handleMintQuoteResponseDeprecated(response: MintQuoteResponse & MintQuoteResponsePaidDeprecated): MintQuoteResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.js deleted file mode 100644 index ff63ae50..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-04.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handleMintQuoteResponseDeprecated = void 0; -var index_js_1 = require("../model/types/index.js"); -function handleMintQuoteResponseDeprecated(response) { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn("Field 'state' not found in MintQuoteResponse. Update NUT-04 of mint: https://github.com/cashubtc/nuts/pull/141)"); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? index_js_1.MintQuoteState.PAID : index_js_1.MintQuoteState.UNPAID; - } - } - return response; -} -exports.handleMintQuoteResponseDeprecated = handleMintQuoteResponseDeprecated; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.d.ts deleted file mode 100644 index c040824a..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { MeltQuoteResponse } from '../model/types/index.js'; -export type MeltQuoteResponsePaidDeprecated = { - paid?: boolean; -}; -export declare function handleMeltQuoteResponseDeprecated(response: MeltQuoteResponse & MeltQuoteResponsePaidDeprecated): MeltQuoteResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.js deleted file mode 100644 index 8641b136..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-05.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handleMeltQuoteResponseDeprecated = void 0; -var index_js_1 = require("../model/types/index.js"); -function handleMeltQuoteResponseDeprecated(response) { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn("Field 'state' not found in MeltQuoteResponse. Update NUT-05 of mint: https://github.com/cashubtc/nuts/pull/136)"); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? index_js_1.MeltQuoteState.PAID : index_js_1.MeltQuoteState.UNPAID; - } - } - return response; -} -exports.handleMeltQuoteResponseDeprecated = handleMeltQuoteResponseDeprecated; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.d.ts deleted file mode 100644 index aa24c786..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { GetInfoResponse } from '../model/types/index.js'; -export declare function handleMintInfoContactFieldDeprecated(data: GetInfoResponse): GetInfoResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.js deleted file mode 100644 index 874a6a79..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/legacy/nut-06.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handleMintInfoContactFieldDeprecated = void 0; -function handleMintInfoContactFieldDeprecated(data) { - // Monkey patch old contact field ["email", "me@mail.com"] Array<[string, string]>; to new contact field [{method: "email", info: "me@mail.com"}] Array - // This is to maintain backwards compatibility with older versions of the mint - if (Array.isArray(data === null || data === void 0 ? void 0 : data.contact) && (data === null || data === void 0 ? void 0 : data.contact.length) > 0) { - data.contact = data.contact.map(function (contact) { - if (Array.isArray(contact) && - contact.length === 2 && - typeof contact[0] === 'string' && - typeof contact[1] === 'string') { - console.warn("Mint returned deprecated 'contact' field: Update NUT-06: https://github.com/cashubtc/nuts/pull/117"); - return { method: contact[0], info: contact[1] }; - } - return contact; - }); - } - return data; -} -exports.handleMintInfoContactFieldDeprecated = handleMintInfoContactFieldDeprecated; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.d.ts deleted file mode 100644 index 414f36b9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SerializedBlindedMessage } from './types/index.js'; -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; -declare class BlindedMessage { - amount: number; - B_: ProjPointType; - id: string; - constructor(amount: number, B_: ProjPointType, id: string); - getSerializedBlindedMessage(): SerializedBlindedMessage; -} -export { BlindedMessage }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.js deleted file mode 100644 index bfe2ab44..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedMessage.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BlindedMessage = void 0; -var BlindedMessage = /** @class */ (function () { - function BlindedMessage(amount, B_, id) { - this.amount = amount; - this.B_ = B_; - this.id = id; - } - BlindedMessage.prototype.getSerializedBlindedMessage = function () { - return { amount: this.amount, B_: this.B_.toHex(true), id: this.id }; - }; - return BlindedMessage; -}()); -exports.BlindedMessage = BlindedMessage; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.d.ts deleted file mode 100644 index f47bf5cd..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; -import { SerializedBlindedSignature } from './types/index.js'; -declare class BlindedSignature { - id: string; - amount: number; - C_: ProjPointType; - constructor(id: string, amount: number, C_: ProjPointType); - getSerializedBlindedSignature(): SerializedBlindedSignature; -} -export { BlindedSignature }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.js deleted file mode 100644 index 3f4ced0b..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/BlindedSignature.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BlindedSignature = void 0; -var BlindedSignature = /** @class */ (function () { - function BlindedSignature(id, amount, C_) { - this.id = id; - this.amount = amount; - this.C_ = C_; - } - BlindedSignature.prototype.getSerializedBlindedSignature = function () { - return { id: this.id, amount: this.amount, C_: this.C_.toHex(true) }; - }; - return BlindedSignature; -}()); -exports.BlindedSignature = BlindedSignature; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.d.ts deleted file mode 100644 index 78d96a73..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class HttpResponseError extends Error { - status: number; - constructor(message: string, status: number); -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.js deleted file mode 100644 index 5dd612f6..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Errors.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpResponseError = void 0; -var HttpResponseError = /** @class */ (function (_super) { - __extends(HttpResponseError, _super); - function HttpResponseError(message, status) { - var _this = _super.call(this, message) || this; - _this.status = status; - return _this; - } - return HttpResponseError; -}(Error)); -exports.HttpResponseError = HttpResponseError; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.d.ts deleted file mode 100644 index 3a2835a5..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PaymentRequestTransport, PaymentRequestTransportType } from './types'; -export declare class PaymentRequest { - transport: Array; - id?: string; - amount?: number; - unit?: string; - mints?: Array; - description?: string; - singleUse: boolean; - constructor(transport: Array, id?: string, amount?: number, unit?: string, mints?: Array, description?: string, singleUse?: boolean); - toEncodedRequest(): string; - getTransport(type: PaymentRequestTransportType): PaymentRequestTransport; - static fromEncodedRequest(encodedRequest: string): PaymentRequest; -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.js deleted file mode 100644 index e1fc76a9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/PaymentRequest.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PaymentRequest = void 0; -var base64_1 = require("../base64"); -var cbor_1 = require("../cbor"); -var buffer_1 = require("buffer"); -var PaymentRequest = /** @class */ (function () { - function PaymentRequest(transport, id, amount, unit, mints, description, singleUse) { - if (singleUse === void 0) { singleUse = false; } - this.transport = transport; - this.id = id; - this.amount = amount; - this.unit = unit; - this.mints = mints; - this.description = description; - this.singleUse = singleUse; - } - PaymentRequest.prototype.toEncodedRequest = function () { - var rawRequest = { - t: this.transport.map(function (t) { return ({ t: t.type, a: t.target, g: t.tags }); }) - }; - if (this.id) { - rawRequest.i = this.id; - } - if (this.amount) { - rawRequest.a = this.amount; - } - if (this.unit) { - rawRequest.u = this.unit; - } - if (this.mints) { - rawRequest.m = this.mints; - } - if (this.description) { - rawRequest.d = this.description; - } - if (this.singleUse) { - rawRequest.s = this.singleUse; - } - var data = (0, cbor_1.encodeCBOR)(rawRequest); - var encodedData = buffer_1.Buffer.from(data).toString('base64'); - return 'creq' + 'A' + encodedData; - }; - PaymentRequest.prototype.getTransport = function (type) { - return this.transport.find(function (t) { return t.type === type; }); - }; - PaymentRequest.fromEncodedRequest = function (encodedRequest) { - if (!encodedRequest.startsWith('creq')) { - throw new Error('unsupported pr: invalid prefix'); - } - var version = encodedRequest[4]; - if (version !== 'A') { - throw new Error('unsupported pr version'); - } - var encodedData = encodedRequest.slice(5); - var data = (0, base64_1.encodeBase64toUint8)(encodedData); - var decoded = (0, cbor_1.decodeCBOR)(data); - var transports = decoded.t.map(function (t) { return ({ type: t.t, target: t.a, tags: t.g }); }); - return new PaymentRequest(transports, decoded.i, decoded.a, decoded.u, decoded.m, decoded.d, decoded.s); - }; - return PaymentRequest; -}()); -exports.PaymentRequest = PaymentRequest; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.d.ts deleted file mode 100644 index 5217ace6..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BlindedMessage } from './BlindedMessage.js'; -import { Proof } from './types/index.js'; -declare class Split { - proofs: Array; - amount: number; - outputs: Array; - constructor(proofs: Array, amount: number, outputs: Array); - getSerializedSplit(): { - proofs: Proof[]; - amount: number; - outputs: { - amount: number; - B_: string; - }[]; - }; -} -export { Split }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.js deleted file mode 100644 index 4c540c62..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/Split.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Split = void 0; -var Split = /** @class */ (function () { - function Split(proofs, amount, outputs) { - this.proofs = proofs; - this.amount = amount; - this.outputs = outputs; - } - Split.prototype.getSerializedSplit = function () { - return { - proofs: this.proofs, - amount: this.amount, - outputs: this.outputs.map(function (blindedMessage) { - return { amount: blindedMessage.amount, B_: blindedMessage.B_.toHex(true) }; - }) - }; - }; - return Split; -}()); -exports.Split = Split; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.d.ts deleted file mode 100644 index 7f61105e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './mint/index'; -export * from './wallet/index'; -export type OutputAmounts = { - sendAmounts: Array; - keepAmounts?: Array; -}; -export type InvoiceData = { - paymentRequest: string; - amountInSats?: number; - amountInMSats?: number; - timestamp?: number; - paymentHash?: string; - memo?: string; - expiry?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.js deleted file mode 100644 index a4988177..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./mint/index"), exports); -__exportStar(require("./wallet/index"), exports); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.d.ts deleted file mode 100644 index 8117009c..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; -export * from './responses'; -export * from './keys'; -/** - * Payload that needs to be sent to the mint when checking for spendable proofs - */ -export type CheckStatePayload = { - /** - * The Y = hash_to_curve(secret) of the proofs to be checked. - */ - Ys: Array; -}; -/** - * Request to mint at /v1/restore endpoint - */ -export type PostRestorePayload = { - outputs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.js deleted file mode 100644 index d4fb7109..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./responses"), exports); -__exportStar(require("./keys"), exports); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.d.ts deleted file mode 100644 index b3cf73d7..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ -export type Keys = { - [amount: number]: string; -}; -/** - * An array of mint keysets - */ -export type MintActiveKeys = { - /** - * Keysets - */ - keysets: Array; -}; -/** - * An array of mint keyset entries. - */ -export type MintAllKeysets = { - /** - * Keysets - */ - keysets: Array; -}; -/** - * A mint keyset. - */ -export type MintKeys = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ - keys: Keys; -}; -/** - * A mint keyset entry. - */ -export type MintKeyset = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Whether the keyset is active or not. - */ - active: boolean; - /** - * Input fee for keyset (in ppk) - */ - input_fee_ppk?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.js deleted file mode 100644 index c8ad2e54..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/keys.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.d.ts deleted file mode 100644 index 8cc87efd..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; -/** - * Cashu api error - */ -export type ApiError = { - /** - * Error message - */ - error?: string; - /** - * HTTP error code - */ - code?: number; - /** - * Detailed error message - */ - detail?: string; -}; -/** - * Entries of CheckStateResponse with state of the proof - */ -export type ProofState = { - Y: string; - state: CheckStateEnum; - witness: string | null; -}; -/** - * Enum for the state of a proof - */ -export declare enum CheckStateEnum { - UNSPENT = "UNSPENT", - PENDING = "PENDING", - SPENT = "SPENT" -} -/** - * Response when checking proofs if they are spendable. Should not rely on this for receiving, since it can be easily cheated. - */ -export type CheckStateResponse = { - /** - * - */ - states: Array; -} & ApiError; -/** - * Response from mint at /info endpoint - */ -export type GetInfoResponse = { - name: string; - pubkey: string; - version: string; - description?: string; - description_long?: string; - contact: Array; - nuts: { - '4': { - methods: Array; - disabled: boolean; - }; - '5': { - methods: Array; - disabled: boolean; - }; - '7'?: { - supported: boolean; - }; - '8'?: { - supported: boolean; - }; - '9'?: { - supported: boolean; - }; - '10'?: { - supported: boolean; - }; - '11'?: { - supported: boolean; - }; - '12'?: { - supported: boolean; - }; - '13'?: { - supported: boolean; - }; - }; - motd?: string; -}; -/** - * Response from the mint after requesting a melt quote - */ -export type MeltQuoteResponse = { - /** - * Quote ID - */ - quote: string; - /** - * Amount to be melted - */ - amount: number; - /** - * Fee reserve to be added to the amount - */ - fee_reserve: number; - /** - * State of the melt quote - */ - state: MeltQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; - /** - * preimage of the paid invoice. is null if it the invoice has not been paid yet. can be null, depending on which LN-backend the mint uses - */ - payment_preimage: string | null; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change?: Array; -} & ApiError; -export declare enum MeltQuoteState { - UNPAID = "UNPAID", - PENDING = "PENDING", - PAID = "PAID" -} -export type MintContactInfo = { - method: string; - info: string; -}; -export declare enum MintQuoteState { - UNPAID = "UNPAID", - PAID = "PAID", - ISSUED = "ISSUED" -} -/** - * Response from the mint after requesting a mint - */ -export type MintQuoteResponse = { - /** - * Payment request - */ - request: string; - /** - * Quote ID - */ - quote: string; - /** - * State of the mint quote - */ - state: MintQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; -} & ApiError; -/** - * Response from the mint after requesting a mint - */ -export type MintResponse = { - signatures: Array; -} & ApiError; -/** - * Response from mint at /v1/restore endpoint - */ -export type PostRestoreResponse = { - outputs: Array; - promises: Array; -}; -/** - * Blinded signature as it is received from the mint - */ -export type SerializedBlindedSignature = { - /** - * keyset id for indicating which public key was used to sign the blinded message - */ - id: string; - /** - * Amount denominated in Satoshi - */ - amount: number; - /** - * Blinded signature - */ - C_: string; -}; -/** - * Ecash to other MoE swap method, displayed in @type {GetInfoResponse} - */ -export type SwapMethod = { - method: string; - unit: string; - min_amount: number; - max_amount: number; -}; -/** - * Response from the mint after performing a split action - */ -export type SwapResponse = { - /** - * represents the outputs after the split - */ - signatures: Array; -} & ApiError; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.js deleted file mode 100644 index 0a08712d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/mint/responses.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MintQuoteState = exports.MeltQuoteState = exports.CheckStateEnum = void 0; -/** - * Enum for the state of a proof - */ -var CheckStateEnum; -(function (CheckStateEnum) { - CheckStateEnum["UNSPENT"] = "UNSPENT"; - CheckStateEnum["PENDING"] = "PENDING"; - CheckStateEnum["SPENT"] = "SPENT"; -})(CheckStateEnum = exports.CheckStateEnum || (exports.CheckStateEnum = {})); -var MeltQuoteState; -(function (MeltQuoteState) { - MeltQuoteState["UNPAID"] = "UNPAID"; - MeltQuoteState["PENDING"] = "PENDING"; - MeltQuoteState["PAID"] = "PAID"; -})(MeltQuoteState = exports.MeltQuoteState || (exports.MeltQuoteState = {})); -var MintQuoteState; -(function (MintQuoteState) { - MintQuoteState["UNPAID"] = "UNPAID"; - MintQuoteState["PAID"] = "PAID"; - MintQuoteState["ISSUED"] = "ISSUED"; -})(MintQuoteState = exports.MintQuoteState || (exports.MintQuoteState = {})); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.d.ts deleted file mode 100644 index fe7b398d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export * from './payloads'; -export * from './responses'; -export * from './tokens'; -export * from './paymentRequests'; -/** - * represents a single Cashu proof. - */ -export type Proof = { - /** - * Keyset id, used to link proofs to a mint an its MintKeys. - */ - id: string; - /** - * Amount denominated in Satoshis. Has to match the amount of the mints signing key. - */ - amount: number; - /** - * The initial secret that was (randomly) chosen for the creation of this proof. - */ - secret: string; - /** - * The unblinded signature for this secret, signed by the mints private key. - */ - C: string; -}; -/** - * response when after receiving a single TokenEntry - */ -export type ReceiveTokenEntryResponse = { - /** - * Received proofs - */ - proofs: Array; -}; -/** - * Payload that needs to be sent to the mint when paying a lightning invoice. - */ -export type PaymentPayload = { - /** - * Payment request/Lighting invoice that should get paid by the mint. - */ - pr: string; - /** - * Proofs, matching Lightning invoices amount + fees. - */ - proofs: Array; -}; -/** - * @deprecated Token V2 - * should no longer be used - */ -export type TokenV2 = { - proofs: Array; - mints: Array<{ - url: string; - ids: Array; - }>; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.js deleted file mode 100644 index 83340162..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./payloads"), exports); -__exportStar(require("./responses"), exports); -__exportStar(require("./tokens"), exports); -__exportStar(require("./paymentRequests"), exports); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.d.ts deleted file mode 100644 index 3988ed67..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Proof } from './index'; -/** - * Data that the library needs to hold in memory while it awaits the blinded signatures for the mint. It is later used for unblinding the signatures. - */ -export type BlindingData = { - /** - * Blinded messages sent to the mint for signing. - */ - blindedMessages: Array; - /** - * secrets, kept client side for constructing proofs later. - */ - secrets: Array; - /** - * Blinding factor used for blinding messages and unblinding signatures after they are received from the mint. - */ - blindingFactors: Array; -}; -/** - * Payload that needs to be sent to the mint when melting. Includes Return for overpaid fees - */ -export type MeltPayload = { - /** - * ID of the melt quote - */ - quote: string; - /** - * Inputs (Proofs) to be melted - */ - inputs: Array; - /** - * Blank outputs (blinded messages) that can be filled by the mint to return overpaid fees - */ - outputs: Array; -}; -/** - * Payload that needs to be send to the mint to request a melt quote - */ -export type MeltQuotePayload = { - /** - * Unit to be melted - */ - unit: string; - /** - * Request to be melted to - */ - request: string; -}; -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintPayload = { - /** - * Quote ID received from the mint. - */ - quote: string; - /** - * Outputs (blinded messages) to be signed by the mint. - */ - outputs: Array; -}; -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintQuotePayload = { - /** - * Unit to be minted - */ - unit: string; - /** - * Amount to be minted - */ - amount: number; - /** - * Description for the invoice - */ - description?: string; -}; -/** - * Payload that needs to be sent to the mint when performing a split action - */ -export type SwapPayload = { - /** - * Inputs to the split operation - */ - inputs: Array; - /** - * Outputs (blinded messages) to be signed by the mint - */ - outputs: Array; -}; -/** - * blinded message for sending to the mint - */ -export type SerializedBlindedMessage = { - /** - * amount - */ - amount: number; - /** - * Blinded message - */ - B_: string; - /** - * Keyset id - */ - id: string; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.js deleted file mode 100644 index c8ad2e54..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/payloads.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.d.ts deleted file mode 100644 index cab0ee17..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Proof } from './index'; -export type RawTransport = { - t: PaymentRequestTransportType; - a: string; - g?: Array>; -}; -export type RawPaymentRequest = { - i?: string; - a?: number; - u?: string; - s?: boolean; - m?: Array; - d?: string; - t: Array; -}; -export type PaymentRequestTransport = { - type: PaymentRequestTransportType; - target: string; - tags?: Array>; -}; -export declare enum PaymentRequestTransportType { - POST = "post", - NOSTR = "nostr" -} -export type PaymentRequestPayload = { - id?: string; - memo?: string; - unit: string; - mint: string; - proofs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.js deleted file mode 100644 index 594e7882..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/paymentRequests.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PaymentRequestTransportType = void 0; -var PaymentRequestTransportType; -(function (PaymentRequestTransportType) { - PaymentRequestTransportType["POST"] = "post"; - PaymentRequestTransportType["NOSTR"] = "nostr"; -})(PaymentRequestTransportType = exports.PaymentRequestTransportType || (exports.PaymentRequestTransportType = {})); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.d.ts deleted file mode 100644 index 43207639..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MeltQuoteResponse } from '../mint'; -import { Proof, Token } from './index'; -/** - * Response after paying a Lightning invoice - */ -export type MeltProofsResponse = { - /** - * if false, the proofs have not been invalidated and the payment can be tried later again with the same proofs - */ - quote: MeltQuoteResponse; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change: Array; -}; -/** - * Response when receiving a complete token. - */ -export type ReceiveResponse = { - /** - * Successfully received Cashu Token - */ - token: Token; - /** - * TokenEntries that had errors. No error will be thrown, but clients can choose to handle tokens with errors accordingly. - */ - tokensWithErrors: Token | undefined; -}; -/** - * response after sending - */ -export type SendResponse = { - /** - * Proofs that exceeded the needed amount - */ - keep: Array; - /** - * Proofs to be sent, matching the chosen amount - */ - send: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.js deleted file mode 100644 index c8ad2e54..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/responses.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.d.ts deleted file mode 100644 index f8a917c9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Proof } from './index'; -/** - * A Cashu token - */ -export type Token = { - /** - * the mints URL - */ - mint: string; - /** - * a list of proofs - */ - proofs: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; -/** - * Template for a Proof inside a V4 Token - */ -export type V4ProofTemplate = { - /** - * Amount - */ - a: number; - /** - * Secret - */ - s: string; - /** - * Signature - */ - c: Uint8Array; -}; -/** - * TokenEntry in a V4 Token - */ -export type V4InnerToken = { - /** - * ID - */ - i: Uint8Array; - /** - * Proofs - */ - p: Array; -}; -/** - * Template for a V4 Token - */ -export type TokenV4Template = { - /** - * TokenEntries - */ - t: Array; - /** - * Memo - */ - d: string; - /** - * Mint Url - */ - m: string; - /** - * Unit - */ - u: string; -}; -/** - * A Cashu token - */ -export type DeprecatedToken = { - /** - * token entries - */ - token: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; -/** - * TokenEntry that stores proofs and mints - */ -type TokenEntry = { - /** - * a list of proofs - */ - proofs: Array; - /** - * the mints URL - */ - mint: string; -}; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.js deleted file mode 100644 index c8ad2e54..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/model/types/wallet/tokens.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/request.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/request.d.ts deleted file mode 100644 index 88b4f085..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/request.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -type RequestArgs = { - endpoint: string; - requestBody?: Record; - headers?: Record; -}; -type RequestOptions = RequestArgs & Omit; -/** - * An object containing any custom settings that you want to apply to the global fetch method. - * @param options See possible options here: https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - */ -export declare function setGlobalRequestOptions(options: Partial): void; -export default function request(options: RequestOptions): Promise; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/request.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/request.js deleted file mode 100644 index e21a9853..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/request.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setGlobalRequestOptions = void 0; -var Errors_1 = require("./model/Errors"); -var globalRequestOptions = {}; -/** - * An object containing any custom settings that you want to apply to the global fetch method. - * @param options See possible options here: https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - */ -function setGlobalRequestOptions(options) { - globalRequestOptions = options; -} -exports.setGlobalRequestOptions = setGlobalRequestOptions; -function _request(_a) { - var endpoint = _a.endpoint, requestBody = _a.requestBody, requestHeaders = _a.headers, options = __rest(_a, ["endpoint", "requestBody", "headers"]); - return __awaiter(this, void 0, void 0, function () { - var body, headers, response, _b, error, detail, err_1; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - body = requestBody ? JSON.stringify(requestBody) : undefined; - headers = __assign(__assign({ Accept: 'application/json, text/plain, */*' }, (body ? { 'Content-Type': 'application/json' } : undefined)), requestHeaders); - return [4 /*yield*/, fetch(endpoint, __assign({ body: body, headers: headers }, options))]; - case 1: - response = _c.sent(); - if (!!response.ok) return [3 /*break*/, 3]; - return [4 /*yield*/, response.json().catch(function () { return ({ error: 'bad response' }); })]; - case 2: - _b = _c.sent(), error = _b.error, detail = _b.detail; - throw new Errors_1.HttpResponseError(error || detail || 'bad response', response.status); - case 3: - _c.trys.push([3, 5, , 6]); - return [4 /*yield*/, response.json()]; - case 4: return [2 /*return*/, _c.sent()]; - case 5: - err_1 = _c.sent(); - console.error('Failed to parse HTTP response', err_1); - throw new Errors_1.HttpResponseError('bad response', response.status); - case 6: return [2 /*return*/]; - } - }); - }); -} -function request(options) { - return __awaiter(this, void 0, void 0, function () { - var data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, _request(__assign(__assign({}, options), globalRequestOptions))]; - case 1: - data = _a.sent(); - return [2 /*return*/, data]; - } - }); - }); -} -exports.default = request; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.d.ts deleted file mode 100644 index ca0c156f..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Keys, Proof, Token } from './model/types/index.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -/** - * Splits the amount into denominations of the provided @param keyset - * @param value amount to split - * @param keyset keys to look up split amounts - * @param split? optional custom split amounts - * @param order? optional order for split amounts (default: "asc") - * @returns Array of split amounts - * @throws Error if @param split amount is greater than @param value amount - */ -export declare function splitAmount(value: number, keyset: Keys, split?: Array, order?: 'desc' | 'asc'): Array; -/** - * Creates a list of amounts to keep based on the proofs we have and the proofs we want to reach. - * @param proofsWeHave complete set of proofs stored (from current mint) - * @param amountToKeep amount to keep - * @param keys keys of current keyset - * @param targetCount the target number of proofs to reach - * @returns an array of amounts to keep - */ -export declare function getKeepAmounts(proofsWeHave: Array, amountToKeep: number, keys: Keys, targetCount: number): Array; -/** - * returns the amounts in the keyset sorted by the order specified - * @param keyset to search in - * @param order order to sort the amounts in - * @returns the amounts in the keyset sorted by the order specified - */ -export declare function getKeysetAmounts(keyset: Keys, order?: 'asc' | 'desc'): Array; -/** - * Checks if the provided amount is in the keyset. - * @param amount amount to check - * @param keyset to search in - * @returns true if the amount is in the keyset, false otherwise - */ -export declare function hasCorrespondingKey(amount: number, keyset: Keys): boolean; -/** - * Converts a bytes array to a number. - * @param bytes to convert to number - * @returns number - */ -export declare function bytesToNumber(bytes: Uint8Array): bigint; -/** - * Converts a hex string to a number. - * @param hex to convert to number - * @returns number - */ -export declare function hexToNumber(hex: string): bigint; -/** - * Checks wether a proof or a list of proofs contains a non-hex id - * @param p Proof or list of proofs - * @returns boolean - */ -export declare function hasNonHexId(p: Proof | Array): boolean; -export declare function bigIntStringify(_key: unknown, value: T): string | T; -/** - * Helper function to encode a v3 cashu token - * @param token to encode - * @returns encoded token - */ -export declare function getEncodedTokenV3(token: Token): string; -/** - * Helper function to encode a cashu token (defaults to v4 if keyset id allows it) - * @param token - * @param [opts] - */ -export declare function getEncodedToken(token: Token, opts?: { - version: 3 | 4; -}): string; -export declare function getEncodedTokenV4(token: Token): string; -/** - * Helper function to decode cashu tokens into object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu token object - */ -export declare function getDecodedToken(token: string): Token; -/** - * Helper function to decode different versions of cashu tokens into an object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu Token object - */ -export declare function handleTokens(token: string): Token; -/** - * Returns the keyset id of a set of keys - * @param keys keys object to derive keyset id from - * @returns - */ -export declare function deriveKeysetId(keys: Keys): string; -export declare function mergeUInt8Arrays(a1: Uint8Array, a2: Uint8Array): Uint8Array; -export declare function sortProofsById(proofs: Array): Proof[]; -export declare function isObj(v: unknown): v is object; -export declare function checkResponse(data: { - error?: string; - detail?: string; -}): void; -export declare function joinUrls(...parts: Array): string; -export declare function sanitizeUrl(url: string): string; -export declare function sumProofs(proofs: Array): number; -export declare function decodePaymentRequest(paymentRequest: string): PaymentRequest; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.js deleted file mode 100644 index 8a5df909..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils.js +++ /dev/null @@ -1,344 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodePaymentRequest = exports.sumProofs = exports.sanitizeUrl = exports.joinUrls = exports.checkResponse = exports.isObj = exports.sortProofsById = exports.mergeUInt8Arrays = exports.deriveKeysetId = exports.handleTokens = exports.getDecodedToken = exports.getEncodedTokenV4 = exports.getEncodedToken = exports.getEncodedTokenV3 = exports.bigIntStringify = exports.hasNonHexId = exports.hexToNumber = exports.bytesToNumber = exports.hasCorrespondingKey = exports.getKeysetAmounts = exports.getKeepAmounts = exports.splitAmount = void 0; -var base64_js_1 = require("./base64.js"); -var Constants_js_1 = require("./utils/Constants.js"); -var utils_1 = require("@noble/curves/abstract/utils"); -var sha256_1 = require("@noble/hashes/sha256"); -var cbor_js_1 = require("./cbor.js"); -var PaymentRequest_js_1 = require("./model/PaymentRequest.js"); -/** - * Splits the amount into denominations of the provided @param keyset - * @param value amount to split - * @param keyset keys to look up split amounts - * @param split? optional custom split amounts - * @param order? optional order for split amounts (default: "asc") - * @returns Array of split amounts - * @throws Error if @param split amount is greater than @param value amount - */ -function splitAmount(value, keyset, split, order) { - if (split) { - if (split.reduce(function (a, b) { return a + b; }, 0) > value) { - throw new Error("Split is greater than total amount: ".concat(split.reduce(function (a, b) { return a + b; }, 0), " > ").concat(value)); - } - split.forEach(function (amt) { - if (!hasCorrespondingKey(amt, keyset)) { - throw new Error('Provided amount preferences do not match the amounts of the mint keyset.'); - } - }); - value = - value - - split.reduce(function (curr, acc) { - return curr + acc; - }, 0); - } - else { - split = []; - } - var sortedKeyAmounts = getKeysetAmounts(keyset); - sortedKeyAmounts.forEach(function (amt) { - var q = Math.floor(value / amt); - for (var i = 0; i < q; ++i) - split === null || split === void 0 ? void 0 : split.push(amt); - value %= amt; - }); - return split.sort(function (a, b) { return (order === 'desc' ? b - a : a - b); }); -} -exports.splitAmount = splitAmount; -/** - * Creates a list of amounts to keep based on the proofs we have and the proofs we want to reach. - * @param proofsWeHave complete set of proofs stored (from current mint) - * @param amountToKeep amount to keep - * @param keys keys of current keyset - * @param targetCount the target number of proofs to reach - * @returns an array of amounts to keep - */ -function getKeepAmounts(proofsWeHave, amountToKeep, keys, targetCount) { - // determines amounts we need to reach the targetCount for each amount based on the amounts of the proofs we have - // it tries to select amounts so that the proofs we have and the proofs we want reach the targetCount - var amountsWeWant = []; - var amountsWeHave = proofsWeHave.map(function (p) { return p.amount; }); - var sortedKeyAmounts = getKeysetAmounts(keys, 'asc'); - sortedKeyAmounts.forEach(function (amt) { - var countWeHave = amountsWeHave.filter(function (a) { return a === amt; }).length; - var countWeWant = Math.max(targetCount - countWeHave, 0); - for (var i = 0; i < countWeWant; ++i) { - if (amountsWeWant.reduce(function (a, b) { return a + b; }, 0) + amt > amountToKeep) { - break; - } - amountsWeWant.push(amt); - } - }); - // use splitAmount to fill the rest between the sum of amountsWeHave and amountToKeep - var amountDiff = amountToKeep - amountsWeWant.reduce(function (a, b) { return a + b; }, 0); - if (amountDiff) { - var remainingAmounts = splitAmount(amountDiff, keys); - remainingAmounts.forEach(function (amt) { - amountsWeWant.push(amt); - }); - } - var sortedAmountsWeWant = amountsWeWant.sort(function (a, b) { return a - b; }); - return sortedAmountsWeWant; -} -exports.getKeepAmounts = getKeepAmounts; -/** - * returns the amounts in the keyset sorted by the order specified - * @param keyset to search in - * @param order order to sort the amounts in - * @returns the amounts in the keyset sorted by the order specified - */ -function getKeysetAmounts(keyset, order) { - if (order === void 0) { order = 'desc'; } - if (order == 'desc') { - return Object.keys(keyset) - .map(function (k) { return parseInt(k); }) - .sort(function (a, b) { return b - a; }); - } - return Object.keys(keyset) - .map(function (k) { return parseInt(k); }) - .sort(function (a, b) { return a - b; }); -} -exports.getKeysetAmounts = getKeysetAmounts; -/** - * Checks if the provided amount is in the keyset. - * @param amount amount to check - * @param keyset to search in - * @returns true if the amount is in the keyset, false otherwise - */ -function hasCorrespondingKey(amount, keyset) { - return amount in keyset; -} -exports.hasCorrespondingKey = hasCorrespondingKey; -/** - * Converts a bytes array to a number. - * @param bytes to convert to number - * @returns number - */ -function bytesToNumber(bytes) { - return hexToNumber((0, utils_1.bytesToHex)(bytes)); -} -exports.bytesToNumber = bytesToNumber; -/** - * Converts a hex string to a number. - * @param hex to convert to number - * @returns number - */ -function hexToNumber(hex) { - return BigInt("0x".concat(hex)); -} -exports.hexToNumber = hexToNumber; -function isValidHex(str) { - return /^[a-f0-9]*$/i.test(str); -} -/** - * Checks wether a proof or a list of proofs contains a non-hex id - * @param p Proof or list of proofs - * @returns boolean - */ -function hasNonHexId(p) { - if (Array.isArray(p)) { - return p.some(function (proof) { return !isValidHex(proof.id); }); - } - return isValidHex(p.id); -} -exports.hasNonHexId = hasNonHexId; -//used for json serialization -function bigIntStringify(_key, value) { - return typeof value === 'bigint' ? value.toString() : value; -} -exports.bigIntStringify = bigIntStringify; -/** - * Helper function to encode a v3 cashu token - * @param token to encode - * @returns encoded token - */ -function getEncodedTokenV3(token) { - var v3TokenObj = { token: [{ mint: token.mint, proofs: token.proofs }] }; - if (token.unit) { - v3TokenObj.unit = token.unit; - } - if (token.memo) { - v3TokenObj.memo = token.memo; - } - return Constants_js_1.TOKEN_PREFIX + Constants_js_1.TOKEN_VERSION + (0, base64_js_1.encodeJsonToBase64)(v3TokenObj); -} -exports.getEncodedTokenV3 = getEncodedTokenV3; -/** - * Helper function to encode a cashu token (defaults to v4 if keyset id allows it) - * @param token - * @param [opts] - */ -function getEncodedToken(token, opts) { - var nonHex = hasNonHexId(token.proofs); - if (nonHex || (opts === null || opts === void 0 ? void 0 : opts.version) === 3) { - if ((opts === null || opts === void 0 ? void 0 : opts.version) === 4) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - return getEncodedTokenV3(token); - } - return getEncodedTokenV4(token); -} -exports.getEncodedToken = getEncodedToken; -function getEncodedTokenV4(token) { - var nonHex = hasNonHexId(token.proofs); - if (nonHex) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - var idMap = {}; - var mint = token.mint; - for (var i = 0; i < token.proofs.length; i++) { - var proof = token.proofs[i]; - if (idMap[proof.id]) { - idMap[proof.id].push(proof); - } - else { - idMap[proof.id] = [proof]; - } - } - var tokenTemplate = { - m: mint, - u: token.unit || 'sat', - t: Object.keys(idMap).map(function (id) { return ({ - i: (0, utils_1.hexToBytes)(id), - p: idMap[id].map(function (p) { return ({ a: p.amount, s: p.secret, c: (0, utils_1.hexToBytes)(p.C) }); }) - }); }) - }; - if (token.memo) { - tokenTemplate.d = token.memo; - } - var encodedData = (0, cbor_js_1.encodeCBOR)(tokenTemplate); - var prefix = 'cashu'; - var version = 'B'; - var base64Data = (0, base64_js_1.encodeUint8toBase64Url)(encodedData); - return prefix + version + base64Data; -} -exports.getEncodedTokenV4 = getEncodedTokenV4; -/** - * Helper function to decode cashu tokens into object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu token object - */ -function getDecodedToken(token) { - // remove prefixes - var uriPrefixes = ['web+cashu://', 'cashu://', 'cashu:', 'cashu']; - uriPrefixes.forEach(function (prefix) { - if (!token.startsWith(prefix)) { - return; - } - token = token.slice(prefix.length); - }); - return handleTokens(token); -} -exports.getDecodedToken = getDecodedToken; -/** - * Helper function to decode different versions of cashu tokens into an object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu Token object - */ -function handleTokens(token) { - var version = token.slice(0, 1); - var encodedToken = token.slice(1); - if (version === 'A') { - var parsedV3Token = (0, base64_js_1.encodeBase64ToJson)(encodedToken); - if (parsedV3Token.token.length > 1) { - throw new Error('Multi entry token are not supported'); - } - var entry = parsedV3Token.token[0]; - var tokenObj = { - mint: entry.mint, - proofs: entry.proofs, - unit: parsedV3Token.unit || 'sat' - }; - if (parsedV3Token.memo) { - tokenObj.memo = parsedV3Token.memo; - } - return tokenObj; - } - else if (version === 'B') { - var uInt8Token = (0, base64_js_1.encodeBase64toUint8)(encodedToken); - var tokenData = (0, cbor_js_1.decodeCBOR)(uInt8Token); - var proofs_1 = []; - tokenData.t.forEach(function (t) { - return t.p.forEach(function (p) { - proofs_1.push({ - secret: p.s, - C: (0, utils_1.bytesToHex)(p.c), - amount: p.a, - id: (0, utils_1.bytesToHex)(t.i) - }); - }); - }); - var decodedToken = { mint: tokenData.m, proofs: proofs_1, unit: tokenData.u || 'sat' }; - if (tokenData.d) { - decodedToken.memo = tokenData.d; - } - return decodedToken; - } - throw new Error('Token version is not supported'); -} -exports.handleTokens = handleTokens; -/** - * Returns the keyset id of a set of keys - * @param keys keys object to derive keyset id from - * @returns - */ -function deriveKeysetId(keys) { - var pubkeysConcat = Object.entries(keys) - .sort(function (a, b) { return +a[0] - +b[0]; }) - .map(function (_a) { - var pubKey = _a[1]; - return (0, utils_1.hexToBytes)(pubKey); - }) - .reduce(function (prev, curr) { return mergeUInt8Arrays(prev, curr); }, new Uint8Array()); - var hash = (0, sha256_1.sha256)(pubkeysConcat); - var hashHex = Buffer.from(hash).toString('hex').slice(0, 14); - return '00' + hashHex; -} -exports.deriveKeysetId = deriveKeysetId; -function mergeUInt8Arrays(a1, a2) { - // sum of individual array lengths - var mergedArray = new Uint8Array(a1.length + a2.length); - mergedArray.set(a1); - mergedArray.set(a2, a1.length); - return mergedArray; -} -exports.mergeUInt8Arrays = mergeUInt8Arrays; -function sortProofsById(proofs) { - return proofs.sort(function (a, b) { return a.id.localeCompare(b.id); }); -} -exports.sortProofsById = sortProofsById; -function isObj(v) { - return typeof v === 'object'; -} -exports.isObj = isObj; -function checkResponse(data) { - if (!isObj(data)) - return; - if ('error' in data && data.error) { - throw new Error(data.error); - } - if ('detail' in data && data.detail) { - throw new Error(data.detail); - } -} -exports.checkResponse = checkResponse; -function joinUrls() { - var parts = []; - for (var _i = 0; _i < arguments.length; _i++) { - parts[_i] = arguments[_i]; - } - return parts.map(function (part) { return part.replace(/(^\/+|\/+$)/g, ''); }).join('/'); -} -exports.joinUrls = joinUrls; -function sanitizeUrl(url) { - return url.replace(/\/$/, ''); -} -exports.sanitizeUrl = sanitizeUrl; -function sumProofs(proofs) { - return proofs.reduce(function (acc, proof) { return acc + proof.amount; }, 0); -} -exports.sumProofs = sumProofs; -function decodePaymentRequest(paymentRequest) { - return PaymentRequest_js_1.PaymentRequest.fromEncodedRequest(paymentRequest); -} -exports.decodePaymentRequest = decodePaymentRequest; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.d.ts deleted file mode 100644 index f4f7cf81..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * per protocol definition since tokenV3 tokens have a prefix and a version number - */ -declare const TOKEN_VERSION = "A"; -declare const TOKEN_PREFIX = "cashu"; -export { TOKEN_VERSION, TOKEN_PREFIX }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.js b/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.js deleted file mode 100644 index 6d1ad88e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es5/utils/Constants.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TOKEN_PREFIX = exports.TOKEN_VERSION = void 0; -/** - * per protocol definition since tokenV3 tokens have a prefix and a version number - */ -var TOKEN_VERSION = 'A'; -exports.TOKEN_VERSION = TOKEN_VERSION; -var TOKEN_PREFIX = 'cashu'; -exports.TOKEN_PREFIX = TOKEN_PREFIX; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.d.ts deleted file mode 100644 index 9b2af086..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -import type { CheckStatePayload, CheckStateResponse, GetInfoResponse, MeltPayload, MintActiveKeys, MintAllKeysets, PostRestoreResponse, MintQuoteResponse, SerializedBlindedMessage, SwapPayload, SwapResponse, MintQuotePayload, MintPayload, MintResponse, PostRestorePayload, MeltQuotePayload, MeltQuoteResponse } from './model/types/index.js'; -import request from './request.js'; -/** - * Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet. - */ -declare class CashuMint { - private _mintUrl; - private _customRequest?; - /** - * @param _mintUrl requires mint URL to create this object - * @param _customRequest if passed, use custom request implementation for network communication with the mint - */ - constructor(_mintUrl: string, _customRequest?: typeof request | undefined); - get mintUrl(): string; - /** - * fetches mints info at the /info endpoint - * @param mintUrl - * @param customRequest - */ - static getInfo(mintUrl: string, customRequest?: typeof request): Promise; - /** - * fetches mints info at the /info endpoint - */ - getInfo(): Promise; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param mintUrl - * @param swapPayload payload containing inputs and outputs - * @param customRequest - * @returns signed outputs - */ - static swap(mintUrl: string, swapPayload: SwapPayload, customRequest?: typeof request): Promise; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param swapPayload payload containing inputs and outputs - * @returns signed outputs - */ - swap(swapPayload: SwapPayload): Promise; - /** - * Requests a new mint quote from the mint. - * @param mintUrl - * @param mintQuotePayload Payload for creating a new mint quote - * @param customRequest - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - static createMintQuote(mintUrl: string, mintQuotePayload: MintQuotePayload, customRequest?: typeof request): Promise; - /** - * Requests a new mint quote from the mint. - * @param mintQuotePayload Payload for creating a new mint quote - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - createMintQuote(mintQuotePayload: MintQuotePayload): Promise; - /** - * Gets an existing mint quote from the mint. - * @param mintUrl - * @param quote Quote ID - * @param customRequest - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - static checkMintQuote(mintUrl: string, quote: string, customRequest?: typeof request): Promise; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - checkMintQuote(quote: string): Promise; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintUrl - * @param mintPayload Payload containing the outputs to get blind signatures on - * @param customRequest - * @returns serialized blinded signatures - */ - static mint(mintUrl: string, mintPayload: MintPayload, customRequest?: typeof request): Promise; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintPayload Payload containing the outputs to get blind signatures on - * @returns serialized blinded signatures - */ - mint(mintPayload: MintPayload): Promise; - /** - * Requests a new melt quote from the mint. - * @param mintUrl - * @param MeltQuotePayload - * @returns - */ - static createMeltQuote(mintUrl: string, meltQuotePayload: MeltQuotePayload, customRequest?: typeof request): Promise; - /** - * Requests a new melt quote from the mint. - * @param MeltQuotePayload - * @returns - */ - createMeltQuote(meltQuotePayload: MeltQuotePayload): Promise; - /** - * Gets an existing melt quote. - * @param mintUrl - * @param quote Quote ID - * @returns - */ - static checkMeltQuote(mintUrl: string, quote: string, customRequest?: typeof request): Promise; - /** - * Gets an existing melt quote. - * @param quote Quote ID - * @returns - */ - checkMeltQuote(quote: string): Promise; - /** - * Requests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees. - * @param mintUrl - * @param meltPayload - * @param customRequest - * @returns - */ - static melt(mintUrl: string, meltPayload: MeltPayload, customRequest?: typeof request): Promise; - /** - * Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees - * @param meltPayload - * @returns - */ - melt(meltPayload: MeltPayload): Promise; - /** - * Checks if specific proofs have already been redeemed - * @param mintUrl - * @param checkPayload - * @param customRequest - * @returns redeemed and unredeemed ordered list of booleans - */ - static check(mintUrl: string, checkPayload: CheckStatePayload, customRequest?: typeof request): Promise; - /** - * Get the mints public keys - * @param mintUrl - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @param customRequest - * @returns - */ - static getKeys(mintUrl: string, keysetId?: string, customRequest?: typeof request): Promise; - /** - * Get the mints public keys - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @returns the mints public keys - */ - getKeys(keysetId?: string, mintUrl?: string): Promise; - /** - * Get the mints keysets in no specific order - * @param mintUrl - * @param customRequest - * @returns all the mints past and current keysets. - */ - static getKeySets(mintUrl: string, customRequest?: typeof request): Promise; - /** - * Get the mints keysets in no specific order - * @returns all the mints past and current keysets. - */ - getKeySets(): Promise; - /** - * Checks if specific proofs have already been redeemed - * @param checkPayload - * @returns redeemed and unredeemed ordered list of booleans - */ - check(checkPayload: CheckStatePayload): Promise; - static restore(mintUrl: string, restorePayload: PostRestorePayload, customRequest?: typeof request): Promise; - restore(restorePayload: { - outputs: Array; - }): Promise; -} -export { CashuMint }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js deleted file mode 100644 index 5b280c25..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js +++ /dev/null @@ -1,539 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -import { MeltQuoteState } from './model/types/index.js'; -import request from './request.js'; -import { isObj, joinUrls, sanitizeUrl } from './utils.js'; -import { handleMeltQuoteResponseDeprecated } from './legacy/nut-05.js'; -import { handleMintQuoteResponseDeprecated } from './legacy/nut-04.js'; -import { handleMintInfoContactFieldDeprecated } from './legacy/nut-06.js'; -/** - * Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet. - */ -var CashuMint = /** @class */ (function () { - /** - * @param _mintUrl requires mint URL to create this object - * @param _customRequest if passed, use custom request implementation for network communication with the mint - */ - function CashuMint(_mintUrl, _customRequest) { - this._mintUrl = _mintUrl; - this._customRequest = _customRequest; - this._mintUrl = sanitizeUrl(_mintUrl); - this._customRequest = _customRequest; - } - Object.defineProperty(CashuMint.prototype, "mintUrl", { - get: function () { - return this._mintUrl; - }, - enumerable: false, - configurable: true - }); - /** - * fetches mints info at the /info endpoint - * @param mintUrl - * @param customRequest - */ - CashuMint.getInfo = function (mintUrl, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/info') - })]; - case 1: - response = _a.sent(); - data = handleMintInfoContactFieldDeprecated(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * fetches mints info at the /info endpoint - */ - CashuMint.prototype.getInfo = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.getInfo(this._mintUrl, this._customRequest)]; - }); - }); - }; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param mintUrl - * @param swapPayload payload containing inputs and outputs - * @param customRequest - * @returns signed outputs - */ - CashuMint.swap = function (mintUrl, swapPayload, customRequest) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/swap'), - method: 'POST', - requestBody: swapPayload - })]; - case 1: - data = _b.sent(); - if (!isObj(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.signatures)) { - throw new Error((_a = data.detail) !== null && _a !== void 0 ? _a : 'bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Performs a swap operation with ecash inputs and outputs. - * @param swapPayload payload containing inputs and outputs - * @returns signed outputs - */ - CashuMint.prototype.swap = function (swapPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.swap(this._mintUrl, swapPayload, this._customRequest)]; - }); - }); - }; - /** - * Requests a new mint quote from the mint. - * @param mintUrl - * @param mintQuotePayload Payload for creating a new mint quote - * @param customRequest - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - CashuMint.createMintQuote = function (mintUrl, mintQuotePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/quote/bolt11'), - method: 'POST', - requestBody: mintQuotePayload - })]; - case 1: - response = _a.sent(); - data = handleMintQuoteResponseDeprecated(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Requests a new mint quote from the mint. - * @param mintQuotePayload Payload for creating a new mint quote - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - CashuMint.prototype.createMintQuote = function (mintQuotePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.createMintQuote(this._mintUrl, mintQuotePayload, this._customRequest)]; - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param mintUrl - * @param quote Quote ID - * @param customRequest - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuMint.checkMintQuote = function (mintUrl, quote, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/quote/bolt11', quote), - method: 'GET' - })]; - case 1: - response = _a.sent(); - data = handleMintQuoteResponseDeprecated(response); - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuMint.prototype.checkMintQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.checkMintQuote(this._mintUrl, quote, this._customRequest)]; - }); - }); - }; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintUrl - * @param mintPayload Payload containing the outputs to get blind signatures on - * @param customRequest - * @returns serialized blinded signatures - */ - CashuMint.mint = function (mintUrl, mintPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/bolt11'), - method: 'POST', - requestBody: mintPayload - })]; - case 1: - data = _a.sent(); - if (!isObj(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.signatures)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintPayload Payload containing the outputs to get blind signatures on - * @returns serialized blinded signatures - */ - CashuMint.prototype.mint = function (mintPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.mint(this._mintUrl, mintPayload, this._customRequest)]; - }); - }); - }; - /** - * Requests a new melt quote from the mint. - * @param mintUrl - * @param MeltQuotePayload - * @returns - */ - CashuMint.createMeltQuote = function (mintUrl, meltQuotePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/quote/bolt11'), - method: 'POST', - requestBody: meltQuotePayload - })]; - case 1: - response = _a.sent(); - data = handleMeltQuoteResponseDeprecated(response); - if (!isObj(data) || - typeof (data === null || data === void 0 ? void 0 : data.amount) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.fee_reserve) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.quote) !== 'string') { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Requests a new melt quote from the mint. - * @param MeltQuotePayload - * @returns - */ - CashuMint.prototype.createMeltQuote = function (meltQuotePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.createMeltQuote(this._mintUrl, meltQuotePayload, this._customRequest)]; - }); - }); - }; - /** - * Gets an existing melt quote. - * @param mintUrl - * @param quote Quote ID - * @returns - */ - CashuMint.checkMeltQuote = function (mintUrl, quote, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/quote/bolt11', quote), - method: 'GET' - })]; - case 1: - response = _a.sent(); - data = handleMeltQuoteResponseDeprecated(response); - if (!isObj(data) || - typeof (data === null || data === void 0 ? void 0 : data.amount) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.fee_reserve) !== 'number' || - typeof (data === null || data === void 0 ? void 0 : data.quote) !== 'string' || - typeof (data === null || data === void 0 ? void 0 : data.state) !== 'string' || - !Object.values(MeltQuoteState).includes(data.state)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Gets an existing melt quote. - * @param quote Quote ID - * @returns - */ - CashuMint.prototype.checkMeltQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.checkMeltQuote(this._mintUrl, quote, this._customRequest)]; - }); - }); - }; - /** - * Requests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees. - * @param mintUrl - * @param meltPayload - * @param customRequest - * @returns - */ - CashuMint.melt = function (mintUrl, meltPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, response, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/bolt11'), - method: 'POST', - requestBody: meltPayload - })]; - case 1: - response = _a.sent(); - data = handleMeltQuoteResponseDeprecated(response); - if (!isObj(data) || - typeof (data === null || data === void 0 ? void 0 : data.state) !== 'string' || - !Object.values(MeltQuoteState).includes(data.state)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees - * @param meltPayload - * @returns - */ - CashuMint.prototype.melt = function (meltPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.melt(this._mintUrl, meltPayload, this._customRequest)]; - }); - }); - }; - /** - * Checks if specific proofs have already been redeemed - * @param mintUrl - * @param checkPayload - * @param customRequest - * @returns redeemed and unredeemed ordered list of booleans - */ - CashuMint.check = function (mintUrl, checkPayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/checkstate'), - method: 'POST', - requestBody: checkPayload - })]; - case 1: - data = _a.sent(); - if (!isObj(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.states)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Get the mints public keys - * @param mintUrl - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @param customRequest - * @returns - */ - CashuMint.getKeys = function (mintUrl, keysetId, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - // backwards compatibility for base64 encoded keyset ids - if (keysetId) { - // make the keysetId url safe - keysetId = keysetId.replace(/\//g, '_').replace(/\+/g, '-'); - } - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: keysetId ? joinUrls(mintUrl, '/v1/keys', keysetId) : joinUrls(mintUrl, '/v1/keys') - })]; - case 1: - data = _a.sent(); - if (!isObj(data) || !Array.isArray(data.keysets)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - /** - * Get the mints public keys - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @returns the mints public keys - */ - CashuMint.prototype.getKeys = function (keysetId, mintUrl) { - return __awaiter(this, void 0, void 0, function () { - var allKeys; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, CashuMint.getKeys(mintUrl || this._mintUrl, keysetId, this._customRequest)]; - case 1: - allKeys = _a.sent(); - return [2 /*return*/, allKeys]; - } - }); - }); - }; - /** - * Get the mints keysets in no specific order - * @param mintUrl - * @param customRequest - * @returns all the mints past and current keysets. - */ - CashuMint.getKeySets = function (mintUrl, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance; - return __generator(this, function (_a) { - requestInstance = customRequest || request; - return [2 /*return*/, requestInstance({ endpoint: joinUrls(mintUrl, '/v1/keysets') })]; - }); - }); - }; - /** - * Get the mints keysets in no specific order - * @returns all the mints past and current keysets. - */ - CashuMint.prototype.getKeySets = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.getKeySets(this._mintUrl, this._customRequest)]; - }); - }); - }; - /** - * Checks if specific proofs have already been redeemed - * @param checkPayload - * @returns redeemed and unredeemed ordered list of booleans - */ - CashuMint.prototype.check = function (checkPayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.check(this._mintUrl, checkPayload, this._customRequest)]; - }); - }); - }; - CashuMint.restore = function (mintUrl, restorePayload, customRequest) { - return __awaiter(this, void 0, void 0, function () { - var requestInstance, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - requestInstance = customRequest || request; - return [4 /*yield*/, requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/restore'), - method: 'POST', - requestBody: restorePayload - })]; - case 1: - data = _a.sent(); - if (!isObj(data) || !Array.isArray(data === null || data === void 0 ? void 0 : data.outputs) || !Array.isArray(data === null || data === void 0 ? void 0 : data.promises)) { - throw new Error('bad response'); - } - return [2 /*return*/, data]; - } - }); - }); - }; - CashuMint.prototype.restore = function (restorePayload) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, CashuMint.restore(this._mintUrl, restorePayload, this._customRequest)]; - }); - }); - }; - return CashuMint; -}()); -export { CashuMint }; -//# sourceMappingURL=CashuMint.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js.map deleted file mode 100644 index 1446a5a2..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuMint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CashuMint.js","sourceRoot":"","sources":["../../../src/CashuMint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAEN,iCAAiC,EACjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEN,iCAAiC,EACjC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oCAAoC,EAAE,MAAM,oBAAoB,CAAC;AAC1E;;GAEG;AACH;IACC;;;OAGG;IACH,mBAAoB,QAAgB,EAAU,cAA+B;QAAzD,aAAQ,GAAR,QAAQ,CAAQ;QAAU,mBAAc,GAAd,cAAc,CAAiB;QAC5E,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACtC,CAAC;IAED,sBAAI,8BAAO;aAAX;YACC,OAAO,IAAI,CAAC,QAAQ,CAAC;QACtB,CAAC;;;OA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KAC7E;IACF,gBAAC;AAAD,CAAC,AAtZD,IAsZC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.d.ts deleted file mode 100644 index c6db0a81..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.d.ts +++ /dev/null @@ -1,287 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { type MeltQuoteResponse, type MintKeys, type MintKeyset, type MeltProofsResponse, type Proof, type SendResponse, type Token, GetInfoResponse, OutputAmounts, ProofState } from './model/types/index.js'; -/** - * Class that represents a Cashu wallet. - * This class should act as the entry point for this library - */ -declare class CashuWallet { - private _keys; - private _keysetId; - private _keysets; - private _seed; - private _unit; - private _mintInfo; - private _denominationTarget; - mint: CashuMint; - /** - * @param mint Cashu mint instance is used to make api calls - * @param options.unit optionally set unit (default is 'sat') - * @param options.keys public keys from the mint (will be fetched from mint if not provided) - * @param options.keysets keysets from the mint (will be fetched from mint if not provided) - * @param options.mintInfo mint info from the mint (will be fetched from mint if not provided) - * @param options.denominationTarget target number proofs per denomination (default: see @constant DEFAULT_DENOMINATION_TARGET) - * @param options.bip39seed BIP39 seed for deterministic secrets. - * This can lead to poor performance, in which case the seed should be directly provided - */ - constructor(mint: CashuMint, options?: { - unit?: string; - keys?: Array | MintKeys; - keysets?: Array; - mintInfo?: GetInfoResponse; - bip39seed?: Uint8Array; - denominationTarget?: number; - }); - get unit(): string; - get keys(): Map; - get keysetId(): string; - set keysetId(keysetId: string); - get keysets(): Array; - get mintInfo(): GetInfoResponse; - /** - * Get information about the mint - * @returns mint info - */ - getMintInfo(): Promise; - /** - * Load mint information, keysets and keys. This function can be called if no keysets are passed in the constructor - */ - loadMint(): Promise; - /** - * Choose a keyset to activate based on the lowest input fee - * - * Note: this function will filter out deprecated base64 keysets - * - * @param keysets keysets to choose from - * @returns active keyset - */ - getActiveKeyset(keysets: Array): MintKeyset; - /** - * Get keysets from the mint with the unit of the wallet - * @returns keysets with wallet's unit - */ - getKeySets(): Promise>; - /** - * Get all active keys from the mint and set the keyset with the lowest fees as the active wallet keyset. - * @returns keyset - */ - getAllKeys(): Promise>; - /** - * Get public keys from the mint. If keys were already fetched, it will return those. - * - * If `keysetId` is set, it will fetch and return that specific keyset. - * Otherwise, we select an active keyset with the unit of the wallet. - * - * @param keysetId optional keysetId to get keys for - * @param forceRefresh? if set to true, it will force refresh the keyset from the mint - * @returns keyset - */ - getKeys(keysetId?: string, forceRefresh?: boolean): Promise; - /** - * Receive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array) - * @param {(string|Token)} token - Cashu token, either as string or decoded - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param token secrets if set - * @returns New token with newly created proofs, token entries that had errors - */ - receive(token: string | Token, options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - }): Promise>; - /** - * Send proofs of a given amount, by providing at least the required amount of proofs - * @param amount amount to send - * @param proofs array of proofs (accumulated amount of proofs must be >= than amount) - * @param options.outputAmounts? optionally specify the output's amounts to keep and send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the output secrets if set - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.offline? optionally send proofs offline. - * @param options.includeFees? optionally include fees in the response. - * @returns {SendResponse} - */ - send(amount: number, proofs: Array, options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - offline?: boolean; - includeFees?: boolean; - }): Promise; - selectProofsToSend(proofs: Array, amountToSend: number, includeFees?: boolean): SendResponse; - /** - * calculates the fees based on inputs (proofs) - * @param proofs input proofs to calculate fees for - * @returns fee amount - */ - getFeesForProofs(proofs: Array): number; - /** - * calculates the fees based on inputs for a given keyset - * @param nInputs number of inputs - * @param keysetId keysetId used to lookup `input_fee_ppk` - * @returns fee amount - */ - getFeesForKeyset(nInputs: number, keysetId: string): number; - /** - * Splits and creates sendable tokens - * if no amount is specified, the amount is implied by the cumulative amount of all proofs - * if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split - * @param amount amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set - * @param proofs proofs matching that amount - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.includeFees? include estimated fees for the receiver to receive the proofs - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param proofs secrets if set - * @returns promise of the change- and send-proofs - */ - swap(amount: number, proofs: Array, options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - includeFees?: boolean; - }): Promise; - /** - * Regenerates - * @param start set starting point for count (first cycle for each keyset should usually be 0) - * @param count set number of blinded messages that should be generated - * @param options.keysetId set a custom keysetId to restore from. keysetIds can be loaded with `CashuMint.getKeySets()` - * @returns proofs - */ - restore(start: number, count: number, options?: { - keysetId?: string; - }): Promise<{ - proofs: Array; - }>; - /** - * Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit. - * @param amount Amount requesting for mint. - * @param description optional description for the mint quote - * @returns the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit - */ - createMintQuote(amount: number, description?: string): Promise; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - checkMintQuote(quote: string): Promise; - /** - * Mint proofs for a given mint quote - * @param amount amount to request - * @param quote ID of mint quote - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.preference? Deprecated. Use `outputAmounts` instead. Optional preference for splitting proofs into specific amounts. - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns proofs - */ - mintProofs(amount: number, quote: string, options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - }): Promise<{ - proofs: Array; - }>; - /** - * Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice. - * @param invoice LN invoice that needs to get a fee estimate - * @returns the mint will create and return a melt quote for the invoice with an amount and fee reserve - */ - createMeltQuote(invoice: string): Promise; - /** - * Return an existing melt quote from the mint. - * @param quote ID of the melt quote - * @returns the mint will return an existing melt quote - */ - checkMeltQuote(quote: string): Promise; - /** - * Melt proofs for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. This function does not perform coin selection!. - * Returns melt quote and change proofs - * @param meltQuote ID of the melt quote - * @param proofsToSend proofs to melt - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.privkey? optionally set a private key to unlock P2PK locked secrets - * @returns - */ - meltProofs(meltQuote: MeltQuoteResponse, proofsToSend: Array, options?: { - keysetId?: string; - counter?: number; - privkey?: string; - }): Promise; - /** - * Creates a split payload - * @param amount amount to send - * @param proofsToSend proofs to split* - * @param outputAmounts? optionally specify the output's amounts to keep and to send. - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param privkey? will create a signature on the @param proofsToSend secrets if set - * @returns - */ - private createSwapPayload; - /** - * Get an array of the states of proofs from the mint (as an array of CheckStateEnum's) - * @param proofs (only the `secret` field is required) - * @returns - */ - checkProofsStates(proofs: Array): Promise>; - /** - * Creates blinded messages for a given amount - * @param amount amount to create blinded messages for - * @param split optional preference for splitting proofs into specific amounts. overrides amount param - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createRandomBlindedMessages; - /** - * Creates blinded messages for a according to @param amounts - * @param amount array of amounts to create blinded messages for - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createBlindedMessages; - /** - * Creates NUT-08 blank outputs (fee returns) for a given fee reserve - * See: https://github.com/cashubtc/nuts/blob/main/08.md - * @param amount amount to cover with blank outputs - * @param keysetId mint keysetId - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @returns blinded messages, secrets, and rs - */ - private createBlankOutputs; - /** - * construct proofs from @params promises, @params rs, @params secrets, and @params keyset - * @param promises array of serialized blinded signatures - * @param rs arrays of binding factors - * @param secrets array of secrets - * @param keyset mint keyset - * @returns array of serialized proofs - */ - private constructProofs; -} -export { CashuWallet }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js deleted file mode 100644 index 540d0d6e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js +++ /dev/null @@ -1,942 +0,0 @@ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -import { bytesToHex, randomBytes } from '@noble/hashes/utils'; -import { BlindedMessage } from './model/BlindedMessage.js'; -import { bytesToNumber, getDecodedToken, splitAmount, sumProofs, getKeepAmounts } from './utils.js'; -import { hashToCurve, pointFromHex } from '@cashu/crypto/modules/common'; -import { blindMessage, constructProofFromPromise, serializeProof } from '@cashu/crypto/modules/client'; -import { deriveBlindingFactor, deriveSecret } from '@cashu/crypto/modules/client/NUT09'; -import { createP2PKsecret, getSignedProofs } from '@cashu/crypto/modules/client/NUT11'; -/** - * The default number of proofs per denomination to keep in a wallet. - */ -var DEFAULT_DENOMINATION_TARGET = 3; -/** - * The default unit for the wallet, if not specified in constructor. - */ -var DEFAULT_UNIT = 'sat'; -/** - * Class that represents a Cashu wallet. - * This class should act as the entry point for this library - */ -var CashuWallet = /** @class */ (function () { - /** - * @param mint Cashu mint instance is used to make api calls - * @param options.unit optionally set unit (default is 'sat') - * @param options.keys public keys from the mint (will be fetched from mint if not provided) - * @param options.keysets keysets from the mint (will be fetched from mint if not provided) - * @param options.mintInfo mint info from the mint (will be fetched from mint if not provided) - * @param options.denominationTarget target number proofs per denomination (default: see @constant DEFAULT_DENOMINATION_TARGET) - * @param options.bip39seed BIP39 seed for deterministic secrets. - * This can lead to poor performance, in which case the seed should be directly provided - */ - function CashuWallet(mint, options) { - var _this = this; - this._keys = new Map(); - this._keysets = []; - this._seed = undefined; - this._unit = DEFAULT_UNIT; - this._mintInfo = undefined; - this._denominationTarget = DEFAULT_DENOMINATION_TARGET; - this.mint = mint; - var keys = []; - if ((options === null || options === void 0 ? void 0 : options.keys) && !Array.isArray(options.keys)) { - keys = [options.keys]; - } - else if ((options === null || options === void 0 ? void 0 : options.keys) && Array.isArray(options === null || options === void 0 ? void 0 : options.keys)) { - keys = options === null || options === void 0 ? void 0 : options.keys; - } - if (keys) - keys.forEach(function (key) { return _this._keys.set(key.id, key); }); - if (options === null || options === void 0 ? void 0 : options.unit) - this._unit = options === null || options === void 0 ? void 0 : options.unit; - if (options === null || options === void 0 ? void 0 : options.keysets) - this._keysets = options.keysets; - if (options === null || options === void 0 ? void 0 : options.denominationTarget) { - this._denominationTarget = options.denominationTarget; - } - if (options === null || options === void 0 ? void 0 : options.bip39seed) { - if (options.bip39seed instanceof Uint8Array) { - this._seed = options.bip39seed; - return; - } - throw new Error('bip39seed must be a valid UInt8Array'); - } - } - Object.defineProperty(CashuWallet.prototype, "unit", { - get: function () { - return this._unit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keys", { - get: function () { - return this._keys; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keysetId", { - get: function () { - if (!this._keysetId) { - throw new Error('No keysetId set'); - } - return this._keysetId; - }, - set: function (keysetId) { - this._keysetId = keysetId; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "keysets", { - get: function () { - return this._keysets; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(CashuWallet.prototype, "mintInfo", { - get: function () { - if (!this._mintInfo) { - throw new Error('Mint info not loaded'); - } - return this._mintInfo; - }, - enumerable: false, - configurable: true - }); - /** - * Get information about the mint - * @returns mint info - */ - CashuWallet.prototype.getMintInfo = function () { - return __awaiter(this, void 0, void 0, function () { - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this; - return [4 /*yield*/, this.mint.getInfo()]; - case 1: - _a._mintInfo = _b.sent(); - return [2 /*return*/, this._mintInfo]; - } - }); - }); - }; - /** - * Load mint information, keysets and keys. This function can be called if no keysets are passed in the constructor - */ - CashuWallet.prototype.loadMint = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.getMintInfo()]; - case 1: - _a.sent(); - return [4 /*yield*/, this.getKeySets()]; - case 2: - _a.sent(); - return [4 /*yield*/, this.getKeys()]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Choose a keyset to activate based on the lowest input fee - * - * Note: this function will filter out deprecated base64 keysets - * - * @param keysets keysets to choose from - * @returns active keyset - */ - CashuWallet.prototype.getActiveKeyset = function (keysets) { - var activeKeysets = keysets.filter(function (k) { return k.active; }); - // we only consider keyset IDs that start with "00" - activeKeysets = activeKeysets.filter(function (k) { return k.id.startsWith('00'); }); - var activeKeyset = activeKeysets.sort(function (a, b) { var _a, _b; return ((_a = a.input_fee_ppk) !== null && _a !== void 0 ? _a : 0) - ((_b = b.input_fee_ppk) !== null && _b !== void 0 ? _b : 0); })[0]; - if (!activeKeyset) { - throw new Error('No active keyset found'); - } - return activeKeyset; - }; - /** - * Get keysets from the mint with the unit of the wallet - * @returns keysets with wallet's unit - */ - CashuWallet.prototype.getKeySets = function () { - return __awaiter(this, void 0, void 0, function () { - var allKeysets, unitKeysets; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.getKeySets()]; - case 1: - allKeysets = _a.sent(); - unitKeysets = allKeysets.keysets.filter(function (k) { return k.unit === _this._unit; }); - this._keysets = unitKeysets; - return [2 /*return*/, this._keysets]; - } - }); - }); - }; - /** - * Get all active keys from the mint and set the keyset with the lowest fees as the active wallet keyset. - * @returns keyset - */ - CashuWallet.prototype.getAllKeys = function () { - return __awaiter(this, void 0, void 0, function () { - var keysets; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.getKeys()]; - case 1: - keysets = _a.sent(); - this._keys = new Map(keysets.keysets.map(function (k) { return [k.id, k]; })); - this.keysetId = this.getActiveKeyset(this._keysets).id; - return [2 /*return*/, keysets.keysets]; - } - }); - }); - }; - /** - * Get public keys from the mint. If keys were already fetched, it will return those. - * - * If `keysetId` is set, it will fetch and return that specific keyset. - * Otherwise, we select an active keyset with the unit of the wallet. - * - * @param keysetId optional keysetId to get keys for - * @param forceRefresh? if set to true, it will force refresh the keyset from the mint - * @returns keyset - */ - CashuWallet.prototype.getKeys = function (keysetId, forceRefresh) { - return __awaiter(this, void 0, void 0, function () { - var localKeyset, keys; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(!(this._keysets.length > 0) || forceRefresh)) return [3 /*break*/, 2]; - return [4 /*yield*/, this.getKeySets()]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - // no keyset id is chosen, let's choose one - if (!keysetId) { - localKeyset = this.getActiveKeyset(this._keysets); - keysetId = localKeyset.id; - } - if (!!this._keysets.find(function (k) { return k.id === keysetId; })) return [3 /*break*/, 4]; - return [4 /*yield*/, this.getKeySets()]; - case 3: - _a.sent(); - if (!this._keysets.find(function (k) { return k.id === keysetId; })) { - throw new Error("could not initialize keys. No keyset with id '".concat(keysetId, "' found")); - } - _a.label = 4; - case 4: - if (!!this._keys.get(keysetId)) return [3 /*break*/, 6]; - return [4 /*yield*/, this.mint.getKeys(keysetId)]; - case 5: - keys = _a.sent(); - this._keys.set(keysetId, keys.keysets[0]); - _a.label = 6; - case 6: - // set and return - this.keysetId = keysetId; - return [2 /*return*/, this._keys.get(keysetId)]; - } - }); - }); - }; - /** - * Receive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array) - * @param {(string|Token)} token - Cashu token, either as string or decoded - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param token secrets if set - * @returns New token with newly created proofs, token entries that had errors - */ - CashuWallet.prototype.receive = function (token, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, amount, _a, payload, blindingData, signatures, freshProofs; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (typeof token === 'string') { - token = getDecodedToken(token); - } - return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _b.sent(); - amount = sumProofs(token.proofs) - this.getFeesForProofs(token.proofs); - _a = this.createSwapPayload(amount, token.proofs, keys, options === null || options === void 0 ? void 0 : options.outputAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey, options === null || options === void 0 ? void 0 : options.privkey), payload = _a.payload, blindingData = _a.blindingData; - return [4 /*yield*/, this.mint.swap(payload)]; - case 2: - signatures = (_b.sent()).signatures; - freshProofs = this.constructProofs(signatures, blindingData.blindingFactors, blindingData.secrets, keys); - return [2 /*return*/, freshProofs]; - } - }); - }); - }; - /** - * Send proofs of a given amount, by providing at least the required amount of proofs - * @param amount amount to send - * @param proofs array of proofs (accumulated amount of proofs must be >= than amount) - * @param options.outputAmounts? optionally specify the output's amounts to keep and send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the output secrets if set - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.offline? optionally send proofs offline. - * @param options.includeFees? optionally include fees in the response. - * @returns {SendResponse} - */ - CashuWallet.prototype.send = function (amount, proofs, options) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, keepProofsOffline, sendProofOffline, expectedFee, _c, keepProofsSelect, sendProofs, _d, keep, send, keepProofs; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - if (sumProofs(proofs) < amount) { - throw new Error('Not enough funds available to send'); - } - _b = this.selectProofsToSend(proofs, amount, options === null || options === void 0 ? void 0 : options.includeFees), keepProofsOffline = _b.keep, sendProofOffline = _b.send; - expectedFee = (options === null || options === void 0 ? void 0 : options.includeFees) ? this.getFeesForProofs(sendProofOffline) : 0; - if (!(!(options === null || options === void 0 ? void 0 : options.offline) && - (sumProofs(sendProofOffline) != amount + expectedFee || // if the exact amount cannot be selected - (options === null || options === void 0 ? void 0 : options.outputAmounts) || - (options === null || options === void 0 ? void 0 : options.pubkey) || - (options === null || options === void 0 ? void 0 : options.privkey) || - (options === null || options === void 0 ? void 0 : options.keysetId))) // these options require a swap - ) return [3 /*break*/, 2]; // these options require a swap - _c = this.selectProofsToSend(proofs, amount, true), keepProofsSelect = _c.keep, sendProofs = _c.send; - (_a = options === null || options === void 0 ? void 0 : options.proofsWeHave) === null || _a === void 0 ? void 0 : _a.push.apply(_a, keepProofsSelect); - return [4 /*yield*/, this.swap(amount, sendProofs, options)]; - case 1: - _d = _e.sent(), keep = _d.keep, send = _d.send; - keepProofs = keepProofsSelect.concat(keep); - return [2 /*return*/, { keep: keepProofs, send: send }]; - case 2: - if (sumProofs(sendProofOffline) < amount + expectedFee) { - throw new Error('Not enough funds available to send'); - } - return [2 /*return*/, { keep: keepProofsOffline, send: sendProofOffline }]; - } - }); - }); - }; - CashuWallet.prototype.selectProofsToSend = function (proofs, amountToSend, includeFees) { - var sortedProofs = proofs.sort(function (a, b) { return a.amount - b.amount; }); - var smallerProofs = sortedProofs - .filter(function (p) { return p.amount <= amountToSend; }) - .sort(function (a, b) { return b.amount - a.amount; }); - var biggerProofs = sortedProofs - .filter(function (p) { return p.amount > amountToSend; }) - .sort(function (a, b) { return a.amount - b.amount; }); - var nextBigger = biggerProofs[0]; - if (!smallerProofs.length && nextBigger) { - return { - keep: proofs.filter(function (p) { return p.secret !== nextBigger.secret; }), - send: [nextBigger] - }; - } - if (!smallerProofs.length && !nextBigger) { - return { keep: proofs, send: [] }; - } - var remainder = amountToSend; - var selectedProofs = [smallerProofs[0]]; - var returnedProofs = []; - var feePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - remainder -= selectedProofs[0].amount - feePPK / 1000; - if (remainder > 0) { - var _a = this.selectProofsToSend(smallerProofs.slice(1), remainder, includeFees), keep = _a.keep, send = _a.send; - selectedProofs.push.apply(selectedProofs, send); - returnedProofs.push.apply(returnedProofs, keep); - } - var selectedFeePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - if (sumProofs(selectedProofs) < amountToSend + selectedFeePPK && nextBigger) { - selectedProofs = [nextBigger]; - } - return { - keep: proofs.filter(function (p) { return !selectedProofs.includes(p); }), - send: selectedProofs - }; - }; - /** - * calculates the fees based on inputs (proofs) - * @param proofs input proofs to calculate fees for - * @returns fee amount - */ - CashuWallet.prototype.getFeesForProofs = function (proofs) { - var _this = this; - if (!this._keysets.length) { - throw new Error('Could not calculate fees. No keysets found'); - } - var keysetIds = new Set(proofs.map(function (p) { return p.id; })); - keysetIds.forEach(function (id) { - if (!_this._keysets.find(function (k) { return k.id === id; })) { - throw new Error("Could not calculate fees. No keyset found with id: ".concat(id)); - } - }); - var fees = Math.floor(Math.max((proofs.reduce(function (total, curr) { var _a; return total + (((_a = _this._keysets.find(function (k) { return k.id === curr.id; })) === null || _a === void 0 ? void 0 : _a.input_fee_ppk) || 0); }, 0) + - 999) / - 1000, 0)); - return fees; - }; - /** - * calculates the fees based on inputs for a given keyset - * @param nInputs number of inputs - * @param keysetId keysetId used to lookup `input_fee_ppk` - * @returns fee amount - */ - CashuWallet.prototype.getFeesForKeyset = function (nInputs, keysetId) { - var _a; - var fees = Math.floor(Math.max((nInputs * (((_a = this._keysets.find(function (k) { return k.id === keysetId; })) === null || _a === void 0 ? void 0 : _a.input_fee_ppk) || 0) + - 999) / - 1000, 0)); - return fees; - }; - /** - * Splits and creates sendable tokens - * if no amount is specified, the amount is implied by the cumulative amount of all proofs - * if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split - * @param amount amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set - * @param proofs proofs matching that amount - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.includeFees? include estimated fees for the receiver to receive the proofs - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param proofs secrets if set - * @returns promise of the change- and send-proofs - */ - CashuWallet.prototype.swap = function (amount, proofs, options) { - var _a, _b, _c; - return __awaiter(this, void 0, void 0, function () { - var keyset, proofsToSend, amountToSend, amountAvailable, amountToKeep, sendAmounts, outputFee, sendAmountsFee, keepAmounts, _d, payload, blindingData, signatures, swapProofs, splitProofsToKeep, splitProofsToSend, amountToKeepCounter; - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - if (!options) - options = {}; - return [4 /*yield*/, this.getKeys(options.keysetId)]; - case 1: - keyset = _e.sent(); - proofsToSend = proofs; - amountToSend = amount; - amountAvailable = sumProofs(proofs); - amountToKeep = amountAvailable - amountToSend - this.getFeesForProofs(proofsToSend); - sendAmounts = ((_a = options === null || options === void 0 ? void 0 : options.outputAmounts) === null || _a === void 0 ? void 0 : _a.sendAmounts) || splitAmount(amountToSend, keyset.keys); - // include the fees to spend the the outputs of the swap - if (options === null || options === void 0 ? void 0 : options.includeFees) { - outputFee = this.getFeesForKeyset(sendAmounts.length, keyset.id); - sendAmountsFee = splitAmount(outputFee, keyset.keys); - while (this.getFeesForKeyset(sendAmounts.concat(sendAmountsFee).length, keyset.id) > outputFee) { - outputFee++; - sendAmountsFee = splitAmount(outputFee, keyset.keys); - } - sendAmounts = sendAmounts.concat(sendAmountsFee); - amountToSend += outputFee; - amountToKeep -= outputFee; - } - if (options && !((_b = options.outputAmounts) === null || _b === void 0 ? void 0 : _b.keepAmounts) && options.proofsWeHave) { - keepAmounts = getKeepAmounts(options.proofsWeHave, amountToKeep, keyset.keys, this._denominationTarget); - } - else if (options.outputAmounts) { - if (((_c = options.outputAmounts.keepAmounts) === null || _c === void 0 ? void 0 : _c.reduce(function (a, b) { return a + b; }, 0)) != - amountToKeep) { - throw new Error('Keep amounts do not match amount to keep'); - } - keepAmounts = options.outputAmounts.keepAmounts; - } - if (amountToSend + this.getFeesForProofs(proofsToSend) > amountAvailable) { - console.error("Not enough funds available (".concat(amountAvailable, ") for swap amountToSend: ").concat(amountToSend, " + fee: ").concat(this.getFeesForProofs(proofsToSend), " | length: ").concat(proofsToSend.length)); - throw new Error("Not enough funds available for swap"); - } - if (amountToSend + this.getFeesForProofs(proofsToSend) + amountToKeep != amountAvailable) { - throw new Error('Amounts do not match for swap'); - } - options.outputAmounts = { - keepAmounts: keepAmounts, - sendAmounts: sendAmounts - }; - _d = this.createSwapPayload(amountToSend, proofsToSend, keyset, options === null || options === void 0 ? void 0 : options.outputAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey, options === null || options === void 0 ? void 0 : options.privkey), payload = _d.payload, blindingData = _d.blindingData; - return [4 /*yield*/, this.mint.swap(payload)]; - case 2: - signatures = (_e.sent()).signatures; - swapProofs = this.constructProofs(signatures, blindingData.blindingFactors, blindingData.secrets, keyset); - splitProofsToKeep = []; - splitProofsToSend = []; - amountToKeepCounter = 0; - swapProofs.forEach(function (proof) { - if (amountToKeepCounter < amountToKeep) { - amountToKeepCounter += proof.amount; - splitProofsToKeep.push(proof); - return; - } - splitProofsToSend.push(proof); - }); - return [2 /*return*/, { - keep: splitProofsToKeep, - send: splitProofsToSend - }]; - } - }); - }); - }; - /** - * Regenerates - * @param start set starting point for count (first cycle for each keyset should usually be 0) - * @param count set number of blinded messages that should be generated - * @param options.keysetId set a custom keysetId to restore from. keysetIds can be loaded with `CashuMint.getKeySets()` - * @returns proofs - */ - CashuWallet.prototype.restore = function (start, count, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, amounts, _a, blindedMessages, blindingFactors, secrets, _b, outputs, promises, validBlindingFactors, validSecrets; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _c.sent(); - if (!this._seed) { - throw new Error('CashuWallet must be initialized with a seed to use restore'); - } - amounts = Array(count).fill(0); - _a = this.createBlindedMessages(amounts, keys.id, start), blindedMessages = _a.blindedMessages, blindingFactors = _a.blindingFactors, secrets = _a.secrets; - return [4 /*yield*/, this.mint.restore({ outputs: blindedMessages })]; - case 2: - _b = _c.sent(), outputs = _b.outputs, promises = _b.promises; - validBlindingFactors = blindingFactors.filter(function (_, i) { - return outputs.map(function (o) { return o.B_; }).includes(blindedMessages[i].B_); - }); - validSecrets = secrets.filter(function (_, i) { - return outputs.map(function (o) { return o.B_; }).includes(blindedMessages[i].B_); - }); - return [2 /*return*/, { - proofs: this.constructProofs(promises, validBlindingFactors, validSecrets, keys) - }]; - } - }); - }); - }; - /** - * Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit. - * @param amount Amount requesting for mint. - * @param description optional description for the mint quote - * @returns the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit - */ - CashuWallet.prototype.createMintQuote = function (amount, description) { - return __awaiter(this, void 0, void 0, function () { - var mintQuotePayload; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - mintQuotePayload = { - unit: this._unit, - amount: amount, - description: description - }; - return [4 /*yield*/, this.mint.createMintQuote(mintQuotePayload)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - CashuWallet.prototype.checkMintQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.checkMintQuote(quote)]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * Mint proofs for a given mint quote - * @param amount amount to request - * @param quote ID of mint quote - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.preference? Deprecated. Use `outputAmounts` instead. Optional preference for splitting proofs into specific amounts. - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns proofs - */ - CashuWallet.prototype.mintProofs = function (amount, quote, options) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var keyset, _b, blindedMessages, secrets, blindingFactors, mintPayload, signatures; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keyset = _c.sent(); - if (!(options === null || options === void 0 ? void 0 : options.outputAmounts) && (options === null || options === void 0 ? void 0 : options.proofsWeHave)) { - options.outputAmounts = { - keepAmounts: getKeepAmounts(options.proofsWeHave, amount, keyset.keys, this._denominationTarget), - sendAmounts: [] - }; - } - _b = this.createRandomBlindedMessages(amount, keyset, (_a = options === null || options === void 0 ? void 0 : options.outputAmounts) === null || _a === void 0 ? void 0 : _a.keepAmounts, options === null || options === void 0 ? void 0 : options.counter, options === null || options === void 0 ? void 0 : options.pubkey), blindedMessages = _b.blindedMessages, secrets = _b.secrets, blindingFactors = _b.blindingFactors; - mintPayload = { - outputs: blindedMessages, - quote: quote - }; - return [4 /*yield*/, this.mint.mint(mintPayload)]; - case 2: - signatures = (_c.sent()).signatures; - return [2 /*return*/, { - proofs: this.constructProofs(signatures, blindingFactors, secrets, keyset) - }]; - } - }); - }); - }; - /** - * Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice. - * @param invoice LN invoice that needs to get a fee estimate - * @returns the mint will create and return a melt quote for the invoice with an amount and fee reserve - */ - CashuWallet.prototype.createMeltQuote = function (invoice) { - return __awaiter(this, void 0, void 0, function () { - var meltQuotePayload, meltQuote; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - meltQuotePayload = { - unit: this._unit, - request: invoice - }; - return [4 /*yield*/, this.mint.createMeltQuote(meltQuotePayload)]; - case 1: - meltQuote = _a.sent(); - return [2 /*return*/, meltQuote]; - } - }); - }); - }; - /** - * Return an existing melt quote from the mint. - * @param quote ID of the melt quote - * @returns the mint will return an existing melt quote - */ - CashuWallet.prototype.checkMeltQuote = function (quote) { - return __awaiter(this, void 0, void 0, function () { - var meltQuote; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.mint.checkMeltQuote(quote)]; - case 1: - meltQuote = _a.sent(); - return [2 /*return*/, meltQuote]; - } - }); - }); - }; - /** - * Melt proofs for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. This function does not perform coin selection!. - * Returns melt quote and change proofs - * @param meltQuote ID of the melt quote - * @param proofsToSend proofs to melt - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.privkey? optionally set a private key to unlock P2PK locked secrets - * @returns - */ - CashuWallet.prototype.meltProofs = function (meltQuote, proofsToSend, options) { - return __awaiter(this, void 0, void 0, function () { - var keys, _a, blindedMessages, secrets, blindingFactors, meltPayload, meltResponse, change; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.getKeys(options === null || options === void 0 ? void 0 : options.keysetId)]; - case 1: - keys = _b.sent(); - _a = this.createBlankOutputs(sumProofs(proofsToSend) - meltQuote.amount, keys.id, options === null || options === void 0 ? void 0 : options.counter), blindedMessages = _a.blindedMessages, secrets = _a.secrets, blindingFactors = _a.blindingFactors; - if ((options === null || options === void 0 ? void 0 : options.privkey) != undefined) { - proofsToSend = getSignedProofs(proofsToSend.map(function (p) { - return { - amount: p.amount, - C: pointFromHex(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), options.privkey).map(function (p) { return serializeProof(p); }); - } - meltPayload = { - quote: meltQuote.quote, - inputs: proofsToSend, - outputs: __spreadArray([], blindedMessages, true) - }; - return [4 /*yield*/, this.mint.melt(meltPayload)]; - case 2: - meltResponse = _b.sent(); - change = []; - if (meltResponse.change) { - change = this.constructProofs(meltResponse.change, blindingFactors, secrets, keys); - } - return [2 /*return*/, { - quote: meltResponse, - change: change - }]; - } - }); - }); - }; - /** - * Creates a split payload - * @param amount amount to send - * @param proofsToSend proofs to split* - * @param outputAmounts? optionally specify the output's amounts to keep and to send. - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param privkey? will create a signature on the @param proofsToSend secrets if set - * @returns - */ - CashuWallet.prototype.createSwapPayload = function (amount, proofsToSend, keyset, outputAmounts, counter, pubkey, privkey) { - var totalAmount = proofsToSend.reduce(function (total, curr) { return total + curr.amount; }, 0); - if (outputAmounts && outputAmounts.sendAmounts && !outputAmounts.keepAmounts) { - outputAmounts.keepAmounts = splitAmount(totalAmount - amount - this.getFeesForProofs(proofsToSend), keyset.keys); - } - var keepBlindedMessages = this.createRandomBlindedMessages(totalAmount - amount - this.getFeesForProofs(proofsToSend), keyset, outputAmounts === null || outputAmounts === void 0 ? void 0 : outputAmounts.keepAmounts, counter); - if (this._seed && counter) { - counter = counter + keepBlindedMessages.secrets.length; - } - var sendBlindedMessages = this.createRandomBlindedMessages(amount, keyset, outputAmounts === null || outputAmounts === void 0 ? void 0 : outputAmounts.sendAmounts, counter, pubkey); - if (privkey) { - proofsToSend = getSignedProofs(proofsToSend.map(function (p) { - return { - amount: p.amount, - C: pointFromHex(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), privkey).map(function (p) { return serializeProof(p); }); - } - // join keepBlindedMessages and sendBlindedMessages - var blindingData = { - blindedMessages: __spreadArray(__spreadArray([], keepBlindedMessages.blindedMessages, true), sendBlindedMessages.blindedMessages, true), - secrets: __spreadArray(__spreadArray([], keepBlindedMessages.secrets, true), sendBlindedMessages.secrets, true), - blindingFactors: __spreadArray(__spreadArray([], keepBlindedMessages.blindingFactors, true), sendBlindedMessages.blindingFactors, true) - }; - var payload = { - inputs: proofsToSend, - outputs: __spreadArray([], blindingData.blindedMessages, true) - }; - return { payload: payload, blindingData: blindingData }; - }; - /** - * Get an array of the states of proofs from the mint (as an array of CheckStateEnum's) - * @param proofs (only the `secret` field is required) - * @returns - */ - CashuWallet.prototype.checkProofsStates = function (proofs) { - return __awaiter(this, void 0, void 0, function () { - var enc, Ys, BATCH_SIZE, states, _loop_1, this_1, i; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - enc = new TextEncoder(); - Ys = proofs.map(function (p) { return hashToCurve(enc.encode(p.secret)).toHex(true); }); - BATCH_SIZE = 100; - states = []; - _loop_1 = function (i) { - var YsSlice, batchStates, stateMap, j, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - YsSlice = Ys.slice(i, i + BATCH_SIZE); - return [4 /*yield*/, this_1.mint.check({ - Ys: YsSlice - })]; - case 1: - batchStates = (_b.sent()).states; - stateMap = {}; - batchStates.forEach(function (s) { - stateMap[s.Y] = s; - }); - for (j = 0; j < YsSlice.length; j++) { - state = stateMap[YsSlice[j]]; - if (!state) { - throw new Error('Could not find state for proof with Y: ' + YsSlice[j]); - } - states.push(state); - } - return [2 /*return*/]; - } - }); - }; - this_1 = this; - i = 0; - _a.label = 1; - case 1: - if (!(i < Ys.length)) return [3 /*break*/, 4]; - return [5 /*yield**/, _loop_1(i)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - i += BATCH_SIZE; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/, states]; - } - }); - }); - }; - /** - * Creates blinded messages for a given amount - * @param amount amount to create blinded messages for - * @param split optional preference for splitting proofs into specific amounts. overrides amount param - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - CashuWallet.prototype.createRandomBlindedMessages = function (amount, keyset, split, counter, pubkey) { - var amounts = splitAmount(amount, keyset.keys, split); - return this.createBlindedMessages(amounts, keyset.id, counter, pubkey); - }; - /** - * Creates blinded messages for a according to @param amounts - * @param amount array of amounts to create blinded messages for - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - CashuWallet.prototype.createBlindedMessages = function (amounts, keysetId, counter, pubkey) { - // if we atempt to create deterministic messages without a _seed, abort. - if (counter != undefined && !this._seed) { - throw new Error('Cannot create deterministic messages without seed. Instantiate CashuWallet with a bip39seed, or omit counter param.'); - } - var blindedMessages = []; - var secrets = []; - var blindingFactors = []; - for (var i = 0; i < amounts.length; i++) { - var deterministicR = undefined; - var secretBytes = undefined; - if (pubkey) { - secretBytes = createP2PKsecret(pubkey); - } - else if (this._seed && counter != undefined) { - secretBytes = deriveSecret(this._seed, keysetId, counter + i); - deterministicR = bytesToNumber(deriveBlindingFactor(this._seed, keysetId, counter + i)); - } - else { - secretBytes = randomBytes(32); - } - if (!pubkey) { - var secretHex = bytesToHex(secretBytes); - secretBytes = new TextEncoder().encode(secretHex); - } - secrets.push(secretBytes); - var _a = blindMessage(secretBytes, deterministicR), B_ = _a.B_, r = _a.r; - blindingFactors.push(r); - var blindedMessage = new BlindedMessage(amounts[i], B_, keysetId); - blindedMessages.push(blindedMessage.getSerializedBlindedMessage()); - } - return { blindedMessages: blindedMessages, secrets: secrets, blindingFactors: blindingFactors, amounts: amounts }; - }; - /** - * Creates NUT-08 blank outputs (fee returns) for a given fee reserve - * See: https://github.com/cashubtc/nuts/blob/main/08.md - * @param amount amount to cover with blank outputs - * @param keysetId mint keysetId - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @returns blinded messages, secrets, and rs - */ - CashuWallet.prototype.createBlankOutputs = function (amount, keysetId, counter) { - var count = Math.ceil(Math.log2(amount)) || 1; - //Prevent count from being -Infinity - if (count < 0) { - count = 0; - } - var amounts = count ? Array(count).fill(1) : []; - var _a = this.createBlindedMessages(amounts, keysetId, counter), blindedMessages = _a.blindedMessages, blindingFactors = _a.blindingFactors, secrets = _a.secrets; - return { blindedMessages: blindedMessages, secrets: secrets, blindingFactors: blindingFactors }; - }; - /** - * construct proofs from @params promises, @params rs, @params secrets, and @params keyset - * @param promises array of serialized blinded signatures - * @param rs arrays of binding factors - * @param secrets array of secrets - * @param keyset mint keyset - * @returns array of serialized proofs - */ - CashuWallet.prototype.constructProofs = function (promises, rs, secrets, keyset) { - return promises - .map(function (p, i) { - var blindSignature = { id: p.id, amount: p.amount, C_: pointFromHex(p.C_) }; - var r = rs[i]; - var secret = secrets[i]; - var A = pointFromHex(keyset.keys[p.amount]); - return constructProofFromPromise(blindSignature, r, secret, A); - }) - .map(function (p) { return serializeProof(p); }); - }; - return CashuWallet; -}()); -export { CashuWallet }; -//# sourceMappingURL=CashuWallet.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js.map deleted file mode 100644 index 31b9291c..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/CashuWallet.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CashuWallet.js","sourceRoot":"","sources":["../../../src/CashuWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAqB3D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EACN,YAAY,EACZ,yBAAyB,EACzB,cAAc,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGvF;;GAEG;AACH,IAAM,2BAA2B,GAAG,CAAC,CAAC;AAEtC;;GAEG;AACH,IAAM,YAAY,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH;IAWC;;;;;;;;;OASG;IACH,qBACC,IAAe,EACf,OAOC;QATF,iBAgCC;QApDO,UAAK,GAA0B,IAAI,GAAG,EAAE,CAAC;QAEzC,aAAQ,GAAsB,EAAE,CAAC;QACjC,UAAK,GAA2B,SAAS,CAAC;QAC1C,UAAK,GAAG,YAAY,CAAC;QACrB,cAAS,GAAgC,SAAS,CAAC;QACnD,wB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MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9C,OAAO,yBAAyB,CAAC,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAChE,CAAC,CAAC;aACD,GAAG,CAAC,UAAC,CAAa,IAAK,OAAA,cAAc,CAAC,CAAC,CAAU,EAA1B,CAA0B,CAAC,CAAC;IACtD,CAAC;IACF,kBAAC;AAAD,CAAC,AAn6BD,IAm6BC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.d.ts deleted file mode 100644 index a388775f..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare function encodeUint8toBase64(uint8array: Uint8Array): string; -declare function encodeUint8toBase64Url(bytes: Uint8Array): string; -declare function encodeBase64toUint8(base64String: string): Uint8Array; -declare function encodeJsonToBase64(jsonObj: unknown): string; -declare function encodeBase64ToJson(base64String: string): T; -export { encodeUint8toBase64, encodeUint8toBase64Url, encodeBase64toUint8, encodeJsonToBase64, encodeBase64ToJson }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js deleted file mode 100644 index 5061df29..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Buffer } from 'buffer'; -function encodeUint8toBase64(uint8array) { - return Buffer.from(uint8array).toString('base64'); -} -function encodeUint8toBase64Url(bytes) { - return Buffer.from(bytes) - .toString('base64') - .replace(/\+/g, '-') // Replace + with - - .replace(/\//g, '_') // Replace / with _ - .replace(/=+$/, ''); // Remove padding characters -} -function encodeBase64toUint8(base64String) { - return Buffer.from(base64String, 'base64'); -} -function encodeJsonToBase64(jsonObj) { - var jsonString = JSON.stringify(jsonObj); - return base64urlFromBase64(Buffer.from(jsonString).toString('base64')); -} -function encodeBase64ToJson(base64String) { - var jsonString = Buffer.from(base64urlToBase64(base64String), 'base64').toString(); - var jsonObj = JSON.parse(jsonString); - return jsonObj; -} -function base64urlToBase64(str) { - return str.replace(/-/g, '+').replace(/_/g, '/').split('=')[0]; - // .replace(/./g, '='); -} -function base64urlFromBase64(str) { - return str.replace(/\+/g, '-').replace(/\//g, '_').split('=')[0]; - // .replace(/=/g, '.'); -} -export { encodeUint8toBase64, encodeUint8toBase64Url, encodeBase64toUint8, encodeJsonToBase64, encodeBase64ToJson }; -//# sourceMappingURL=base64.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js.map deleted file mode 100644 index 7452dbb9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/base64.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/base64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,SAAS,mBAAmB,CAAC,UAAsB;IAClD,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAiB;IAChD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACvB,QAAQ,CAAC,QAAQ,CAAC;SAClB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,mBAAmB;SACvC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,mBAAmB;SACvC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,4BAA4B;AACnD,CAAC;AAED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c13..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -type SimpleValue = boolean | null | undefined; -export type ResultObject = { - [key: string]: ResultValue; -}; -export type ResultValue = SimpleValue | number | string | Uint8Array | Array | ResultObject; -export type ValidDecodedType = Extract; -export declare function encodeCBOR(value: any): Uint8Array; -export declare function decodeCBOR(data: Uint8Array): ResultValue; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.js deleted file mode 100644 index d1e32da4..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.js +++ /dev/null @@ -1,278 +0,0 @@ -function isResultKeyType(value) { - return typeof value === 'number' || typeof value === 'string'; -} -export function encodeCBOR(value) { - var buffer = []; - encodeItem(value, buffer); - return new Uint8Array(buffer); -} -function encodeItem(value, buffer) { - if (value === null) { - buffer.push(0xf6); - } - else if (value === undefined) { - buffer.push(0xf7); - } - else if (typeof value === 'boolean') { - buffer.push(value ? 0xf5 : 0xf4); - } - else if (typeof value === 'number') { - encodeUnsigned(value, buffer); - } - else if (typeof value === 'string') { - encodeString(value, buffer); - } - else if (Array.isArray(value)) { - encodeArray(value, buffer); - } - else if (value instanceof Uint8Array) { - encodeByteString(value, buffer); - } - else if (typeof value === 'object') { - encodeObject(value, buffer); - } - else { - throw new Error('Unsupported type'); - } -} -function encodeUnsigned(value, buffer) { - if (value < 24) { - buffer.push(value); - } - else if (value < 256) { - buffer.push(0x18, value); - } - else if (value < 65536) { - buffer.push(0x19, value >> 8, value & 0xff); - } - else if (value < 4294967296) { - buffer.push(0x1a, value >> 24, (value >> 16) & 0xff, (value >> 8) & 0xff, value & 0xff); - } - else { - throw new Error('Unsupported integer size'); - } -} -function encodeByteString(value, buffer) { - var length = value.length; - if (length < 24) { - buffer.push(0x40 + length); - } - else if (length < 256) { - buffer.push(0x58, length); - } - else if (length < 65536) { - buffer.push(0x59, (length >> 8) & 0xff, length & 0xff); - } - else if (length < 4294967296) { - buffer.push(0x5a, (length >> 24) & 0xff, (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff); - } - else { - throw new Error('Byte string too long to encode'); - } - for (var i = 0; i < value.length; i++) { - buffer.push(value[i]); - } -} -function encodeString(value, buffer) { - var utf8 = new TextEncoder().encode(value); - var length = utf8.length; - if (length < 24) { - buffer.push(0x60 + length); - } - else if (length < 256) { - buffer.push(0x78, length); - } - else if (length < 65536) { - buffer.push(0x79, (length >> 8) & 0xff, length & 0xff); - } - else if (length < 4294967296) { - buffer.push(0x7a, (length >> 24) & 0xff, (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff); - } - else { - throw new Error('String too long to encode'); - } - for (var i = 0; i < utf8.length; i++) { - buffer.push(utf8[i]); - } -} -function encodeArray(value, buffer) { - var length = value.length; - if (length < 24) { - buffer.push(0x80 | length); - } - else if (length < 256) { - buffer.push(0x98, length); - } - else if (length < 65536) { - buffer.push(0x99, length >> 8, length & 0xff); - } - else { - throw new Error('Unsupported array length'); - } - for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { - var item = value_1[_i]; - encodeItem(item, buffer); - } -} -function encodeObject(value, buffer) { - var keys = Object.keys(value); - encodeUnsigned(keys.length, buffer); - buffer[buffer.length - 1] |= 0xa0; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - encodeString(key, buffer); - encodeItem(value[key], buffer); - } -} -export function decodeCBOR(data) { - var view = new DataView(data.buffer, data.byteOffset, data.byteLength); - var result = decodeItem(view, 0); - return result.value; -} -function decodeItem(view, offset) { - if (offset >= view.byteLength) { - throw new Error('Unexpected end of data'); - } - var initialByte = view.getUint8(offset++); - var majorType = initialByte >> 5; - var additionalInfo = initialByte & 0x1f; - switch (majorType) { - case 0: - return decodeUnsigned(view, offset, additionalInfo); - case 1: - return decodeSigned(view, offset, additionalInfo); - case 2: - return decodeByteString(view, offset, additionalInfo); - case 3: - return decodeString(view, offset, additionalInfo); - case 4: - return decodeArray(view, offset, additionalInfo); - case 5: - return decodeMap(view, offset, additionalInfo); - case 7: - return decodeSimpleAndFloat(view, offset, additionalInfo); - default: - throw new Error("Unsupported major type: ".concat(majorType)); - } -} -function decodeLength(view, offset, additionalInfo) { - if (additionalInfo < 24) - return { value: additionalInfo, offset: offset }; - if (additionalInfo === 24) - return { value: view.getUint8(offset++), offset: offset }; - if (additionalInfo === 25) { - var value = view.getUint16(offset, false); - offset += 2; - return { value: value, offset: offset }; - } - if (additionalInfo === 26) { - var value = view.getUint32(offset, false); - offset += 4; - return { value: value, offset: offset }; - } - if (additionalInfo === 27) { - var hi = view.getUint32(offset, false); - var lo = view.getUint32(offset + 4, false); - offset += 8; - return { value: hi * Math.pow(2, 32) + lo, offset: offset }; - } - throw new Error("Unsupported length: ".concat(additionalInfo)); -} -function decodeUnsigned(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), value = _a.value, newOffset = _a.offset; - return { value: value, offset: newOffset }; -} -function decodeSigned(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), value = _a.value, newOffset = _a.offset; - return { value: -1 - value, offset: newOffset }; -} -function decodeByteString(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - if (newOffset + length > view.byteLength) { - throw new Error('Byte string length exceeds data length'); - } - var value = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - return { value: value, offset: newOffset + length }; -} -function decodeString(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - if (newOffset + length > view.byteLength) { - throw new Error('String length exceeds data length'); - } - var bytes = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - var value = new TextDecoder().decode(bytes); - return { value: value, offset: newOffset + length }; -} -function decodeArray(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - var array = []; - var currentOffset = newOffset; - for (var i = 0; i < length; i++) { - var result = decodeItem(view, currentOffset); - array.push(result.value); - currentOffset = result.offset; - } - return { value: array, offset: currentOffset }; -} -function decodeMap(view, offset, additionalInfo) { - var _a = decodeLength(view, offset, additionalInfo), length = _a.value, newOffset = _a.offset; - var map = {}; - var currentOffset = newOffset; - for (var i = 0; i < length; i++) { - var keyResult = decodeItem(view, currentOffset); - if (!isResultKeyType(keyResult.value)) { - throw new Error('Invalid key type'); - } - var valueResult = decodeItem(view, keyResult.offset); - map[keyResult.value] = valueResult.value; - currentOffset = valueResult.offset; - } - return { value: map, offset: currentOffset }; -} -function decodeFloat16(uint16) { - var exponent = (uint16 & 0x7c00) >> 10; - var fraction = uint16 & 0x03ff; - var sign = uint16 & 0x8000 ? -1 : 1; - if (exponent === 0) { - return sign * Math.pow(2, -14) * (fraction / 1024); - } - else if (exponent === 0x1f) { - return fraction ? NaN : sign * Infinity; - } - return sign * Math.pow(2, (exponent - 15)) * (1 + fraction / 1024); -} -function decodeSimpleAndFloat(view, offset, additionalInfo) { - if (additionalInfo < 24) { - switch (additionalInfo) { - case 20: - return { value: false, offset: offset }; - case 21: - return { value: true, offset: offset }; - case 22: - return { value: null, offset: offset }; - case 23: - return { value: undefined, offset: offset }; - default: - throw new Error("Unknown simple value: ".concat(additionalInfo)); - } - } - if (additionalInfo === 24) - return { value: view.getUint8(offset++), offset: offset }; - if (additionalInfo === 25) { - var value = decodeFloat16(view.getUint16(offset, false)); - offset += 2; - return { value: value, offset: offset }; - } - if (additionalInfo === 26) { - var value = view.getFloat32(offset, false); - offset += 4; - return { value: value, offset: offset }; - } - if (additionalInfo === 27) { - var value = view.getFloat64(offset, false); - offset += 8; - return { value: value, offset: offset }; - } - throw new Error("Unknown simple or float value: ".concat(additionalInfo)); -} -//# sourceMappingURL=cbor.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/cbor.js.map deleted file mode 100644 index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AK,OAAA,EAAE,MAAM,QAAA,EAAE,CAAC;KACzB;IACD,IAAI,cAAc,KAAK,EAAE,EAAE;QAC1B,IAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,CAAC;QACZ,OAAO,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,CAAC;KACzB;IACD,MAAM,IAAI,KAAK,CAAC,yCAAkC,cAAc,CAAE,CAAC,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/index.d.ts deleted file mode 100644 index c88368b4..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { CashuWallet } from './CashuWallet.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -import { setGlobalRequestOptions } from './request.js'; -import { getEncodedToken, getEncodedTokenV4, getDecodedToken, deriveKeysetId, decodePaymentRequest } from './utils.js'; -export * from './model/types/index.js'; -export { CashuMint, CashuWallet, PaymentRequest, getDecodedToken, getEncodedToken, getEncodedTokenV4, decodePaymentRequest, deriveKeysetId, setGlobalRequestOptions }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js deleted file mode 100644 index bf96b166..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { CashuWallet } from './CashuWallet.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -import { setGlobalRequestOptions } from './request.js'; -import { getEncodedToken, getEncodedTokenV4, getDecodedToken, deriveKeysetId, decodePaymentRequest } from './utils.js'; -export * from './model/types/index.js'; -export { CashuMint, CashuWallet, PaymentRequest, getDecodedToken, getEncodedToken, getEncodedTokenV4, decodePaymentRequest, deriveKeysetId, setGlobalRequestOptions }; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js.map deleted file mode 100644 index b99c1707..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACN,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,MAAM,YAAY,CAAC;AAEpB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EACN,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.d.ts deleted file mode 100644 index 20d37f90..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { MintQuoteResponse } from '../model/types/index.js'; -export type MintQuoteResponsePaidDeprecated = { - paid?: boolean; -}; -export declare function handleMintQuoteResponseDeprecated(response: MintQuoteResponse & MintQuoteResponsePaidDeprecated): MintQuoteResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js deleted file mode 100644 index ad373cc0..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js +++ /dev/null @@ -1,12 +0,0 @@ -import { MintQuoteState } from '../model/types/index.js'; -export function handleMintQuoteResponseDeprecated(response) { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn("Field 'state' not found in MintQuoteResponse. Update NUT-04 of mint: https://github.com/cashubtc/nuts/pull/141)"); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? MintQuoteState.PAID : MintQuoteState.UNPAID; - } - } - return response; -} -//# sourceMappingURL=nut-04.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js.map deleted file mode 100644 index 27e5cdbc..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-04.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nut-04.js","sourceRoot":"","sources":["../../../../src/legacy/nut-04.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAMzD,MAAM,UAAU,iCAAiC,CAChD,QAA6D;IAE7D,4FAA4F;IAC5F,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;QACpB,OAAO,CAAC,IAAI,CACX,iHAAiH,CACjH,CAAC;QACF,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;YACvC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;SAC7E;KACD;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.d.ts deleted file mode 100644 index c040824a..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { MeltQuoteResponse } from '../model/types/index.js'; -export type MeltQuoteResponsePaidDeprecated = { - paid?: boolean; -}; -export declare function handleMeltQuoteResponseDeprecated(response: MeltQuoteResponse & MeltQuoteResponsePaidDeprecated): MeltQuoteResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js deleted file mode 100644 index 640b5d6e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js +++ /dev/null @@ -1,12 +0,0 @@ -import { MeltQuoteState } from '../model/types/index.js'; -export function handleMeltQuoteResponseDeprecated(response) { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn("Field 'state' not found in MeltQuoteResponse. Update NUT-05 of mint: https://github.com/cashubtc/nuts/pull/136)"); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? MeltQuoteState.PAID : MeltQuoteState.UNPAID; - } - } - return response; -} -//# sourceMappingURL=nut-05.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js.map deleted file mode 100644 index e95c671c..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-05.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nut-05.js","sourceRoot":"","sources":["../../../../src/legacy/nut-05.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAMzD,MAAM,UAAU,iCAAiC,CAChD,QAA6D;IAE7D,4FAA4F;IAC5F,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;QACpB,OAAO,CAAC,IAAI,CACX,iHAAiH,CACjH,CAAC;QACF,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;YACvC,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC;SAC7E;KACD;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.d.ts deleted file mode 100644 index aa24c786..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { GetInfoResponse } from '../model/types/index.js'; -export declare function handleMintInfoContactFieldDeprecated(data: GetInfoResponse): GetInfoResponse; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js deleted file mode 100644 index a62a9f74..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js +++ /dev/null @@ -1,18 +0,0 @@ -export function handleMintInfoContactFieldDeprecated(data) { - // Monkey patch old contact field ["email", "me@mail.com"] Array<[string, string]>; to new contact field [{method: "email", info: "me@mail.com"}] Array - // This is to maintain backwards compatibility with older versions of the mint - if (Array.isArray(data === null || data === void 0 ? void 0 : data.contact) && (data === null || data === void 0 ? void 0 : data.contact.length) > 0) { - data.contact = data.contact.map(function (contact) { - if (Array.isArray(contact) && - contact.length === 2 && - typeof contact[0] === 'string' && - typeof contact[1] === 'string') { - console.warn("Mint returned deprecated 'contact' field: Update NUT-06: https://github.com/cashubtc/nuts/pull/117"); - return { method: contact[0], info: contact[1] }; - } - return contact; - }); - } - return data; -} -//# sourceMappingURL=nut-06.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js.map deleted file mode 100644 index aca8b5f8..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/legacy/nut-06.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nut-06.js","sourceRoot":"","sources":["../../../../src/legacy/nut-06.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oCAAoC,CAAC,IAAqB;IACzE,wKAAwK;IACxK,8EAA8E;IAC9E,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,MAAM,IAAG,CAAC,EAAE;QAC7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,OAAwB;YACxD,IACC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;gBACtB,OAAO,CAAC,MAAM,KAAK,CAAC;gBACpB,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC9B,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,EAC7B;gBACD,OAAO,CAAC,IAAI,CACX,oGAAoG,CACpG,CAAC;gBACF,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAqB,CAAC;aACnE;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACb,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.d.ts deleted file mode 100644 index 414f36b9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SerializedBlindedMessage } from './types/index.js'; -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; -declare class BlindedMessage { - amount: number; - B_: ProjPointType; - id: string; - constructor(amount: number, B_: ProjPointType, id: string); - getSerializedBlindedMessage(): SerializedBlindedMessage; -} -export { BlindedMessage }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js deleted file mode 100644 index 279067ea..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js +++ /dev/null @@ -1,13 +0,0 @@ -var BlindedMessage = /** @class */ (function () { - function BlindedMessage(amount, B_, id) { - this.amount = amount; - this.B_ = B_; - this.id = id; - } - BlindedMessage.prototype.getSerializedBlindedMessage = function () { - return { amount: this.amount, B_: this.B_.toHex(true), id: this.id }; - }; - return BlindedMessage; -}()); -export { BlindedMessage }; -//# sourceMappingURL=BlindedMessage.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js.map deleted file mode 100644 index 6c4b2c3e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedMessage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlindedMessage.js","sourceRoot":"","sources":["../../../../src/model/BlindedMessage.ts"],"names":[],"mappings":"AAGA;IAIC,wBAAY,MAAc,EAAE,EAAyB,EAAE,EAAU;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,CAAC;IACD,oDAA2B,GAA3B;QACC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IACtE,CAAC;IACF,qBAAC;AAAD,CAAC,AAZD,IAYC;AACD,OAAO,EAAE,cAAc,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.d.ts deleted file mode 100644 index f47bf5cd..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; -import { SerializedBlindedSignature } from './types/index.js'; -declare class BlindedSignature { - id: string; - amount: number; - C_: ProjPointType; - constructor(id: string, amount: number, C_: ProjPointType); - getSerializedBlindedSignature(): SerializedBlindedSignature; -} -export { BlindedSignature }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js deleted file mode 100644 index ca5e52fb..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js +++ /dev/null @@ -1,13 +0,0 @@ -var BlindedSignature = /** @class */ (function () { - function BlindedSignature(id, amount, C_) { - this.id = id; - this.amount = amount; - this.C_ = C_; - } - BlindedSignature.prototype.getSerializedBlindedSignature = function () { - return { id: this.id, amount: this.amount, C_: this.C_.toHex(true) }; - }; - return BlindedSignature; -}()); -export { BlindedSignature }; -//# sourceMappingURL=BlindedSignature.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js.map deleted file mode 100644 index 15429b7d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/BlindedSignature.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlindedSignature.js","sourceRoot":"","sources":["../../../../src/model/BlindedSignature.ts"],"names":[],"mappings":"AAGA;IAKC,0BAAY,EAAU,EAAE,MAAc,EAAE,EAAyB;QAChE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,CAAC;IAED,wDAA6B,GAA7B;QACC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IACtE,CAAC;IACF,uBAAC;AAAD,CAAC,AAdD,IAcC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.d.ts deleted file mode 100644 index 78d96a73..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class HttpResponseError extends Error { - status: number; - constructor(message: string, status: number); -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js deleted file mode 100644 index 1207c2c4..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js +++ /dev/null @@ -1,26 +0,0 @@ -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var HttpResponseError = /** @class */ (function (_super) { - __extends(HttpResponseError, _super); - function HttpResponseError(message, status) { - var _this = _super.call(this, message) || this; - _this.status = status; - return _this; - } - return HttpResponseError; -}(Error)); -export { HttpResponseError }; -//# sourceMappingURL=Errors.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js.map deleted file mode 100644 index 21b3f406..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../../src/model/Errors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;IAAuC,qCAAK;IAE3C,2BAAY,OAAe,EAAE,MAAc;QAA3C,YACC,kBAAM,OAAO,CAAC,SAEd;QADA,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACtB,CAAC;IACF,wBAAC;AAAD,CAAC,AAND,CAAuC,KAAK,GAM3C"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.d.ts deleted file mode 100644 index 916b32b6..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PaymentRequestTransport, PaymentRequestTransportType } from './types'; -export declare class PaymentRequest { - transport: Array; - id?: string | undefined; - amount?: number | undefined; - unit?: string | undefined; - mints?: string[] | undefined; - description?: string | undefined; - singleUse: boolean; - constructor(transport: Array, id?: string | undefined, amount?: number | undefined, unit?: string | undefined, mints?: string[] | undefined, description?: string | undefined, singleUse?: boolean); - toEncodedRequest(): string; - getTransport(type: PaymentRequestTransportType): PaymentRequestTransport | undefined; - static fromEncodedRequest(encodedRequest: string): PaymentRequest; -} diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js deleted file mode 100644 index e41caed3..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js +++ /dev/null @@ -1,61 +0,0 @@ -import { encodeBase64toUint8 } from '../base64'; -import { decodeCBOR, encodeCBOR } from '../cbor'; -import { Buffer } from 'buffer'; -var PaymentRequest = /** @class */ (function () { - function PaymentRequest(transport, id, amount, unit, mints, description, singleUse) { - if (singleUse === void 0) { singleUse = false; } - this.transport = transport; - this.id = id; - this.amount = amount; - this.unit = unit; - this.mints = mints; - this.description = description; - this.singleUse = singleUse; - } - PaymentRequest.prototype.toEncodedRequest = function () { - var rawRequest = { - t: this.transport.map(function (t) { return ({ t: t.type, a: t.target, g: t.tags }); }) - }; - if (this.id) { - rawRequest.i = this.id; - } - if (this.amount) { - rawRequest.a = this.amount; - } - if (this.unit) { - rawRequest.u = this.unit; - } - if (this.mints) { - rawRequest.m = this.mints; - } - if (this.description) { - rawRequest.d = this.description; - } - if (this.singleUse) { - rawRequest.s = this.singleUse; - } - var data = encodeCBOR(rawRequest); - var encodedData = Buffer.from(data).toString('base64'); - return 'creq' + 'A' + encodedData; - }; - PaymentRequest.prototype.getTransport = function (type) { - return this.transport.find(function (t) { return t.type === type; }); - }; - PaymentRequest.fromEncodedRequest = function (encodedRequest) { - if (!encodedRequest.startsWith('creq')) { - throw new Error('unsupported pr: invalid prefix'); - } - var version = encodedRequest[4]; - if (version !== 'A') { - throw new Error('unsupported pr version'); - } - var encodedData = encodedRequest.slice(5); - var data = encodeBase64toUint8(encodedData); - var decoded = decodeCBOR(data); - var transports = decoded.t.map(function (t) { return ({ type: t.t, target: t.a, tags: t.g }); }); - return new PaymentRequest(transports, decoded.i, decoded.a, decoded.u, decoded.m, decoded.d, decoded.s); - }; - return PaymentRequest; -}()); -export { PaymentRequest }; -//# sourceMappingURL=PaymentRequest.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js.map deleted file mode 100644 index 656c8555..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/PaymentRequest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PaymentRequest.js","sourceRoot":"","sources":["../../../../src/model/PaymentRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAOjD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;IACC,wBACQ,SAAyC,EACzC,EAAW,EACX,MAAe,EACf,IAAa,EACb,KAAqB,EACrB,WAAoB,EACpB,SAA0B;QAA1B,0BAAA,EAAA,iBAA0B;QAN1B,cAAS,GAAT,SAAS,CAAgC;QACzC,OAAE,GAAF,EAAE,CAAS;QACX,WAAM,GAAN,MAAM,CAAS;QACf,SAAI,GAAJ,IAAI,CAAS;QACb,UAAK,GAAL,KAAK,CAAgB;QACrB,gBAAW,GAAX,WAAW,CAAS;QACpB,cAAS,GAAT,SAAS,CAAiB;IAC/B,CAAC;IAEJ,yCAAgB,GAAhB;QACC,IAAM,UAAU,GAAsB;YACrC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAC,CAA0B,IAAK,OAAA,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAvC,CAAuC,CAAC;SAC9F,CAAC;QACF,IAAI,IAAI,CAAC,EAAE,EAAE;YACZ,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YAChB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W,CAAC,CAAC;QAC9C,IAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAsB,CAAC;QACtD,IAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,UAAC,CAAe,IAAK,OAAA,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAvC,CAAuC,CAAC,CAAC;QAC/F,OAAO,IAAI,cAAc,CACxB,UAAU,EACV,OAAO,CAAC,CAAC,EACT,OAAO,CAAC,CAAC,EACT,OAAO,CAAC,CAAC,EACT,OAAO,CAAC,CAAC,EACT,OAAO,CAAC,CAAC,EACT,OAAO,CAAC,CAAC,CACT,CAAC;IACH,CAAC;IACF,qBAAC;AAAD,CAAC,AAjED,IAiEC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.d.ts deleted file mode 100644 index 5217ace6..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BlindedMessage } from './BlindedMessage.js'; -import { Proof } from './types/index.js'; -declare class Split { - proofs: Array; - amount: number; - outputs: Array; - constructor(proofs: Array, amount: number, outputs: Array); - getSerializedSplit(): { - proofs: Proof[]; - amount: number; - outputs: { - amount: number; - B_: string; - }[]; - }; -} -export { Split }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js deleted file mode 100644 index 23b3fbca..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js +++ /dev/null @@ -1,19 +0,0 @@ -var Split = /** @class */ (function () { - function Split(proofs, amount, outputs) { - this.proofs = proofs; - this.amount = amount; - this.outputs = outputs; - } - Split.prototype.getSerializedSplit = function () { - return { - proofs: this.proofs, - amount: this.amount, - outputs: this.outputs.map(function (blindedMessage) { - return { amount: blindedMessage.amount, B_: blindedMessage.B_.toHex(true) }; - }) - }; - }; - return Split; -}()); -export { Split }; -//# sourceMappingURL=Split.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js.map deleted file mode 100644 index e4af39a5..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/Split.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Split.js","sourceRoot":"","sources":["../../../../src/model/Split.ts"],"names":[],"mappings":"AAGA;IAIC,eAAY,MAAoB,EAAE,MAAc,EAAE,OAA8B;QAC/E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACxB,CAAC;IACD,kCAAkB,GAAlB;QACC,OAAO;YACN,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,cAA8B;gBACxD,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7E,CAAC,CAAC;SACF,CAAC;IACH,CAAC;IACF,YAAC;AAAD,CAAC,AAlBD,IAkBC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.d.ts deleted file mode 100644 index 7f61105e..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './mint/index'; -export * from './wallet/index'; -export type OutputAmounts = { - sendAmounts: Array; - keepAmounts?: Array; -}; -export type InvoiceData = { - paymentRequest: string; - amountInSats?: number; - amountInMSats?: number; - timestamp?: number; - paymentHash?: string; - memo?: string; - expiry?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js deleted file mode 100644 index ba602977..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './mint/index'; -export * from './wallet/index'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js.map deleted file mode 100644 index c42a4ecd..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/model/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.d.ts deleted file mode 100644 index 8117009c..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; -export * from './responses'; -export * from './keys'; -/** - * Payload that needs to be sent to the mint when checking for spendable proofs - */ -export type CheckStatePayload = { - /** - * The Y = hash_to_curve(secret) of the proofs to be checked. - */ - Ys: Array; -}; -/** - * Request to mint at /v1/restore endpoint - */ -export type PostRestorePayload = { - outputs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js deleted file mode 100644 index 8ef1230c..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './responses'; -export * from './keys'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js.map deleted file mode 100644 index 95809376..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/model/types/mint/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.d.ts deleted file mode 100644 index b3cf73d7..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ -export type Keys = { - [amount: number]: string; -}; -/** - * An array of mint keysets - */ -export type MintActiveKeys = { - /** - * Keysets - */ - keysets: Array; -}; -/** - * An array of mint keyset entries. - */ -export type MintAllKeysets = { - /** - * Keysets - */ - keysets: Array; -}; -/** - * A mint keyset. - */ -export type MintKeys = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ - keys: Keys; -}; -/** - * A mint keyset entry. - */ -export type MintKeyset = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Whether the keyset is active or not. - */ - active: boolean; - /** - * Input fee for keyset (in ppk) - */ - input_fee_ppk?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js deleted file mode 100644 index 0469340a..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=keys.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js.map deleted file mode 100644 index ef1ebcb1..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/keys.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../../../../src/model/types/mint/keys.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.d.ts deleted file mode 100644 index 8cc87efd..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; -/** - * Cashu api error - */ -export type ApiError = { - /** - * Error message - */ - error?: string; - /** - * HTTP error code - */ - code?: number; - /** - * Detailed error message - */ - detail?: string; -}; -/** - * Entries of CheckStateResponse with state of the proof - */ -export type ProofState = { - Y: string; - state: CheckStateEnum; - witness: string | null; -}; -/** - * Enum for the state of a proof - */ -export declare enum CheckStateEnum { - UNSPENT = "UNSPENT", - PENDING = "PENDING", - SPENT = "SPENT" -} -/** - * Response when checking proofs if they are spendable. Should not rely on this for receiving, since it can be easily cheated. - */ -export type CheckStateResponse = { - /** - * - */ - states: Array; -} & ApiError; -/** - * Response from mint at /info endpoint - */ -export type GetInfoResponse = { - name: string; - pubkey: string; - version: string; - description?: string; - description_long?: string; - contact: Array; - nuts: { - '4': { - methods: Array; - disabled: boolean; - }; - '5': { - methods: Array; - disabled: boolean; - }; - '7'?: { - supported: boolean; - }; - '8'?: { - supported: boolean; - }; - '9'?: { - supported: boolean; - }; - '10'?: { - supported: boolean; - }; - '11'?: { - supported: boolean; - }; - '12'?: { - supported: boolean; - }; - '13'?: { - supported: boolean; - }; - }; - motd?: string; -}; -/** - * Response from the mint after requesting a melt quote - */ -export type MeltQuoteResponse = { - /** - * Quote ID - */ - quote: string; - /** - * Amount to be melted - */ - amount: number; - /** - * Fee reserve to be added to the amount - */ - fee_reserve: number; - /** - * State of the melt quote - */ - state: MeltQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; - /** - * preimage of the paid invoice. is null if it the invoice has not been paid yet. can be null, depending on which LN-backend the mint uses - */ - payment_preimage: string | null; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change?: Array; -} & ApiError; -export declare enum MeltQuoteState { - UNPAID = "UNPAID", - PENDING = "PENDING", - PAID = "PAID" -} -export type MintContactInfo = { - method: string; - info: string; -}; -export declare enum MintQuoteState { - UNPAID = "UNPAID", - PAID = "PAID", - ISSUED = "ISSUED" -} -/** - * Response from the mint after requesting a mint - */ -export type MintQuoteResponse = { - /** - * Payment request - */ - request: string; - /** - * Quote ID - */ - quote: string; - /** - * State of the mint quote - */ - state: MintQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; -} & ApiError; -/** - * Response from the mint after requesting a mint - */ -export type MintResponse = { - signatures: Array; -} & ApiError; -/** - * Response from mint at /v1/restore endpoint - */ -export type PostRestoreResponse = { - outputs: Array; - promises: Array; -}; -/** - * Blinded signature as it is received from the mint - */ -export type SerializedBlindedSignature = { - /** - * keyset id for indicating which public key was used to sign the blinded message - */ - id: string; - /** - * Amount denominated in Satoshi - */ - amount: number; - /** - * Blinded signature - */ - C_: string; -}; -/** - * Ecash to other MoE swap method, displayed in @type {GetInfoResponse} - */ -export type SwapMethod = { - method: string; - unit: string; - min_amount: number; - max_amount: number; -}; -/** - * Response from the mint after performing a split action - */ -export type SwapResponse = { - /** - * represents the outputs after the split - */ - signatures: Array; -} & ApiError; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js deleted file mode 100644 index 45568ce1..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Enum for the state of a proof - */ -export var CheckStateEnum; -(function (CheckStateEnum) { - CheckStateEnum["UNSPENT"] = "UNSPENT"; - CheckStateEnum["PENDING"] = "PENDING"; - CheckStateEnum["SPENT"] = "SPENT"; -})(CheckStateEnum || (CheckStateEnum = {})); -export var MeltQuoteState; -(function (MeltQuoteState) { - MeltQuoteState["UNPAID"] = "UNPAID"; - MeltQuoteState["PENDING"] = "PENDING"; - MeltQuoteState["PAID"] = "PAID"; -})(MeltQuoteState || (MeltQuoteState = {})); -export var MintQuoteState; -(function (MintQuoteState) { - MintQuoteState["UNPAID"] = "UNPAID"; - MintQuoteState["PAID"] = "PAID"; - MintQuoteState["ISSUED"] = "ISSUED"; -})(MintQuoteState || (MintQuoteState = {})); -//# sourceMappingURL=responses.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js.map deleted file mode 100644 index 4b88cb17..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/mint/responses.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../../../../src/model/types/mint/responses.ts"],"names":[],"mappings":"AA6BA;;GAEG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;AAChB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AA0FD,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;AACd,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAOD,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AAClB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.d.ts deleted file mode 100644 index fe7b398d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export * from './payloads'; -export * from './responses'; -export * from './tokens'; -export * from './paymentRequests'; -/** - * represents a single Cashu proof. - */ -export type Proof = { - /** - * Keyset id, used to link proofs to a mint an its MintKeys. - */ - id: string; - /** - * Amount denominated in Satoshis. Has to match the amount of the mints signing key. - */ - amount: number; - /** - * The initial secret that was (randomly) chosen for the creation of this proof. - */ - secret: string; - /** - * The unblinded signature for this secret, signed by the mints private key. - */ - C: string; -}; -/** - * response when after receiving a single TokenEntry - */ -export type ReceiveTokenEntryResponse = { - /** - * Received proofs - */ - proofs: Array; -}; -/** - * Payload that needs to be sent to the mint when paying a lightning invoice. - */ -export type PaymentPayload = { - /** - * Payment request/Lighting invoice that should get paid by the mint. - */ - pr: string; - /** - * Proofs, matching Lightning invoices amount + fees. - */ - proofs: Array; -}; -/** - * @deprecated Token V2 - * should no longer be used - */ -export type TokenV2 = { - proofs: Array; - mints: Array<{ - url: string; - ids: Array; - }>; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js deleted file mode 100644 index 23f002de..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './payloads'; -export * from './responses'; -export * from './tokens'; -export * from './paymentRequests'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js.map deleted file mode 100644 index 0aa5f950..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/model/types/wallet/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.d.ts deleted file mode 100644 index 3988ed67..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Proof } from './index'; -/** - * Data that the library needs to hold in memory while it awaits the blinded signatures for the mint. It is later used for unblinding the signatures. - */ -export type BlindingData = { - /** - * Blinded messages sent to the mint for signing. - */ - blindedMessages: Array; - /** - * secrets, kept client side for constructing proofs later. - */ - secrets: Array; - /** - * Blinding factor used for blinding messages and unblinding signatures after they are received from the mint. - */ - blindingFactors: Array; -}; -/** - * Payload that needs to be sent to the mint when melting. Includes Return for overpaid fees - */ -export type MeltPayload = { - /** - * ID of the melt quote - */ - quote: string; - /** - * Inputs (Proofs) to be melted - */ - inputs: Array; - /** - * Blank outputs (blinded messages) that can be filled by the mint to return overpaid fees - */ - outputs: Array; -}; -/** - * Payload that needs to be send to the mint to request a melt quote - */ -export type MeltQuotePayload = { - /** - * Unit to be melted - */ - unit: string; - /** - * Request to be melted to - */ - request: string; -}; -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintPayload = { - /** - * Quote ID received from the mint. - */ - quote: string; - /** - * Outputs (blinded messages) to be signed by the mint. - */ - outputs: Array; -}; -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintQuotePayload = { - /** - * Unit to be minted - */ - unit: string; - /** - * Amount to be minted - */ - amount: number; - /** - * Description for the invoice - */ - description?: string; -}; -/** - * Payload that needs to be sent to the mint when performing a split action - */ -export type SwapPayload = { - /** - * Inputs to the split operation - */ - inputs: Array; - /** - * Outputs (blinded messages) to be signed by the mint - */ - outputs: Array; -}; -/** - * blinded message for sending to the mint - */ -export type SerializedBlindedMessage = { - /** - * amount - */ - amount: number; - /** - * Blinded message - */ - B_: string; - /** - * Keyset id - */ - id: string; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js deleted file mode 100644 index c500e0a4..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=payloads.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js.map deleted file mode 100644 index abbcca60..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/payloads.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../../../../../src/model/types/wallet/payloads.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.d.ts deleted file mode 100644 index cab0ee17..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Proof } from './index'; -export type RawTransport = { - t: PaymentRequestTransportType; - a: string; - g?: Array>; -}; -export type RawPaymentRequest = { - i?: string; - a?: number; - u?: string; - s?: boolean; - m?: Array; - d?: string; - t: Array; -}; -export type PaymentRequestTransport = { - type: PaymentRequestTransportType; - target: string; - tags?: Array>; -}; -export declare enum PaymentRequestTransportType { - POST = "post", - NOSTR = "nostr" -} -export type PaymentRequestPayload = { - id?: string; - memo?: string; - unit: string; - mint: string; - proofs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js deleted file mode 100644 index 0c0407e8..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js +++ /dev/null @@ -1,6 +0,0 @@ -export var PaymentRequestTransportType; -(function (PaymentRequestTransportType) { - PaymentRequestTransportType["POST"] = "post"; - PaymentRequestTransportType["NOSTR"] = "nostr"; -})(PaymentRequestTransportType || (PaymentRequestTransportType = {})); -//# sourceMappingURL=paymentRequests.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js.map deleted file mode 100644 index 8f53682a..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/paymentRequests.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"paymentRequests.js","sourceRoot":"","sources":["../../../../../../src/model/types/wallet/paymentRequests.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACtC,4CAAa,CAAA;IACb,8CAAe,CAAA;AAChB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.d.ts deleted file mode 100644 index 43207639..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MeltQuoteResponse } from '../mint'; -import { Proof, Token } from './index'; -/** - * Response after paying a Lightning invoice - */ -export type MeltProofsResponse = { - /** - * if false, the proofs have not been invalidated and the payment can be tried later again with the same proofs - */ - quote: MeltQuoteResponse; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change: Array; -}; -/** - * Response when receiving a complete token. - */ -export type ReceiveResponse = { - /** - * Successfully received Cashu Token - */ - token: Token; - /** - * TokenEntries that had errors. No error will be thrown, but clients can choose to handle tokens with errors accordingly. - */ - tokensWithErrors: Token | undefined; -}; -/** - * response after sending - */ -export type SendResponse = { - /** - * Proofs that exceeded the needed amount - */ - keep: Array; - /** - * Proofs to be sent, matching the chosen amount - */ - send: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js deleted file mode 100644 index 5449a1d5..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=responses.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js.map deleted file mode 100644 index b4764227..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/responses.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../../../../src/model/types/wallet/responses.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.d.ts deleted file mode 100644 index f8a917c9..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Proof } from './index'; -/** - * A Cashu token - */ -export type Token = { - /** - * the mints URL - */ - mint: string; - /** - * a list of proofs - */ - proofs: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; -/** - * Template for a Proof inside a V4 Token - */ -export type V4ProofTemplate = { - /** - * Amount - */ - a: number; - /** - * Secret - */ - s: string; - /** - * Signature - */ - c: Uint8Array; -}; -/** - * TokenEntry in a V4 Token - */ -export type V4InnerToken = { - /** - * ID - */ - i: Uint8Array; - /** - * Proofs - */ - p: Array; -}; -/** - * Template for a V4 Token - */ -export type TokenV4Template = { - /** - * TokenEntries - */ - t: Array; - /** - * Memo - */ - d: string; - /** - * Mint Url - */ - m: string; - /** - * Unit - */ - u: string; -}; -/** - * A Cashu token - */ -export type DeprecatedToken = { - /** - * token entries - */ - token: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; -/** - * TokenEntry that stores proofs and mints - */ -type TokenEntry = { - /** - * a list of proofs - */ - proofs: Array; - /** - * the mints URL - */ - mint: string; -}; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js deleted file mode 100644 index 4fa5c866..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=tokens.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js.map deleted file mode 100644 index 9a146e93..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/model/types/wallet/tokens.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../../src/model/types/wallet/tokens.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/request.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/request.d.ts deleted file mode 100644 index 88b4f085..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/request.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -type RequestArgs = { - endpoint: string; - requestBody?: Record; - headers?: Record; -}; -type RequestOptions = RequestArgs & Omit; -/** - * An object containing any custom settings that you want to apply to the global fetch method. - * @param options See possible options here: https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - */ -export declare function setGlobalRequestOptions(options: Partial): void; -export default function request(options: RequestOptions): Promise; -export {}; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/request.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/request.js deleted file mode 100644 index 142566a6..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/request.js +++ /dev/null @@ -1,111 +0,0 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -import { HttpResponseError } from './model/Errors'; -var globalRequestOptions = {}; -/** - * An object containing any custom settings that you want to apply to the global fetch method. - * @param options See possible options here: https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - */ -export function setGlobalRequestOptions(options) { - globalRequestOptions = options; -} -function _request(_a) { - var endpoint = _a.endpoint, requestBody = _a.requestBody, requestHeaders = _a.headers, options = __rest(_a, ["endpoint", "requestBody", "headers"]); - return __awaiter(this, void 0, void 0, function () { - var body, headers, response, _b, error, detail, err_1; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - body = requestBody ? JSON.stringify(requestBody) : undefined; - headers = __assign(__assign({ Accept: 'application/json, text/plain, */*' }, (body ? { 'Content-Type': 'application/json' } : undefined)), requestHeaders); - return [4 /*yield*/, fetch(endpoint, __assign({ body: body, headers: headers }, options))]; - case 1: - response = _c.sent(); - if (!!response.ok) return [3 /*break*/, 3]; - return [4 /*yield*/, response.json().catch(function () { return ({ error: 'bad response' }); })]; - case 2: - _b = _c.sent(), error = _b.error, detail = _b.detail; - throw new HttpResponseError(error || detail || 'bad response', response.status); - case 3: - _c.trys.push([3, 5, , 6]); - return [4 /*yield*/, response.json()]; - case 4: return [2 /*return*/, _c.sent()]; - case 5: - err_1 = _c.sent(); - console.error('Failed to parse HTTP response', err_1); - throw new HttpResponseError('bad response', response.status); - case 6: return [2 /*return*/]; - } - }); - }); -} -export default function request(options) { - return __awaiter(this, void 0, void 0, function () { - var data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, _request(__assign(__assign({}, options), globalRequestOptions))]; - case 1: - data = _a.sent(); - return [2 /*return*/, data]; - } - }); - }); -} -//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/request.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/request.js.map deleted file mode 100644 index 43f5e2c8..00000000 --- a/node_modules/@cashu/cashu-ts/dist/l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MAAM,CAAC,CAAC;;;oBAIzE,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;wBAA5B,sBAAO,SAAqB,EAAC;;;oBAE7B,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAG,CAAC,CAAC;oBACpD,MAAM,IAAI,iBAAiB,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;;;;;CAE9D;AAED,MAAM,CAAC,OAAO,UAAgB,OAAO,CAAI,OAAuB;;;;;wBAClD,qBAAM,QAAQ,uBAAM,OAAO,GAAK,oBAAoB,EAAG,EAAA;;oBAA9D,IAAI,GAAG,SAAuD;oBACpE,sBAAO,IAAS,EAAC;;;;CACjB"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.d.ts deleted file mode 100644 index ca0c156f..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Keys, Proof, Token } from './model/types/index.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -/** - * Splits the amount into denominations of the provided @param keyset - * @param value amount to split - * @param keyset keys to look up split amounts - * @param split? optional custom split amounts - * @param order? optional order for split amounts (default: "asc") - * @returns Array of split amounts - * @throws Error if @param split amount is greater than @param value amount - */ -export declare function splitAmount(value: number, keyset: Keys, split?: Array, order?: 'desc' | 'asc'): Array; -/** - * Creates a list of amounts to keep based on the proofs we have and the proofs we want to reach. - * @param proofsWeHave complete set of proofs stored (from current mint) - * @param amountToKeep amount to keep - * @param keys keys of current keyset - * @param targetCount the target number of proofs to reach - * @returns an array of amounts to keep - */ -export declare function getKeepAmounts(proofsWeHave: Array, amountToKeep: number, keys: Keys, targetCount: number): Array; -/** - * returns the amounts in the keyset sorted by the order specified - * @param keyset to search in - * @param order order to sort the amounts in - * @returns the amounts in the keyset sorted by the order specified - */ -export declare function getKeysetAmounts(keyset: Keys, order?: 'asc' | 'desc'): Array; -/** - * Checks if the provided amount is in the keyset. - * @param amount amount to check - * @param keyset to search in - * @returns true if the amount is in the keyset, false otherwise - */ -export declare function hasCorrespondingKey(amount: number, keyset: Keys): boolean; -/** - * Converts a bytes array to a number. - * @param bytes to convert to number - * @returns number - */ -export declare function bytesToNumber(bytes: Uint8Array): bigint; -/** - * Converts a hex string to a number. - * @param hex to convert to number - * @returns number - */ -export declare function hexToNumber(hex: string): bigint; -/** - * Checks wether a proof or a list of proofs contains a non-hex id - * @param p Proof or list of proofs - * @returns boolean - */ -export declare function hasNonHexId(p: Proof | Array): boolean; -export declare function bigIntStringify(_key: unknown, value: T): string | T; -/** - * Helper function to encode a v3 cashu token - * @param token to encode - * @returns encoded token - */ -export declare function getEncodedTokenV3(token: Token): string; -/** - * Helper function to encode a cashu token (defaults to v4 if keyset id allows it) - * @param token - * @param [opts] - */ -export declare function getEncodedToken(token: Token, opts?: { - version: 3 | 4; -}): string; -export declare function getEncodedTokenV4(token: Token): string; -/** - * Helper function to decode cashu tokens into object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu token object - */ -export declare function getDecodedToken(token: string): Token; -/** - * Helper function to decode different versions of cashu tokens into an object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu Token object - */ -export declare function handleTokens(token: string): Token; -/** - * Returns the keyset id of a set of keys - * @param keys keys object to derive keyset id from - * @returns - */ -export declare function deriveKeysetId(keys: Keys): string; -export declare function mergeUInt8Arrays(a1: Uint8Array, a2: Uint8Array): Uint8Array; -export declare function sortProofsById(proofs: Array): Proof[]; -export declare function isObj(v: unknown): v is object; -export declare function checkResponse(data: { - error?: string; - detail?: string; -}): void; -export declare function joinUrls(...parts: Array): string; -export declare function sanitizeUrl(url: string): string; -export declare function sumProofs(proofs: Array): number; -export declare function decodePaymentRequest(paymentRequest: string): PaymentRequest; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js deleted file mode 100644 index 3afb4a2d..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js +++ /dev/null @@ -1,320 +0,0 @@ -import { encodeBase64ToJson, encodeBase64toUint8, encodeJsonToBase64, encodeUint8toBase64Url } from './base64.js'; -import { TOKEN_PREFIX, TOKEN_VERSION } from './utils/Constants.js'; -import { bytesToHex, hexToBytes } from '@noble/curves/abstract/utils'; -import { sha256 } from '@noble/hashes/sha256'; -import { decodeCBOR, encodeCBOR } from './cbor.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -/** - * Splits the amount into denominations of the provided @param keyset - * @param value amount to split - * @param keyset keys to look up split amounts - * @param split? optional custom split amounts - * @param order? optional order for split amounts (default: "asc") - * @returns Array of split amounts - * @throws Error if @param split amount is greater than @param value amount - */ -export function splitAmount(value, keyset, split, order) { - if (split) { - if (split.reduce(function (a, b) { return a + b; }, 0) > value) { - throw new Error("Split is greater than total amount: ".concat(split.reduce(function (a, b) { return a + b; }, 0), " > ").concat(value)); - } - split.forEach(function (amt) { - if (!hasCorrespondingKey(amt, keyset)) { - throw new Error('Provided amount preferences do not match the amounts of the mint keyset.'); - } - }); - value = - value - - split.reduce(function (curr, acc) { - return curr + acc; - }, 0); - } - else { - split = []; - } - var sortedKeyAmounts = getKeysetAmounts(keyset); - sortedKeyAmounts.forEach(function (amt) { - var q = Math.floor(value / amt); - for (var i = 0; i < q; ++i) - split === null || split === void 0 ? void 0 : split.push(amt); - value %= amt; - }); - return split.sort(function (a, b) { return (order === 'desc' ? b - a : a - b); }); -} -/** - * Creates a list of amounts to keep based on the proofs we have and the proofs we want to reach. - * @param proofsWeHave complete set of proofs stored (from current mint) - * @param amountToKeep amount to keep - * @param keys keys of current keyset - * @param targetCount the target number of proofs to reach - * @returns an array of amounts to keep - */ -export function getKeepAmounts(proofsWeHave, amountToKeep, keys, targetCount) { - // determines amounts we need to reach the targetCount for each amount based on the amounts of the proofs we have - // it tries to select amounts so that the proofs we have and the proofs we want reach the targetCount - var amountsWeWant = []; - var amountsWeHave = proofsWeHave.map(function (p) { return p.amount; }); - var sortedKeyAmounts = getKeysetAmounts(keys, 'asc'); - sortedKeyAmounts.forEach(function (amt) { - var countWeHave = amountsWeHave.filter(function (a) { return a === amt; }).length; - var countWeWant = Math.max(targetCount - countWeHave, 0); - for (var i = 0; i < countWeWant; ++i) { - if (amountsWeWant.reduce(function (a, b) { return a + b; }, 0) + amt > amountToKeep) { - break; - } - amountsWeWant.push(amt); - } - }); - // use splitAmount to fill the rest between the sum of amountsWeHave and amountToKeep - var amountDiff = amountToKeep - amountsWeWant.reduce(function (a, b) { return a + b; }, 0); - if (amountDiff) { - var remainingAmounts = splitAmount(amountDiff, keys); - remainingAmounts.forEach(function (amt) { - amountsWeWant.push(amt); - }); - } - var sortedAmountsWeWant = amountsWeWant.sort(function (a, b) { return a - b; }); - return sortedAmountsWeWant; -} -/** - * returns the amounts in the keyset sorted by the order specified - * @param keyset to search in - * @param order order to sort the amounts in - * @returns the amounts in the keyset sorted by the order specified - */ -export function getKeysetAmounts(keyset, order) { - if (order === void 0) { order = 'desc'; } - if (order == 'desc') { - return Object.keys(keyset) - .map(function (k) { return parseInt(k); }) - .sort(function (a, b) { return b - a; }); - } - return Object.keys(keyset) - .map(function (k) { return parseInt(k); }) - .sort(function (a, b) { return a - b; }); -} -/** - * Checks if the provided amount is in the keyset. - * @param amount amount to check - * @param keyset to search in - * @returns true if the amount is in the keyset, false otherwise - */ -export function hasCorrespondingKey(amount, keyset) { - return amount in keyset; -} -/** - * Converts a bytes array to a number. - * @param bytes to convert to number - * @returns number - */ -export function bytesToNumber(bytes) { - return hexToNumber(bytesToHex(bytes)); -} -/** - * Converts a hex string to a number. - * @param hex to convert to number - * @returns number - */ -export function hexToNumber(hex) { - return BigInt("0x".concat(hex)); -} -function isValidHex(str) { - return /^[a-f0-9]*$/i.test(str); -} -/** - * Checks wether a proof or a list of proofs contains a non-hex id - * @param p Proof or list of proofs - * @returns boolean - */ -export function hasNonHexId(p) { - if (Array.isArray(p)) { - return p.some(function (proof) { return !isValidHex(proof.id); }); - } - return isValidHex(p.id); -} -//used for json serialization -export function bigIntStringify(_key, value) { - return typeof value === 'bigint' ? value.toString() : value; -} -/** - * Helper function to encode a v3 cashu token - * @param token to encode - * @returns encoded token - */ -export function getEncodedTokenV3(token) { - var v3TokenObj = { token: [{ mint: token.mint, proofs: token.proofs }] }; - if (token.unit) { - v3TokenObj.unit = token.unit; - } - if (token.memo) { - v3TokenObj.memo = token.memo; - } - return TOKEN_PREFIX + TOKEN_VERSION + encodeJsonToBase64(v3TokenObj); -} -/** - * Helper function to encode a cashu token (defaults to v4 if keyset id allows it) - * @param token - * @param [opts] - */ -export function getEncodedToken(token, opts) { - var nonHex = hasNonHexId(token.proofs); - if (nonHex || (opts === null || opts === void 0 ? void 0 : opts.version) === 3) { - if ((opts === null || opts === void 0 ? void 0 : opts.version) === 4) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - return getEncodedTokenV3(token); - } - return getEncodedTokenV4(token); -} -export function getEncodedTokenV4(token) { - var nonHex = hasNonHexId(token.proofs); - if (nonHex) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - var idMap = {}; - var mint = token.mint; - for (var i = 0; i < token.proofs.length; i++) { - var proof = token.proofs[i]; - if (idMap[proof.id]) { - idMap[proof.id].push(proof); - } - else { - idMap[proof.id] = [proof]; - } - } - var tokenTemplate = { - m: mint, - u: token.unit || 'sat', - t: Object.keys(idMap).map(function (id) { return ({ - i: hexToBytes(id), - p: idMap[id].map(function (p) { return ({ a: p.amount, s: p.secret, c: hexToBytes(p.C) }); }) - }); }) - }; - if (token.memo) { - tokenTemplate.d = token.memo; - } - var encodedData = encodeCBOR(tokenTemplate); - var prefix = 'cashu'; - var version = 'B'; - var base64Data = encodeUint8toBase64Url(encodedData); - return prefix + version + base64Data; -} -/** - * Helper function to decode cashu tokens into object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu token object - */ -export function getDecodedToken(token) { - // remove prefixes - var uriPrefixes = ['web+cashu://', 'cashu://', 'cashu:', 'cashu']; - uriPrefixes.forEach(function (prefix) { - if (!token.startsWith(prefix)) { - return; - } - token = token.slice(prefix.length); - }); - return handleTokens(token); -} -/** - * Helper function to decode different versions of cashu tokens into an object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu Token object - */ -export function handleTokens(token) { - var version = token.slice(0, 1); - var encodedToken = token.slice(1); - if (version === 'A') { - var parsedV3Token = encodeBase64ToJson(encodedToken); - if (parsedV3Token.token.length > 1) { - throw new Error('Multi entry token are not supported'); - } - var entry = parsedV3Token.token[0]; - var tokenObj = { - mint: entry.mint, - proofs: entry.proofs, - unit: parsedV3Token.unit || 'sat' - }; - if (parsedV3Token.memo) { - tokenObj.memo = parsedV3Token.memo; - } - return tokenObj; - } - else if (version === 'B') { - var uInt8Token = encodeBase64toUint8(encodedToken); - var tokenData = decodeCBOR(uInt8Token); - var proofs_1 = []; - tokenData.t.forEach(function (t) { - return t.p.forEach(function (p) { - proofs_1.push({ - secret: p.s, - C: bytesToHex(p.c), - amount: p.a, - id: bytesToHex(t.i) - }); - }); - }); - var decodedToken = { mint: tokenData.m, proofs: proofs_1, unit: tokenData.u || 'sat' }; - if (tokenData.d) { - decodedToken.memo = tokenData.d; - } - return decodedToken; - } - throw new Error('Token version is not supported'); -} -/** - * Returns the keyset id of a set of keys - * @param keys keys object to derive keyset id from - * @returns - */ -export function deriveKeysetId(keys) { - var pubkeysConcat = Object.entries(keys) - .sort(function (a, b) { return +a[0] - +b[0]; }) - .map(function (_a) { - var pubKey = _a[1]; - return hexToBytes(pubKey); - }) - .reduce(function (prev, curr) { return mergeUInt8Arrays(prev, curr); }, new Uint8Array()); - var hash = sha256(pubkeysConcat); - var hashHex = Buffer.from(hash).toString('hex').slice(0, 14); - return '00' + hashHex; -} -export function mergeUInt8Arrays(a1, a2) { - // sum of individual array lengths - var mergedArray = new Uint8Array(a1.length + a2.length); - mergedArray.set(a1); - mergedArray.set(a2, a1.length); - return mergedArray; -} -export function sortProofsById(proofs) { - return proofs.sort(function (a, b) { return a.id.localeCompare(b.id); }); -} -export function isObj(v) { - return typeof v === 'object'; -} -export function checkResponse(data) { - if (!isObj(data)) - return; - if ('error' in data && data.error) { - throw new Error(data.error); - } - if ('detail' in data && data.detail) { - throw new Error(data.detail); - } -} -export function joinUrls() { - var parts = []; - for (var _i = 0; _i < arguments.length; _i++) { - parts[_i] = arguments[_i]; - } - return parts.map(function (part) { return part.replace(/(^\/+|\/+$)/g, ''); }).join('/'); -} -export function sanitizeUrl(url) { - return url.replace(/\/$/, ''); -} -export function sumProofs(proofs) { - return proofs.reduce(function (acc, proof) { return acc + proof.amount; }, 0); -} -export function decodePaymentRequest(paymentRequest) { - return PaymentRequest.fromEncodedRequest(paymentRequest); -} -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js.map deleted file mode 100644 index 2e59fd8a..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,MAAM,aAAa,CAAC;AAUrB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAC1B,KAAa,EACb,MAAY,EACZ,KAAqB,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C,OAAO,MAAM,CAAC,MAAM,CAAC,UAAC,GAAW,EAAE,KAAY,IAAK,OAAA,GAAG,GAAG,KAAK,CAAC,MAAM,EAAlB,CAAkB,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,cAAsB;IAC1D,OAAO,cAAc,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.d.ts b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.d.ts deleted file mode 100644 index f4f7cf81..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * per protocol definition since tokenV3 tokens have a prefix and a version number - */ -declare const TOKEN_VERSION = "A"; -declare const TOKEN_PREFIX = "cashu"; -export { TOKEN_VERSION, TOKEN_PREFIX }; diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js deleted file mode 100644 index c14561d0..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * per protocol definition since tokenV3 tokens have a prefix and a version number - */ -var TOKEN_VERSION = 'A'; -var TOKEN_PREFIX = 'cashu'; -export { TOKEN_VERSION, TOKEN_PREFIX }; -//# sourceMappingURL=Constants.js.map \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js.map b/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js.map deleted file mode 100644 index 88dc72c3..00000000 --- a/node_modules/@cashu/cashu-ts/dist/lib/es6/utils/Constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../../../src/utils/Constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,IAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,IAAM,YAAY,GAAG,OAAO,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/@cashu/cashu-ts/jest.config.ts b/node_modules/@cashu/cashu-ts/jest.config.ts deleted file mode 100644 index b20645ec..00000000 --- a/node_modules/@cashu/cashu-ts/jest.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default { - transform: { '^.+\\.ts?$': 'ts-jest' }, - testEnvironment: 'node', - resolver: 'ts-jest-resolver', - testRegex: '/test/.*\\.(test|spec)?\\.(ts|tsx)$', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], - setupFilesAfterEnv: ['./test/_replace-native-fetch.ts'] -}; diff --git a/node_modules/@cashu/cashu-ts/migration-2.0.0.md b/node_modules/@cashu/cashu-ts/migration-2.0.0.md index 5fc17b77..69b1d81c 100644 --- a/node_modules/@cashu/cashu-ts/migration-2.0.0.md +++ b/node_modules/@cashu/cashu-ts/migration-2.0.0.md @@ -53,7 +53,7 @@ To check the state of a `Proof`, call `CashuWallet.checkProofsStates`. `checkPro #### renamed functions - in `SendResponse`, `returnChange` is now called `keep` -- `CashuWallet.mintTokens()` is now called `CashuWallet.mintProofs()` +- `CashuWallet.mintTokens()` is now called `CashuWallet.mintProofs()` and returns > instead of Promise<{proofs: Array}> - `CashuWallet.meltTokens()` is now called `CashuWallet.meltProofs()` - `CashuMint.split()` is now called `CashuMint.swap()` diff --git a/node_modules/@cashu/cashu-ts/package.json b/node_modules/@cashu/cashu-ts/package.json index b40a5680..de098919 100644 --- a/node_modules/@cashu/cashu-ts/package.json +++ b/node_modules/@cashu/cashu-ts/package.json @@ -1,9 +1,14 @@ { "name": "@cashu/cashu-ts", - "version": "2.0.0-rc1", + "version": "2.7.2", "description": "cashu library for communicating with a cashu mint", - "main": "dist/lib/es5/index.js", - "module": "dist/lib/es6/index.js", + "type": "module", + "engines": { + "node": ">=22.4.0" + }, + "main": "lib/cashu-ts.cjs", + "module": "lib/cashu-ts.es.js", + "types": "lib/types/index.d.ts", "repository": { "type": "git", "url": "git+https://github.com/cashubtc/cashu-ts" @@ -12,14 +17,86 @@ "url": "https://github.com/cashubtc/cashu-ts/issues" }, "scripts": { - "compile": "rm -rf dist/lib && tsc && tsc --build tsconfig.es5.json", - "test": "jest --coverage --testPathIgnorePatterns ./test/integration.test.ts", - "test-integration": "jest --coverage --testPathPattern ./test/integration.test.ts", + "compile": "vite build && node post-process-dts.js", + "compile:standalone": "BUILD_FORMAT=iife vite build && node post-process-dts.js", + "test:bundler": "node test/consumer-bundler/run-test.js", + "test:commonjs": "node test/consumer-commonjs/run-test.js", + "test:iife": "node test/consumer-iife/run-test.js", + "test:nodenext": "node test/consumer-nodenext/run-test.js", + "test:reactnative": "node test/consumer-reactnative/run-test.js", + "test:prepare": "npx playwright install chromium --with-deps", + "test": "vitest run --coverage --project node --project browser", + "test-integration": "vitest run --coverage --project integration", "dev": "tsc --watch", - "lint": "eslint --ext .js,.ts . --fix", + "lint": "eslint '**/*.{js,ts}' --fix", + "check-lint": "eslint '**/*.{js,ts}'", "format": "prettier --write .", "check-format": "prettier --check .", - "typedoc": "typedoc src/index.ts" + "typedoc": "typedoc src/index.ts", + "api:check": "npm run compile && api-extractor run", + "api:update": "npm run compile && api-extractor run --local" + }, + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "require": "./lib/cashu-ts.cjs", + "import": "./lib/cashu-ts.es.js" + }, + "./crypto/client": { + "types": "./lib/types/crypto/client/index.d.ts", + "require": "./lib/crypto/client.cjs", + "import": "./lib/crypto/client.es.js" + }, + "./crypto/common": { + "types": "./lib/types/crypto/common/index.d.ts", + "require": "./lib/crypto/common.cjs", + "import": "./lib/crypto/common.es.js" + }, + "./crypto/mint": { + "types": "./lib/types/crypto/mint/index.d.ts", + "require": "./lib/crypto/mint.cjs", + "import": "./lib/crypto/mint.es.js" + }, + "./crypto/util": { + "types": "./lib/types/crypto/util/utils.d.ts", + "require": "./lib/crypto/util.cjs", + "import": "./lib/crypto/util.es.js" + }, + "./crypto/client/NUT09": { + "types": "./lib/types/crypto/client/NUT09.d.ts", + "require": "./lib/crypto/client/NUT09.cjs", + "import": "./lib/crypto/client/NUT09.es.js" + }, + "./crypto/client/NUT11": { + "types": "./lib/types/crypto/client/NUT11.d.ts", + "require": "./lib/crypto/client/NUT11.cjs", + "import": "./lib/crypto/client/NUT11.es.js" + }, + "./crypto/client/NUT12": { + "types": "./lib/types/crypto/client/NUT12.d.ts", + "require": "./lib/crypto/client/NUT12.cjs", + "import": "./lib/crypto/client/NUT12.es.js" + }, + "./crypto/client/NUT20": { + "types": "./lib/types/crypto/client/NUT20.d.ts", + "require": "./lib/crypto/client/NUT20.cjs", + "import": "./lib/crypto/client/NUT20.es.js" + }, + "./crypto/common/NUT11": { + "types": "./lib/types/crypto/common/NUT11.d.ts", + "require": "./lib/crypto/common/NUT11.cjs", + "import": "./lib/crypto/common/NUT11.es.js" + }, + "./crypto/mint/NUT11": { + "types": "./lib/types/crypto/mint/NUT11.d.ts", + "require": "./lib/crypto/mint/NUT11.cjs", + "import": "./lib/crypto/mint/NUT11.es.js" + }, + "./crypto/mint/NUT12": { + "types": "./lib/types/crypto/mint/NUT12.d.ts", + "require": "./lib/crypto/mint/NUT12.cjs", + "import": "./lib/crypto/mint/NUT12.es.js" + } }, "keywords": [ "cashu" @@ -27,30 +104,42 @@ "author": "gandlaf21", "license": "MIT", "devDependencies": { - "@types/jest": "^29.5.1", + "@eslint/js": "^9.31.0", + "@microsoft/api-extractor": "^7.52.4", "@types/node-fetch": "^2.6.4", - "@typescript-eslint/eslint-plugin": "^5.59.2", - "@typescript-eslint/parser": "^5.59.2", - "eslint": "^8.39.0", - "eslint-config-standard-with-typescript": "^34.0.1", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-n": "^15.7.0", - "eslint-plugin-promise": "^6.1.1", - "jest": "^29.5.0", - "nock": "^13.3.3", - "node-fetch": "^2.7.0", - "prettier": "^2.8.8", - "ts-jest": "^29.1.0", - "ts-jest-resolver": "^2.0.1", - "ts-node": "^10.9.1", - "typedoc": "^0.24.7", - "typescript": "^5.0.4" + "@types/ws": "^8.5.10", + "@typescript-eslint/eslint-plugin": "^8.38.0", + "@typescript-eslint/parser": "^8.38.0", + "@vitest/browser": "^3.2.4", + "@vitest/coverage-v8": "^3.2.4", + "eslint": "^9.31.0", + "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-n": "^17.21.1", + "eslint-plugin-promise": "^7.2.1", + "globals": "^16.3.0", + "mock-socket": "^9.3.1", + "msw": "^2.6.6", + "node-fetch": "^3.3.2", + "playwright": "^1.54.1", + "prettier": "^3.6.2", + "prettier-plugin-jsdoc": "^1.3.3", + "replace-in-file": "^8.3.0", + "tmp-promise": "^3.0.3", + "ts-node": "^10.9.2", + "typedoc": "^0.28.8", + "typescript": "^5.7.2", + "typescript-eslint": "^8.38.0", + "vite": "^7.0.6", + "vite-plugin-dts": "^4.5.4", + "vite-plugin-node-polyfills": "^0.24.0", + "vitest": "^3.2.4", + "ws": "^8.16.0" }, "dependencies": { - "@cashu/crypto": "^0.2.7", - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@scure/bip32": "^1.3.3", - "buffer": "^6.0.3" + "@noble/curves": "^1.9.5", + "@noble/hashes": "^1.5.0", + "@scure/bip32": "^1.5.0" } } diff --git a/node_modules/@cashu/cashu-ts/src/CashuMint.ts b/node_modules/@cashu/cashu-ts/src/CashuMint.ts deleted file mode 100644 index b86a07eb..00000000 --- a/node_modules/@cashu/cashu-ts/src/CashuMint.ts +++ /dev/null @@ -1,443 +0,0 @@ -import type { - CheckStatePayload, - CheckStateResponse, - GetInfoResponse, - MeltPayload, - MintActiveKeys, - MintAllKeysets, - PostRestoreResponse, - MintQuoteResponse, - SerializedBlindedMessage, - SwapPayload, - SwapResponse, - MintQuotePayload, - MintPayload, - MintResponse, - PostRestorePayload, - MeltQuotePayload, - MeltQuoteResponse -} from './model/types/index.js'; -import { MeltQuoteState } from './model/types/index.js'; -import request from './request.js'; -import { isObj, joinUrls, sanitizeUrl } from './utils.js'; -import { - MeltQuoteResponsePaidDeprecated, - handleMeltQuoteResponseDeprecated -} from './legacy/nut-05.js'; -import { - MintQuoteResponsePaidDeprecated, - handleMintQuoteResponseDeprecated -} from './legacy/nut-04.js'; -import { handleMintInfoContactFieldDeprecated } from './legacy/nut-06.js'; -/** - * Class represents Cashu Mint API. This class contains Lower level functions that are implemented by CashuWallet. - */ -class CashuMint { - /** - * @param _mintUrl requires mint URL to create this object - * @param _customRequest if passed, use custom request implementation for network communication with the mint - */ - constructor(private _mintUrl: string, private _customRequest?: typeof request) { - this._mintUrl = sanitizeUrl(_mintUrl); - this._customRequest = _customRequest; - } - - get mintUrl() { - return this._mintUrl; - } - - /** - * fetches mints info at the /info endpoint - * @param mintUrl - * @param customRequest - */ - public static async getInfo( - mintUrl: string, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/info') - }); - const data = handleMintInfoContactFieldDeprecated(response); - return data; - } - /** - * fetches mints info at the /info endpoint - */ - async getInfo(): Promise { - return CashuMint.getInfo(this._mintUrl, this._customRequest); - } - - /** - * Performs a swap operation with ecash inputs and outputs. - * @param mintUrl - * @param swapPayload payload containing inputs and outputs - * @param customRequest - * @returns signed outputs - */ - public static async swap( - mintUrl: string, - swapPayload: SwapPayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const data = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/swap'), - method: 'POST', - requestBody: swapPayload - }); - - if (!isObj(data) || !Array.isArray(data?.signatures)) { - throw new Error(data.detail ?? 'bad response'); - } - - return data; - } - /** - * Performs a swap operation with ecash inputs and outputs. - * @param swapPayload payload containing inputs and outputs - * @returns signed outputs - */ - async swap(swapPayload: SwapPayload): Promise { - return CashuMint.swap(this._mintUrl, swapPayload, this._customRequest); - } - - /** - * Requests a new mint quote from the mint. - * @param mintUrl - * @param mintQuotePayload Payload for creating a new mint quote - * @param customRequest - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - public static async createMintQuote( - mintUrl: string, - mintQuotePayload: MintQuotePayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/quote/bolt11'), - method: 'POST', - requestBody: mintQuotePayload - }); - const data = handleMintQuoteResponseDeprecated(response); - return data; - } - /** - * Requests a new mint quote from the mint. - * @param mintQuotePayload Payload for creating a new mint quote - * @returns the mint will create and return a new mint quote containing a payment request for the specified amount and unit - */ - async createMintQuote(mintQuotePayload: MintQuotePayload): Promise { - return CashuMint.createMintQuote(this._mintUrl, mintQuotePayload, this._customRequest); - } - - /** - * Gets an existing mint quote from the mint. - * @param mintUrl - * @param quote Quote ID - * @param customRequest - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - public static async checkMintQuote( - mintUrl: string, - quote: string, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/quote/bolt11', quote), - method: 'GET' - }); - - const data = handleMintQuoteResponseDeprecated(response); - return data; - } - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - async checkMintQuote(quote: string): Promise { - return CashuMint.checkMintQuote(this._mintUrl, quote, this._customRequest); - } - - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintUrl - * @param mintPayload Payload containing the outputs to get blind signatures on - * @param customRequest - * @returns serialized blinded signatures - */ - public static async mint( - mintUrl: string, - mintPayload: MintPayload, - customRequest?: typeof request - ) { - const requestInstance = customRequest || request; - const data = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/mint/bolt11'), - method: 'POST', - requestBody: mintPayload - }); - - if (!isObj(data) || !Array.isArray(data?.signatures)) { - throw new Error('bad response'); - } - - return data; - } - /** - * Mints new tokens by requesting blind signatures on the provided outputs. - * @param mintPayload Payload containing the outputs to get blind signatures on - * @returns serialized blinded signatures - */ - async mint(mintPayload: MintPayload) { - return CashuMint.mint(this._mintUrl, mintPayload, this._customRequest); - } - - /** - * Requests a new melt quote from the mint. - * @param mintUrl - * @param MeltQuotePayload - * @returns - */ - public static async createMeltQuote( - mintUrl: string, - meltQuotePayload: MeltQuotePayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/quote/bolt11'), - method: 'POST', - requestBody: meltQuotePayload - }); - - const data = handleMeltQuoteResponseDeprecated(response); - - if ( - !isObj(data) || - typeof data?.amount !== 'number' || - typeof data?.fee_reserve !== 'number' || - typeof data?.quote !== 'string' - ) { - throw new Error('bad response'); - } - return data; - } - /** - * Requests a new melt quote from the mint. - * @param MeltQuotePayload - * @returns - */ - async createMeltQuote(meltQuotePayload: MeltQuotePayload): Promise { - return CashuMint.createMeltQuote(this._mintUrl, meltQuotePayload, this._customRequest); - } - - /** - * Gets an existing melt quote. - * @param mintUrl - * @param quote Quote ID - * @returns - */ - public static async checkMeltQuote( - mintUrl: string, - quote: string, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/quote/bolt11', quote), - method: 'GET' - }); - - const data = handleMeltQuoteResponseDeprecated(response); - - if ( - !isObj(data) || - typeof data?.amount !== 'number' || - typeof data?.fee_reserve !== 'number' || - typeof data?.quote !== 'string' || - typeof data?.state !== 'string' || - !Object.values(MeltQuoteState).includes(data.state) - ) { - throw new Error('bad response'); - } - - return data; - } - /** - * Gets an existing melt quote. - * @param quote Quote ID - * @returns - */ - async checkMeltQuote(quote: string): Promise { - return CashuMint.checkMeltQuote(this._mintUrl, quote, this._customRequest); - } - - /** - * Requests the mint to pay for a Bolt11 payment request by providing ecash as inputs to be spent. The inputs contain the amount and the fee_reserves for a Lightning payment. The payload can also contain blank outputs in order to receive back overpaid Lightning fees. - * @param mintUrl - * @param meltPayload - * @param customRequest - * @returns - */ - public static async melt( - mintUrl: string, - meltPayload: MeltPayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const response = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/melt/bolt11'), - method: 'POST', - requestBody: meltPayload - }); - - const data = handleMeltQuoteResponseDeprecated(response); - - if ( - !isObj(data) || - typeof data?.state !== 'string' || - !Object.values(MeltQuoteState).includes(data.state) - ) { - throw new Error('bad response'); - } - - return data; - } - /** - * Ask mint to perform a melt operation. This pays a lightning invoice and destroys tokens matching its amount + fees - * @param meltPayload - * @returns - */ - async melt(meltPayload: MeltPayload): Promise { - return CashuMint.melt(this._mintUrl, meltPayload, this._customRequest); - } - /** - * Checks if specific proofs have already been redeemed - * @param mintUrl - * @param checkPayload - * @param customRequest - * @returns redeemed and unredeemed ordered list of booleans - */ - public static async check( - mintUrl: string, - checkPayload: CheckStatePayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const data = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/checkstate'), - method: 'POST', - requestBody: checkPayload - }); - - if (!isObj(data) || !Array.isArray(data?.states)) { - throw new Error('bad response'); - } - - return data; - } - - /** - * Get the mints public keys - * @param mintUrl - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @param customRequest - * @returns - */ - public static async getKeys( - mintUrl: string, - keysetId?: string, - customRequest?: typeof request - ): Promise { - // backwards compatibility for base64 encoded keyset ids - if (keysetId) { - // make the keysetId url safe - keysetId = keysetId.replace(/\//g, '_').replace(/\+/g, '-'); - } - const requestInstance = customRequest || request; - const data = await requestInstance({ - endpoint: keysetId ? joinUrls(mintUrl, '/v1/keys', keysetId) : joinUrls(mintUrl, '/v1/keys') - }); - - if (!isObj(data) || !Array.isArray(data.keysets)) { - throw new Error('bad response'); - } - - return data; - } - /** - * Get the mints public keys - * @param keysetId optional param to get the keys for a specific keyset. If not specified, the keys from all active keysets are fetched - * @returns the mints public keys - */ - async getKeys(keysetId?: string, mintUrl?: string): Promise { - const allKeys = await CashuMint.getKeys( - mintUrl || this._mintUrl, - keysetId, - this._customRequest - ); - return allKeys; - } - /** - * Get the mints keysets in no specific order - * @param mintUrl - * @param customRequest - * @returns all the mints past and current keysets. - */ - public static async getKeySets( - mintUrl: string, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - return requestInstance({ endpoint: joinUrls(mintUrl, '/v1/keysets') }); - } - - /** - * Get the mints keysets in no specific order - * @returns all the mints past and current keysets. - */ - async getKeySets(): Promise { - return CashuMint.getKeySets(this._mintUrl, this._customRequest); - } - - /** - * Checks if specific proofs have already been redeemed - * @param checkPayload - * @returns redeemed and unredeemed ordered list of booleans - */ - async check(checkPayload: CheckStatePayload): Promise { - return CashuMint.check(this._mintUrl, checkPayload, this._customRequest); - } - - public static async restore( - mintUrl: string, - restorePayload: PostRestorePayload, - customRequest?: typeof request - ): Promise { - const requestInstance = customRequest || request; - const data = await requestInstance({ - endpoint: joinUrls(mintUrl, '/v1/restore'), - method: 'POST', - requestBody: restorePayload - }); - - if (!isObj(data) || !Array.isArray(data?.outputs) || !Array.isArray(data?.promises)) { - throw new Error('bad response'); - } - - return data; - } - - async restore(restorePayload: { - outputs: Array; - }): Promise { - return CashuMint.restore(this._mintUrl, restorePayload, this._customRequest); - } -} - -export { CashuMint }; diff --git a/node_modules/@cashu/cashu-ts/src/CashuWallet.ts b/node_modules/@cashu/cashu-ts/src/CashuWallet.ts deleted file mode 100644 index 1b1a1b8a..00000000 --- a/node_modules/@cashu/cashu-ts/src/CashuWallet.ts +++ /dev/null @@ -1,982 +0,0 @@ -import { bytesToHex, randomBytes } from '@noble/hashes/utils'; -import { CashuMint } from './CashuMint.js'; -import { BlindedMessage } from './model/BlindedMessage.js'; -import { - type MeltPayload, - type MeltQuoteResponse, - type MintKeys, - type MintKeyset, - type MeltProofsResponse, - type MintPayload, - type Proof, - type MintQuotePayload, - type MeltQuotePayload, - type SendResponse, - type SerializedBlindedMessage, - type SwapPayload, - type Token, - SerializedBlindedSignature, - GetInfoResponse, - OutputAmounts, - ProofState, - BlindingData -} from './model/types/index.js'; -import { bytesToNumber, getDecodedToken, splitAmount, sumProofs, getKeepAmounts } from './utils.js'; -import { hashToCurve, pointFromHex } from '@cashu/crypto/modules/common'; -import { - blindMessage, - constructProofFromPromise, - serializeProof -} from '@cashu/crypto/modules/client'; -import { deriveBlindingFactor, deriveSecret } from '@cashu/crypto/modules/client/NUT09'; -import { createP2PKsecret, getSignedProofs } from '@cashu/crypto/modules/client/NUT11'; -import { type Proof as NUT11Proof } from '@cashu/crypto/modules/common/index'; - -/** - * The default number of proofs per denomination to keep in a wallet. - */ -const DEFAULT_DENOMINATION_TARGET = 3; - -/** - * The default unit for the wallet, if not specified in constructor. - */ -const DEFAULT_UNIT = 'sat'; - -/** - * Class that represents a Cashu wallet. - * This class should act as the entry point for this library - */ -class CashuWallet { - private _keys: Map = new Map(); - private _keysetId: string | undefined; - private _keysets: Array = []; - private _seed: Uint8Array | undefined = undefined; - private _unit = DEFAULT_UNIT; - private _mintInfo: GetInfoResponse | undefined = undefined; - private _denominationTarget = DEFAULT_DENOMINATION_TARGET; - - mint: CashuMint; - - /** - * @param mint Cashu mint instance is used to make api calls - * @param options.unit optionally set unit (default is 'sat') - * @param options.keys public keys from the mint (will be fetched from mint if not provided) - * @param options.keysets keysets from the mint (will be fetched from mint if not provided) - * @param options.mintInfo mint info from the mint (will be fetched from mint if not provided) - * @param options.denominationTarget target number proofs per denomination (default: see @constant DEFAULT_DENOMINATION_TARGET) - * @param options.bip39seed BIP39 seed for deterministic secrets. - * This can lead to poor performance, in which case the seed should be directly provided - */ - constructor( - mint: CashuMint, - options?: { - unit?: string; - keys?: Array | MintKeys; - keysets?: Array; - mintInfo?: GetInfoResponse; - bip39seed?: Uint8Array; - denominationTarget?: number; - } - ) { - this.mint = mint; - let keys: Array = []; - if (options?.keys && !Array.isArray(options.keys)) { - keys = [options.keys]; - } else if (options?.keys && Array.isArray(options?.keys)) { - keys = options?.keys; - } - if (keys) keys.forEach((key: MintKeys) => this._keys.set(key.id, key)); - if (options?.unit) this._unit = options?.unit; - if (options?.keysets) this._keysets = options.keysets; - if (options?.denominationTarget) { - this._denominationTarget = options.denominationTarget; - } - - if (options?.bip39seed) { - if (options.bip39seed instanceof Uint8Array) { - this._seed = options.bip39seed; - return; - } - throw new Error('bip39seed must be a valid UInt8Array'); - } - } - - get unit(): string { - return this._unit; - } - get keys(): Map { - return this._keys; - } - get keysetId(): string { - if (!this._keysetId) { - throw new Error('No keysetId set'); - } - return this._keysetId; - } - set keysetId(keysetId: string) { - this._keysetId = keysetId; - } - get keysets(): Array { - return this._keysets; - } - get mintInfo(): GetInfoResponse { - if (!this._mintInfo) { - throw new Error('Mint info not loaded'); - } - return this._mintInfo; - } - - /** - * Get information about the mint - * @returns mint info - */ - async getMintInfo(): Promise { - this._mintInfo = await this.mint.getInfo(); - return this._mintInfo; - } - - /** - * Load mint information, keysets and keys. This function can be called if no keysets are passed in the constructor - */ - async loadMint() { - await this.getMintInfo(); - await this.getKeySets(); - await this.getKeys(); - } - - /** - * Choose a keyset to activate based on the lowest input fee - * - * Note: this function will filter out deprecated base64 keysets - * - * @param keysets keysets to choose from - * @returns active keyset - */ - getActiveKeyset(keysets: Array): MintKeyset { - let activeKeysets = keysets.filter((k: MintKeyset) => k.active); - - // we only consider keyset IDs that start with "00" - activeKeysets = activeKeysets.filter((k: MintKeyset) => k.id.startsWith('00')); - - const activeKeyset = activeKeysets.sort( - (a: MintKeyset, b: MintKeyset) => (a.input_fee_ppk ?? 0) - (b.input_fee_ppk ?? 0) - )[0]; - if (!activeKeyset) { - throw new Error('No active keyset found'); - } - return activeKeyset; - } - - /** - * Get keysets from the mint with the unit of the wallet - * @returns keysets with wallet's unit - */ - async getKeySets(): Promise> { - const allKeysets = await this.mint.getKeySets(); - const unitKeysets = allKeysets.keysets.filter((k: MintKeyset) => k.unit === this._unit); - this._keysets = unitKeysets; - return this._keysets; - } - - /** - * Get all active keys from the mint and set the keyset with the lowest fees as the active wallet keyset. - * @returns keyset - */ - async getAllKeys(): Promise> { - const keysets = await this.mint.getKeys(); - this._keys = new Map(keysets.keysets.map((k: MintKeys) => [k.id, k])); - this.keysetId = this.getActiveKeyset(this._keysets).id; - return keysets.keysets; - } - - /** - * Get public keys from the mint. If keys were already fetched, it will return those. - * - * If `keysetId` is set, it will fetch and return that specific keyset. - * Otherwise, we select an active keyset with the unit of the wallet. - * - * @param keysetId optional keysetId to get keys for - * @param forceRefresh? if set to true, it will force refresh the keyset from the mint - * @returns keyset - */ - async getKeys(keysetId?: string, forceRefresh?: boolean): Promise { - if (!(this._keysets.length > 0) || forceRefresh) { - await this.getKeySets(); - } - // no keyset id is chosen, let's choose one - if (!keysetId) { - const localKeyset = this.getActiveKeyset(this._keysets); - keysetId = localKeyset.id; - } - // make sure we have keyset for this id - if (!this._keysets.find((k: MintKeyset) => k.id === keysetId)) { - await this.getKeySets(); - if (!this._keysets.find((k: MintKeyset) => k.id === keysetId)) { - throw new Error(`could not initialize keys. No keyset with id '${keysetId}' found`); - } - } - - // make sure we have keys for this id - if (!this._keys.get(keysetId)) { - const keys = await this.mint.getKeys(keysetId); - this._keys.set(keysetId, keys.keysets[0]); - } - - // set and return - this.keysetId = keysetId; - return this._keys.get(keysetId) as MintKeys; - } - - /** - * Receive an encoded or raw Cashu token (only supports single tokens. It will only process the first token in the token array) - * @param {(string|Token)} token - Cashu token, either as string or decoded - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param token secrets if set - * @returns New token with newly created proofs, token entries that had errors - */ - async receive( - token: string | Token, - options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - } - ): Promise> { - if (typeof token === 'string') { - token = getDecodedToken(token); - } - const keys = await this.getKeys(options?.keysetId); - const amount = sumProofs(token.proofs) - this.getFeesForProofs(token.proofs); - const { payload, blindingData } = this.createSwapPayload( - amount, - token.proofs, - keys, - options?.outputAmounts, - options?.counter, - options?.pubkey, - options?.privkey - ); - const { signatures } = await this.mint.swap(payload); - const freshProofs = this.constructProofs( - signatures, - blindingData.blindingFactors, - blindingData.secrets, - keys - ); - return freshProofs; - } - - /** - * Send proofs of a given amount, by providing at least the required amount of proofs - * @param amount amount to send - * @param proofs array of proofs (accumulated amount of proofs must be >= than amount) - * @param options.outputAmounts? optionally specify the output's amounts to keep and send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the output secrets if set - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.offline? optionally send proofs offline. - * @param options.includeFees? optionally include fees in the response. - * @returns {SendResponse} - */ - async send( - amount: number, - proofs: Array, - options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - offline?: boolean; - includeFees?: boolean; - } - ): Promise { - if (sumProofs(proofs) < amount) { - throw new Error('Not enough funds available to send'); - } - const { keep: keepProofsOffline, send: sendProofOffline } = this.selectProofsToSend( - proofs, - amount, - options?.includeFees - ); - const expectedFee = options?.includeFees ? this.getFeesForProofs(sendProofOffline) : 0; - if ( - !options?.offline && - (sumProofs(sendProofOffline) != amount + expectedFee || // if the exact amount cannot be selected - options?.outputAmounts || - options?.pubkey || - options?.privkey || - options?.keysetId) // these options require a swap - ) { - // we need to swap - // input selection, needs fees because of the swap - const { keep: keepProofsSelect, send: sendProofs } = this.selectProofsToSend( - proofs, - amount, - true - ); - options?.proofsWeHave?.push(...keepProofsSelect); - - const { keep, send } = await this.swap(amount, sendProofs, options); - const keepProofs = keepProofsSelect.concat(keep); - return { keep: keepProofs, send }; - } - - if (sumProofs(sendProofOffline) < amount + expectedFee) { - throw new Error('Not enough funds available to send'); - } - - return { keep: keepProofsOffline, send: sendProofOffline }; - } - - selectProofsToSend( - proofs: Array, - amountToSend: number, - includeFees?: boolean - ): SendResponse { - const sortedProofs = proofs.sort((a: Proof, b: Proof) => a.amount - b.amount); - const smallerProofs = sortedProofs - .filter((p: Proof) => p.amount <= amountToSend) - .sort((a: Proof, b: Proof) => b.amount - a.amount); - const biggerProofs = sortedProofs - .filter((p: Proof) => p.amount > amountToSend) - .sort((a: Proof, b: Proof) => a.amount - b.amount); - const nextBigger = biggerProofs[0]; - if (!smallerProofs.length && nextBigger) { - return { - keep: proofs.filter((p: Proof) => p.secret !== nextBigger.secret), - send: [nextBigger] - }; - } - - if (!smallerProofs.length && !nextBigger) { - return { keep: proofs, send: [] }; - } - - let remainder = amountToSend; - let selectedProofs = [smallerProofs[0]]; - const returnedProofs = []; - const feePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - remainder -= selectedProofs[0].amount - feePPK / 1000; - if (remainder > 0) { - const { keep, send } = this.selectProofsToSend( - smallerProofs.slice(1), - remainder, - includeFees - ); - selectedProofs.push(...send); - returnedProofs.push(...keep); - } - - const selectedFeePPK = includeFees ? this.getFeesForProofs(selectedProofs) : 0; - if (sumProofs(selectedProofs) < amountToSend + selectedFeePPK && nextBigger) { - selectedProofs = [nextBigger]; - } - return { - keep: proofs.filter((p: Proof) => !selectedProofs.includes(p)), - send: selectedProofs - }; - } - - /** - * calculates the fees based on inputs (proofs) - * @param proofs input proofs to calculate fees for - * @returns fee amount - */ - getFeesForProofs(proofs: Array): number { - if (!this._keysets.length) { - throw new Error('Could not calculate fees. No keysets found'); - } - const keysetIds = new Set(proofs.map((p: Proof) => p.id)); - keysetIds.forEach((id: string) => { - if (!this._keysets.find((k: MintKeyset) => k.id === id)) { - throw new Error(`Could not calculate fees. No keyset found with id: ${id}`); - } - }); - - const fees = Math.floor( - Math.max( - (proofs.reduce( - (total: number, curr: Proof) => - total + (this._keysets.find((k: MintKeyset) => k.id === curr.id)?.input_fee_ppk || 0), - 0 - ) + - 999) / - 1000, - 0 - ) - ); - return fees; - } - - /** - * calculates the fees based on inputs for a given keyset - * @param nInputs number of inputs - * @param keysetId keysetId used to lookup `input_fee_ppk` - * @returns fee amount - */ - getFeesForKeyset(nInputs: number, keysetId: string): number { - const fees = Math.floor( - Math.max( - (nInputs * (this._keysets.find((k: MintKeyset) => k.id === keysetId)?.input_fee_ppk || 0) + - 999) / - 1000, - 0 - ) - ); - return fees; - } - - /** - * Splits and creates sendable tokens - * if no amount is specified, the amount is implied by the cumulative amount of all proofs - * if both amount and preference are set, but the preference cannot fulfill the amount, then we use the default split - * @param amount amount to send while performing the optimal split (least proofs possible). can be set to undefined if preference is set - * @param proofs proofs matching that amount - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.keysetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param options.includeFees? include estimated fees for the receiver to receive the proofs - * @param options.proofsWeHave? optionally provide all currently stored proofs of this mint. Cashu-ts will use them to derive the optimal output amounts - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param options.privkey? will create a signature on the @param proofs secrets if set - * @returns promise of the change- and send-proofs - */ - async swap( - amount: number, - proofs: Array, - options?: { - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - privkey?: string; - keysetId?: string; - includeFees?: boolean; - } - ): Promise { - if (!options) options = {}; - const keyset = await this.getKeys(options.keysetId); - const proofsToSend = proofs; - let amountToSend = amount; - const amountAvailable = sumProofs(proofs); - let amountToKeep = amountAvailable - amountToSend - this.getFeesForProofs(proofsToSend); - // send output selection - let sendAmounts = options?.outputAmounts?.sendAmounts || splitAmount(amountToSend, keyset.keys); - - // include the fees to spend the the outputs of the swap - if (options?.includeFees) { - let outputFee = this.getFeesForKeyset(sendAmounts.length, keyset.id); - let sendAmountsFee = splitAmount(outputFee, keyset.keys); - while ( - this.getFeesForKeyset(sendAmounts.concat(sendAmountsFee).length, keyset.id) > outputFee - ) { - outputFee++; - sendAmountsFee = splitAmount(outputFee, keyset.keys); - } - sendAmounts = sendAmounts.concat(sendAmountsFee); - amountToSend += outputFee; - amountToKeep -= outputFee; - } - - // keep output selection - let keepAmounts; - if (options && !options.outputAmounts?.keepAmounts && options.proofsWeHave) { - keepAmounts = getKeepAmounts( - options.proofsWeHave, - amountToKeep, - keyset.keys, - this._denominationTarget - ); - } else if (options.outputAmounts) { - if ( - options.outputAmounts.keepAmounts?.reduce((a: number, b: number) => a + b, 0) != - amountToKeep - ) { - throw new Error('Keep amounts do not match amount to keep'); - } - keepAmounts = options.outputAmounts.keepAmounts; - } - - if (amountToSend + this.getFeesForProofs(proofsToSend) > amountAvailable) { - console.error( - `Not enough funds available (${amountAvailable}) for swap amountToSend: ${amountToSend} + fee: ${this.getFeesForProofs( - proofsToSend - )} | length: ${proofsToSend.length}` - ); - throw new Error(`Not enough funds available for swap`); - } - - if (amountToSend + this.getFeesForProofs(proofsToSend) + amountToKeep != amountAvailable) { - throw new Error('Amounts do not match for swap'); - } - - options.outputAmounts = { - keepAmounts: keepAmounts, - sendAmounts: sendAmounts - }; - const { payload, blindingData } = this.createSwapPayload( - amountToSend, - proofsToSend, - keyset, - options?.outputAmounts, - options?.counter, - options?.pubkey, - options?.privkey - ); - const { signatures } = await this.mint.swap(payload); - const swapProofs = this.constructProofs( - signatures, - blindingData.blindingFactors, - blindingData.secrets, - keyset - ); - const splitProofsToKeep: Array = []; - const splitProofsToSend: Array = []; - let amountToKeepCounter = 0; - swapProofs.forEach((proof: Proof) => { - if (amountToKeepCounter < amountToKeep) { - amountToKeepCounter += proof.amount; - splitProofsToKeep.push(proof); - return; - } - splitProofsToSend.push(proof); - }); - return { - keep: splitProofsToKeep, - send: splitProofsToSend - }; - } - - /** - * Regenerates - * @param start set starting point for count (first cycle for each keyset should usually be 0) - * @param count set number of blinded messages that should be generated - * @param options.keysetId set a custom keysetId to restore from. keysetIds can be loaded with `CashuMint.getKeySets()` - * @returns proofs - */ - async restore( - start: number, - count: number, - options?: { - keysetId?: string; - } - ): Promise<{ proofs: Array }> { - const keys = await this.getKeys(options?.keysetId); - if (!this._seed) { - throw new Error('CashuWallet must be initialized with a seed to use restore'); - } - // create blank amounts for unknown restore amounts - const amounts = Array(count).fill(0); - const { blindedMessages, blindingFactors, secrets } = this.createBlindedMessages( - amounts, - keys.id, - start - ); - - const { outputs, promises } = await this.mint.restore({ outputs: blindedMessages }); - - // Collect and map the secrets and blinding factors with the blinded messages that were returned from the mint - const validBlindingFactors = blindingFactors.filter((_: bigint, i: number) => - outputs.map((o: SerializedBlindedMessage) => o.B_).includes(blindedMessages[i].B_) - ); - const validSecrets = secrets.filter((_: Uint8Array, i: number) => - outputs.map((o: SerializedBlindedMessage) => o.B_).includes(blindedMessages[i].B_) - ); - - return { - proofs: this.constructProofs(promises, validBlindingFactors, validSecrets, keys) - }; - } - - /** - * Requests a mint quote form the mint. Response returns a Lightning payment request for the requested given amount and unit. - * @param amount Amount requesting for mint. - * @param description optional description for the mint quote - * @returns the mint will return a mint quote with a Lightning invoice for minting tokens of the specified amount and unit - */ - async createMintQuote(amount: number, description?: string) { - const mintQuotePayload: MintQuotePayload = { - unit: this._unit, - amount: amount, - description: description - }; - return await this.mint.createMintQuote(mintQuotePayload); - } - - /** - * Gets an existing mint quote from the mint. - * @param quote Quote ID - * @returns the mint will create and return a Lightning invoice for the specified amount - */ - async checkMintQuote(quote: string) { - return await this.mint.checkMintQuote(quote); - } - - /** - * Mint proofs for a given mint quote - * @param amount amount to request - * @param quote ID of mint quote - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.preference? Deprecated. Use `outputAmounts` instead. Optional preference for splitting proofs into specific amounts. - * @param options.outputAmounts? optionally specify the output's amounts to keep and to send. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns proofs - */ - async mintProofs( - amount: number, - quote: string, - options?: { - keysetId?: string; - outputAmounts?: OutputAmounts; - proofsWeHave?: Array; - counter?: number; - pubkey?: string; - } - ): Promise<{ proofs: Array }> { - const keyset = await this.getKeys(options?.keysetId); - if (!options?.outputAmounts && options?.proofsWeHave) { - options.outputAmounts = { - keepAmounts: getKeepAmounts( - options.proofsWeHave, - amount, - keyset.keys, - this._denominationTarget - ), - sendAmounts: [] - }; - } - - const { blindedMessages, secrets, blindingFactors } = this.createRandomBlindedMessages( - amount, - keyset, - options?.outputAmounts?.keepAmounts, - options?.counter, - options?.pubkey - ); - const mintPayload: MintPayload = { - outputs: blindedMessages, - quote: quote - }; - const { signatures } = await this.mint.mint(mintPayload); - return { - proofs: this.constructProofs(signatures, blindingFactors, secrets, keyset) - }; - } - - /** - * Requests a melt quote from the mint. Response returns amount and fees for a given unit in order to pay a Lightning invoice. - * @param invoice LN invoice that needs to get a fee estimate - * @returns the mint will create and return a melt quote for the invoice with an amount and fee reserve - */ - async createMeltQuote(invoice: string): Promise { - const meltQuotePayload: MeltQuotePayload = { - unit: this._unit, - request: invoice - }; - const meltQuote = await this.mint.createMeltQuote(meltQuotePayload); - return meltQuote; - } - - /** - * Return an existing melt quote from the mint. - * @param quote ID of the melt quote - * @returns the mint will return an existing melt quote - */ - async checkMeltQuote(quote: string): Promise { - const meltQuote = await this.mint.checkMeltQuote(quote); - return meltQuote; - } - - /** - * Melt proofs for a melt quote. proofsToSend must be at least amount+fee_reserve form the melt quote. This function does not perform coin selection!. - * Returns melt quote and change proofs - * @param meltQuote ID of the melt quote - * @param proofsToSend proofs to melt - * @param options.keysetId? optionally set keysetId for blank outputs for returned change. - * @param options.counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param options.privkey? optionally set a private key to unlock P2PK locked secrets - * @returns - */ - async meltProofs( - meltQuote: MeltQuoteResponse, - proofsToSend: Array, - options?: { - keysetId?: string; - counter?: number; - privkey?: string; - } - ): Promise { - const keys = await this.getKeys(options?.keysetId); - const { blindedMessages, secrets, blindingFactors } = this.createBlankOutputs( - sumProofs(proofsToSend) - meltQuote.amount, - keys.id, - options?.counter - ); - if (options?.privkey != undefined) { - proofsToSend = getSignedProofs( - proofsToSend.map((p: Proof) => { - return { - amount: p.amount, - C: pointFromHex(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), - options.privkey - ).map((p: NUT11Proof) => serializeProof(p)); - } - const meltPayload: MeltPayload = { - quote: meltQuote.quote, - inputs: proofsToSend, - outputs: [...blindedMessages] - }; - const meltResponse = await this.mint.melt(meltPayload); - let change: Array = []; - if (meltResponse.change) { - change = this.constructProofs(meltResponse.change, blindingFactors, secrets, keys); - } - return { - quote: meltResponse, - change: change - }; - } - - /** - * Creates a split payload - * @param amount amount to send - * @param proofsToSend proofs to split* - * @param outputAmounts? optionally specify the output's amounts to keep and to send. - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @param privkey? will create a signature on the @param proofsToSend secrets if set - * @returns - */ - private createSwapPayload( - amount: number, - proofsToSend: Array, - keyset: MintKeys, - outputAmounts?: OutputAmounts, - counter?: number, - pubkey?: string, - privkey?: string - ): { - payload: SwapPayload; - blindingData: BlindingData; - } { - const totalAmount = proofsToSend.reduce((total: number, curr: Proof) => total + curr.amount, 0); - if (outputAmounts && outputAmounts.sendAmounts && !outputAmounts.keepAmounts) { - outputAmounts.keepAmounts = splitAmount( - totalAmount - amount - this.getFeesForProofs(proofsToSend), - keyset.keys - ); - } - const keepBlindedMessages = this.createRandomBlindedMessages( - totalAmount - amount - this.getFeesForProofs(proofsToSend), - keyset, - outputAmounts?.keepAmounts, - counter - ); - if (this._seed && counter) { - counter = counter + keepBlindedMessages.secrets.length; - } - const sendBlindedMessages = this.createRandomBlindedMessages( - amount, - keyset, - outputAmounts?.sendAmounts, - counter, - pubkey - ); - if (privkey) { - proofsToSend = getSignedProofs( - proofsToSend.map((p: Proof) => { - return { - amount: p.amount, - C: pointFromHex(p.C), - id: p.id, - secret: new TextEncoder().encode(p.secret) - }; - }), - privkey - ).map((p: NUT11Proof) => serializeProof(p)); - } - - // join keepBlindedMessages and sendBlindedMessages - const blindingData: BlindingData = { - blindedMessages: [ - ...keepBlindedMessages.blindedMessages, - ...sendBlindedMessages.blindedMessages - ], - secrets: [...keepBlindedMessages.secrets, ...sendBlindedMessages.secrets], - blindingFactors: [ - ...keepBlindedMessages.blindingFactors, - ...sendBlindedMessages.blindingFactors - ] - }; - - const payload = { - inputs: proofsToSend, - outputs: [...blindingData.blindedMessages] - }; - return { payload, blindingData }; - } - - /** - * Get an array of the states of proofs from the mint (as an array of CheckStateEnum's) - * @param proofs (only the `secret` field is required) - * @returns - */ - async checkProofsStates(proofs: Array): Promise> { - const enc = new TextEncoder(); - const Ys = proofs.map((p: Proof) => hashToCurve(enc.encode(p.secret)).toHex(true)); - // TODO: Replace this with a value from the info endpoint of the mint eventually - const BATCH_SIZE = 100; - const states: Array = []; - for (let i = 0; i < Ys.length; i += BATCH_SIZE) { - const YsSlice = Ys.slice(i, i + BATCH_SIZE); - const { states: batchStates } = await this.mint.check({ - Ys: YsSlice - }); - const stateMap: { [y: string]: ProofState } = {}; - batchStates.forEach((s) => { - stateMap[s.Y] = s; - }); - for (let j = 0; j < YsSlice.length; j++) { - const state = stateMap[YsSlice[j]]; - if (!state) { - throw new Error('Could not find state for proof with Y: ' + YsSlice[j]); - } - states.push(state); - } - } - return states; - } - - /** - * Creates blinded messages for a given amount - * @param amount amount to create blinded messages for - * @param split optional preference for splitting proofs into specific amounts. overrides amount param - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createRandomBlindedMessages( - amount: number, - keyset: MintKeys, - split?: Array, - counter?: number, - pubkey?: string - ): BlindingData & { amounts: Array } { - const amounts = splitAmount(amount, keyset.keys, split); - return this.createBlindedMessages(amounts, keyset.id, counter, pubkey); - } - - /** - * Creates blinded messages for a according to @param amounts - * @param amount array of amounts to create blinded messages for - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @param keyksetId? override the keysetId derived from the current mintKeys with a custom one. This should be a keyset that was fetched from the `/keysets` endpoint - * @param pubkey? optionally locks ecash to pubkey. Will not be deterministic, even if counter is set! - * @returns blinded messages, secrets, rs, and amounts - */ - private createBlindedMessages( - amounts: Array, - keysetId: string, - counter?: number, - pubkey?: string - ): BlindingData & { amounts: Array } { - // if we atempt to create deterministic messages without a _seed, abort. - if (counter != undefined && !this._seed) { - throw new Error( - 'Cannot create deterministic messages without seed. Instantiate CashuWallet with a bip39seed, or omit counter param.' - ); - } - const blindedMessages: Array = []; - const secrets: Array = []; - const blindingFactors: Array = []; - for (let i = 0; i < amounts.length; i++) { - let deterministicR = undefined; - let secretBytes = undefined; - if (pubkey) { - secretBytes = createP2PKsecret(pubkey); - } else if (this._seed && counter != undefined) { - secretBytes = deriveSecret(this._seed, keysetId, counter + i); - deterministicR = bytesToNumber(deriveBlindingFactor(this._seed, keysetId, counter + i)); - } else { - secretBytes = randomBytes(32); - } - if (!pubkey) { - const secretHex = bytesToHex(secretBytes); - secretBytes = new TextEncoder().encode(secretHex); - } - secrets.push(secretBytes); - const { B_, r } = blindMessage(secretBytes, deterministicR); - blindingFactors.push(r); - const blindedMessage = new BlindedMessage(amounts[i], B_, keysetId); - blindedMessages.push(blindedMessage.getSerializedBlindedMessage()); - } - return { blindedMessages, secrets, blindingFactors, amounts }; - } - - /** - * Creates NUT-08 blank outputs (fee returns) for a given fee reserve - * See: https://github.com/cashubtc/nuts/blob/main/08.md - * @param amount amount to cover with blank outputs - * @param keysetId mint keysetId - * @param counter? optionally set counter to derive secret deterministically. CashuWallet class must be initialized with seed phrase to take effect - * @returns blinded messages, secrets, and rs - */ - private createBlankOutputs(amount: number, keysetId: string, counter?: number): BlindingData { - let count = Math.ceil(Math.log2(amount)) || 1; - //Prevent count from being -Infinity - if (count < 0) { - count = 0; - } - const amounts = count ? Array(count).fill(1) : []; - const { blindedMessages, blindingFactors, secrets } = this.createBlindedMessages( - amounts, - keysetId, - counter - ); - return { blindedMessages, secrets, blindingFactors }; - } - - /** - * construct proofs from @params promises, @params rs, @params secrets, and @params keyset - * @param promises array of serialized blinded signatures - * @param rs arrays of binding factors - * @param secrets array of secrets - * @param keyset mint keyset - * @returns array of serialized proofs - */ - private constructProofs( - promises: Array, - rs: Array, - secrets: Array, - keyset: MintKeys - ): Array { - return promises - .map((p: SerializedBlindedSignature, i: number) => { - const blindSignature = { id: p.id, amount: p.amount, C_: pointFromHex(p.C_) }; - const r = rs[i]; - const secret = secrets[i]; - const A = pointFromHex(keyset.keys[p.amount]); - return constructProofFromPromise(blindSignature, r, secret, A); - }) - .map((p: NUT11Proof) => serializeProof(p) as Proof); - } -} - -export { CashuWallet }; diff --git a/node_modules/@cashu/cashu-ts/src/base64.ts b/node_modules/@cashu/cashu-ts/src/base64.ts deleted file mode 100644 index 18f19b99..00000000 --- a/node_modules/@cashu/cashu-ts/src/base64.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Buffer } from 'buffer'; - -function encodeUint8toBase64(uint8array: Uint8Array): string { - return Buffer.from(uint8array).toString('base64'); -} - -function encodeUint8toBase64Url(bytes: Uint8Array): string { - return Buffer.from(bytes) - .toString('base64') - .replace(/\+/g, '-') // Replace + with - - .replace(/\//g, '_') // Replace / with _ - .replace(/=+$/, ''); // Remove padding characters -} - -function encodeBase64toUint8(base64String: string): Uint8Array { - return Buffer.from(base64String, 'base64'); -} - -function encodeJsonToBase64(jsonObj: unknown): string { - const jsonString = JSON.stringify(jsonObj); - return base64urlFromBase64(Buffer.from(jsonString).toString('base64')); -} - -function encodeBase64ToJson(base64String: string): T { - const jsonString = Buffer.from(base64urlToBase64(base64String), 'base64').toString(); - const jsonObj = JSON.parse(jsonString) as T; - return jsonObj; -} - -function base64urlToBase64(str: string) { - return str.replace(/-/g, '+').replace(/_/g, '/').split('=')[0]; - // .replace(/./g, '='); -} - -function base64urlFromBase64(str: string) { - return str.replace(/\+/g, '-').replace(/\//g, '_').split('=')[0]; - // .replace(/=/g, '.'); -} - -export { - encodeUint8toBase64, - encodeUint8toBase64Url, - encodeBase64toUint8, - encodeJsonToBase64, - encodeBase64ToJson -}; diff --git a/node_modules/@cashu/cashu-ts/src/cbor.ts b/node_modules/@cashu/cashu-ts/src/cbor.ts deleted file mode 100644 index 07b8a7be..00000000 --- a/node_modules/@cashu/cashu-ts/src/cbor.ts +++ /dev/null @@ -1,336 +0,0 @@ -type SimpleValue = boolean | null | undefined; - -export type ResultObject = { [key: string]: ResultValue }; -export type ResultValue = - | SimpleValue - | number - | string - | Uint8Array - | Array - | ResultObject; - -type ResultKeyType = Extract; -export type ValidDecodedType = Extract; - -function isResultKeyType(value: ResultValue): value is ResultKeyType { - return typeof value === 'number' || typeof value === 'string'; -} - -type DecodeResult = { - value: T; - offset: number; -}; - -export function encodeCBOR(value: any) { - const buffer: Array = []; - encodeItem(value, buffer); - return new Uint8Array(buffer); -} - -function encodeItem(value: any, buffer: Array) { - if (value === null) { - buffer.push(0xf6); - } else if (value === undefined) { - buffer.push(0xf7); - } else if (typeof value === 'boolean') { - buffer.push(value ? 0xf5 : 0xf4); - } else if (typeof value === 'number') { - encodeUnsigned(value, buffer); - } else if (typeof value === 'string') { - encodeString(value, buffer); - } else if (Array.isArray(value)) { - encodeArray(value, buffer); - } else if (value instanceof Uint8Array) { - encodeByteString(value, buffer); - } else if (typeof value === 'object') { - encodeObject(value, buffer); - } else { - throw new Error('Unsupported type'); - } -} - -function encodeUnsigned(value: number, buffer: Array) { - if (value < 24) { - buffer.push(value); - } else if (value < 256) { - buffer.push(0x18, value); - } else if (value < 65536) { - buffer.push(0x19, value >> 8, value & 0xff); - } else if (value < 4294967296) { - buffer.push(0x1a, value >> 24, (value >> 16) & 0xff, (value >> 8) & 0xff, value & 0xff); - } else { - throw new Error('Unsupported integer size'); - } -} - -function encodeByteString(value: Uint8Array, buffer: Array) { - const length = value.length; - - if (length < 24) { - buffer.push(0x40 + length); - } else if (length < 256) { - buffer.push(0x58, length); - } else if (length < 65536) { - buffer.push(0x59, (length >> 8) & 0xff, length & 0xff); - } else if (length < 4294967296) { - buffer.push( - 0x5a, - (length >> 24) & 0xff, - (length >> 16) & 0xff, - (length >> 8) & 0xff, - length & 0xff - ); - } else { - throw new Error('Byte string too long to encode'); - } - - for (let i = 0; i < value.length; i++) { - buffer.push(value[i]); - } -} - -function encodeString(value: string, buffer: Array) { - const utf8 = new TextEncoder().encode(value); - const length = utf8.length; - - if (length < 24) { - buffer.push(0x60 + length); - } else if (length < 256) { - buffer.push(0x78, length); - } else if (length < 65536) { - buffer.push(0x79, (length >> 8) & 0xff, length & 0xff); - } else if (length < 4294967296) { - buffer.push( - 0x7a, - (length >> 24) & 0xff, - (length >> 16) & 0xff, - (length >> 8) & 0xff, - length & 0xff - ); - } else { - throw new Error('String too long to encode'); - } - - for (let i = 0; i < utf8.length; i++) { - buffer.push(utf8[i]); - } -} - -function encodeArray(value: Array, buffer: Array) { - const length = value.length; - if (length < 24) { - buffer.push(0x80 | length); - } else if (length < 256) { - buffer.push(0x98, length); - } else if (length < 65536) { - buffer.push(0x99, length >> 8, length & 0xff); - } else { - throw new Error('Unsupported array length'); - } - - for (const item of value) { - encodeItem(item, buffer); - } -} - -function encodeObject(value: { [key: string]: any }, buffer: Array) { - const keys = Object.keys(value); - encodeUnsigned(keys.length, buffer); - buffer[buffer.length - 1] |= 0xa0; - for (const key of keys) { - encodeString(key, buffer); - encodeItem(value[key], buffer); - } -} - -export function decodeCBOR(data: Uint8Array): ResultValue { - const view = new DataView(data.buffer, data.byteOffset, data.byteLength); - const result = decodeItem(view, 0); - return result.value; -} - -function decodeItem(view: DataView, offset: number): DecodeResult { - if (offset >= view.byteLength) { - throw new Error('Unexpected end of data'); - } - const initialByte = view.getUint8(offset++); - const majorType = initialByte >> 5; - const additionalInfo = initialByte & 0x1f; - - switch (majorType) { - case 0: - return decodeUnsigned(view, offset, additionalInfo); - case 1: - return decodeSigned(view, offset, additionalInfo); - case 2: - return decodeByteString(view, offset, additionalInfo); - case 3: - return decodeString(view, offset, additionalInfo); - case 4: - return decodeArray(view, offset, additionalInfo); - case 5: - return decodeMap(view, offset, additionalInfo); - case 7: - return decodeSimpleAndFloat(view, offset, additionalInfo); - default: - throw new Error(`Unsupported major type: ${majorType}`); - } -} - -function decodeLength( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - if (additionalInfo < 24) return { value: additionalInfo, offset }; - if (additionalInfo === 24) return { value: view.getUint8(offset++), offset }; - if (additionalInfo === 25) { - const value = view.getUint16(offset, false); - offset += 2; - return { value, offset }; - } - if (additionalInfo === 26) { - const value = view.getUint32(offset, false); - offset += 4; - return { value, offset }; - } - if (additionalInfo === 27) { - const hi = view.getUint32(offset, false); - const lo = view.getUint32(offset + 4, false); - offset += 8; - return { value: hi * 2 ** 32 + lo, offset }; - } - throw new Error(`Unsupported length: ${additionalInfo}`); -} - -function decodeUnsigned( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - const { value, offset: newOffset } = decodeLength(view, offset, additionalInfo); - return { value, offset: newOffset }; -} - -function decodeSigned( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - const { value, offset: newOffset } = decodeLength(view, offset, additionalInfo); - return { value: -1 - value, offset: newOffset }; -} - -function decodeByteString( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - const { value: length, offset: newOffset } = decodeLength(view, offset, additionalInfo); - if (newOffset + length > view.byteLength) { - throw new Error('Byte string length exceeds data length'); - } - const value = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - return { value, offset: newOffset + length }; -} - -function decodeString( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - const { value: length, offset: newOffset } = decodeLength(view, offset, additionalInfo); - if (newOffset + length > view.byteLength) { - throw new Error('String length exceeds data length'); - } - const bytes = new Uint8Array(view.buffer, view.byteOffset + newOffset, length); - const value = new TextDecoder().decode(bytes); - return { value, offset: newOffset + length }; -} - -function decodeArray( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult> { - const { value: length, offset: newOffset } = decodeLength(view, offset, additionalInfo); - const array = []; - let currentOffset = newOffset; - for (let i = 0; i < length; i++) { - const result = decodeItem(view, currentOffset); - array.push(result.value); - currentOffset = result.offset; - } - return { value: array, offset: currentOffset }; -} - -function decodeMap( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult> { - const { value: length, offset: newOffset } = decodeLength(view, offset, additionalInfo); - const map: { [key: string]: ResultValue } = {}; - let currentOffset = newOffset; - for (let i = 0; i < length; i++) { - const keyResult = decodeItem(view, currentOffset); - if (!isResultKeyType(keyResult.value)) { - throw new Error('Invalid key type'); - } - const valueResult = decodeItem(view, keyResult.offset); - map[keyResult.value] = valueResult.value; - currentOffset = valueResult.offset; - } - return { value: map, offset: currentOffset }; -} - -function decodeFloat16(uint16: number): number { - const exponent = (uint16 & 0x7c00) >> 10; - const fraction = uint16 & 0x03ff; - const sign = uint16 & 0x8000 ? -1 : 1; - - if (exponent === 0) { - return sign * 2 ** -14 * (fraction / 1024); - } else if (exponent === 0x1f) { - return fraction ? NaN : sign * Infinity; - } - return sign * 2 ** (exponent - 15) * (1 + fraction / 1024); -} - -function decodeSimpleAndFloat( - view: DataView, - offset: number, - additionalInfo: number -): DecodeResult { - if (additionalInfo < 24) { - switch (additionalInfo) { - case 20: - return { value: false, offset }; - case 21: - return { value: true, offset }; - case 22: - return { value: null, offset }; - case 23: - return { value: undefined, offset }; - default: - throw new Error(`Unknown simple value: ${additionalInfo}`); - } - } - if (additionalInfo === 24) return { value: view.getUint8(offset++), offset }; - if (additionalInfo === 25) { - const value = decodeFloat16(view.getUint16(offset, false)); - offset += 2; - return { value, offset }; - } - if (additionalInfo === 26) { - const value = view.getFloat32(offset, false); - offset += 4; - return { value, offset }; - } - if (additionalInfo === 27) { - const value = view.getFloat64(offset, false); - offset += 8; - return { value, offset }; - } - throw new Error(`Unknown simple or float value: ${additionalInfo}`); -} diff --git a/node_modules/@cashu/cashu-ts/src/index.ts b/node_modules/@cashu/cashu-ts/src/index.ts deleted file mode 100644 index fad66d8e..00000000 --- a/node_modules/@cashu/cashu-ts/src/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { CashuMint } from './CashuMint.js'; -import { CashuWallet } from './CashuWallet.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; -import { setGlobalRequestOptions } from './request.js'; -import { - getEncodedToken, - getEncodedTokenV4, - getDecodedToken, - deriveKeysetId, - decodePaymentRequest -} from './utils.js'; - -export * from './model/types/index.js'; - -export { - CashuMint, - CashuWallet, - PaymentRequest, - getDecodedToken, - getEncodedToken, - getEncodedTokenV4, - decodePaymentRequest, - deriveKeysetId, - setGlobalRequestOptions -}; diff --git a/node_modules/@cashu/cashu-ts/src/legacy/nut-04.ts b/node_modules/@cashu/cashu-ts/src/legacy/nut-04.ts deleted file mode 100644 index 63ab349c..00000000 --- a/node_modules/@cashu/cashu-ts/src/legacy/nut-04.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { MintQuoteResponse } from '../model/types/index.js'; -import { MintQuoteState } from '../model/types/index.js'; - -export type MintQuoteResponsePaidDeprecated = { - paid?: boolean; -}; - -export function handleMintQuoteResponseDeprecated( - response: MintQuoteResponse & MintQuoteResponsePaidDeprecated -): MintQuoteResponse { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn( - "Field 'state' not found in MintQuoteResponse. Update NUT-04 of mint: https://github.com/cashubtc/nuts/pull/141)" - ); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? MintQuoteState.PAID : MintQuoteState.UNPAID; - } - } - return response; -} diff --git a/node_modules/@cashu/cashu-ts/src/legacy/nut-05.ts b/node_modules/@cashu/cashu-ts/src/legacy/nut-05.ts deleted file mode 100644 index ccc6582e..00000000 --- a/node_modules/@cashu/cashu-ts/src/legacy/nut-05.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { MeltQuoteResponse } from '../model/types/index.js'; -import { MeltQuoteState } from '../model/types/index.js'; - -export type MeltQuoteResponsePaidDeprecated = { - paid?: boolean; -}; - -export function handleMeltQuoteResponseDeprecated( - response: MeltQuoteResponse & MeltQuoteResponsePaidDeprecated -): MeltQuoteResponse { - // if the response MeltQuoteResponse has a "paid" flag, we monkey patch it to the state enum - if (!response.state) { - console.warn( - "Field 'state' not found in MeltQuoteResponse. Update NUT-05 of mint: https://github.com/cashubtc/nuts/pull/136)" - ); - if (typeof response.paid === 'boolean') { - response.state = response.paid ? MeltQuoteState.PAID : MeltQuoteState.UNPAID; - } - } - return response; -} diff --git a/node_modules/@cashu/cashu-ts/src/legacy/nut-06.ts b/node_modules/@cashu/cashu-ts/src/legacy/nut-06.ts deleted file mode 100644 index 82438d8b..00000000 --- a/node_modules/@cashu/cashu-ts/src/legacy/nut-06.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { MintContactInfo, GetInfoResponse } from '../model/types/index.js'; - -export function handleMintInfoContactFieldDeprecated(data: GetInfoResponse) { - // Monkey patch old contact field ["email", "me@mail.com"] Array<[string, string]>; to new contact field [{method: "email", info: "me@mail.com"}] Array - // This is to maintain backwards compatibility with older versions of the mint - if (Array.isArray(data?.contact) && data?.contact.length > 0) { - data.contact = data.contact.map((contact: MintContactInfo) => { - if ( - Array.isArray(contact) && - contact.length === 2 && - typeof contact[0] === 'string' && - typeof contact[1] === 'string' - ) { - console.warn( - `Mint returned deprecated 'contact' field: Update NUT-06: https://github.com/cashubtc/nuts/pull/117` - ); - return { method: contact[0], info: contact[1] } as MintContactInfo; - } - return contact; - }); - } - return data; -} diff --git a/node_modules/@cashu/cashu-ts/src/model/BlindedMessage.ts b/node_modules/@cashu/cashu-ts/src/model/BlindedMessage.ts deleted file mode 100644 index 9bd02f3c..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/BlindedMessage.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SerializedBlindedMessage } from './types/index.js'; -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; - -class BlindedMessage { - amount: number; - B_: ProjPointType; - id: string; - constructor(amount: number, B_: ProjPointType, id: string) { - this.amount = amount; - this.B_ = B_; - this.id = id; - } - getSerializedBlindedMessage(): SerializedBlindedMessage { - return { amount: this.amount, B_: this.B_.toHex(true), id: this.id }; - } -} -export { BlindedMessage }; diff --git a/node_modules/@cashu/cashu-ts/src/model/BlindedSignature.ts b/node_modules/@cashu/cashu-ts/src/model/BlindedSignature.ts deleted file mode 100644 index e998f320..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/BlindedSignature.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ProjPointType } from '@noble/curves/abstract/weierstrass'; -import { SerializedBlindedSignature } from './types/index.js'; - -class BlindedSignature { - id: string; - amount: number; - C_: ProjPointType; - - constructor(id: string, amount: number, C_: ProjPointType) { - this.id = id; - this.amount = amount; - this.C_ = C_; - } - - getSerializedBlindedSignature(): SerializedBlindedSignature { - return { id: this.id, amount: this.amount, C_: this.C_.toHex(true) }; - } -} - -export { BlindedSignature }; diff --git a/node_modules/@cashu/cashu-ts/src/model/Errors.ts b/node_modules/@cashu/cashu-ts/src/model/Errors.ts deleted file mode 100644 index d0e7bcd4..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/Errors.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class HttpResponseError extends Error { - status: number; - constructor(message: string, status: number) { - super(message); - this.status = status; - } -} diff --git a/node_modules/@cashu/cashu-ts/src/model/PaymentRequest.ts b/node_modules/@cashu/cashu-ts/src/model/PaymentRequest.ts deleted file mode 100644 index edfa6cf0..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/PaymentRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { encodeBase64toUint8 } from '../base64'; -import { decodeCBOR, encodeCBOR } from '../cbor'; -import { - RawPaymentRequest, - RawTransport, - PaymentRequestTransport, - PaymentRequestTransportType -} from './types'; -import { Buffer } from 'buffer'; - -export class PaymentRequest { - constructor( - public transport: Array, - public id?: string, - public amount?: number, - public unit?: string, - public mints?: Array, - public description?: string, - public singleUse: boolean = false - ) {} - - toEncodedRequest() { - const rawRequest: RawPaymentRequest = { - t: this.transport.map((t: PaymentRequestTransport) => ({ t: t.type, a: t.target, g: t.tags })) - }; - if (this.id) { - rawRequest.i = this.id; - } - if (this.amount) { - rawRequest.a = this.amount; - } - if (this.unit) { - rawRequest.u = this.unit; - } - if (this.mints) { - rawRequest.m = this.mints; - } - if (this.description) { - rawRequest.d = this.description; - } - if (this.singleUse) { - rawRequest.s = this.singleUse; - } - - const data = encodeCBOR(rawRequest); - const encodedData = Buffer.from(data).toString('base64'); - return 'creq' + 'A' + encodedData; - } - - getTransport(type: PaymentRequestTransportType) { - return this.transport.find((t: PaymentRequestTransport) => t.type === type); - } - - static fromEncodedRequest(encodedRequest: string): PaymentRequest { - if (!encodedRequest.startsWith('creq')) { - throw new Error('unsupported pr: invalid prefix'); - } - const version = encodedRequest[4]; - if (version !== 'A') { - throw new Error('unsupported pr version'); - } - const encodedData = encodedRequest.slice(5); - const data = encodeBase64toUint8(encodedData); - const decoded = decodeCBOR(data) as RawPaymentRequest; - const transports = decoded.t.map((t: RawTransport) => ({ type: t.t, target: t.a, tags: t.g })); - return new PaymentRequest( - transports, - decoded.i, - decoded.a, - decoded.u, - decoded.m, - decoded.d, - decoded.s - ); - } -} diff --git a/node_modules/@cashu/cashu-ts/src/model/Split.ts b/node_modules/@cashu/cashu-ts/src/model/Split.ts deleted file mode 100644 index dab90109..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/Split.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BlindedMessage } from './BlindedMessage.js'; -import { Proof } from './types/index.js'; - -class Split { - proofs: Array; - amount: number; - outputs: Array; - constructor(proofs: Array, amount: number, outputs: Array) { - this.proofs = proofs; - this.amount = amount; - this.outputs = outputs; - } - getSerializedSplit() { - return { - proofs: this.proofs, - amount: this.amount, - outputs: this.outputs.map((blindedMessage: BlindedMessage) => { - return { amount: blindedMessage.amount, B_: blindedMessage.B_.toHex(true) }; - }) - }; - } -} - -export { Split }; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/index.ts b/node_modules/@cashu/cashu-ts/src/model/types/index.ts deleted file mode 100644 index 8203aee6..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from './mint/index'; -export * from './wallet/index'; - -export type OutputAmounts = { - sendAmounts: Array; - keepAmounts?: Array; -}; - -// deprecated - -export type InvoiceData = { - paymentRequest: string; - amountInSats?: number; - amountInMSats?: number; - timestamp?: number; - paymentHash?: string; - memo?: string; - expiry?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/mint/index.ts b/node_modules/@cashu/cashu-ts/src/model/types/mint/index.ts deleted file mode 100644 index 7fd9b8f3..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/mint/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; - -export * from './responses'; -export * from './keys'; - -/** - * Payload that needs to be sent to the mint when checking for spendable proofs - */ -export type CheckStatePayload = { - /** - * The Y = hash_to_curve(secret) of the proofs to be checked. - */ - Ys: Array; -}; - -/** - * Request to mint at /v1/restore endpoint - */ -export type PostRestorePayload = { - outputs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/mint/keys.ts b/node_modules/@cashu/cashu-ts/src/model/types/mint/keys.ts deleted file mode 100644 index 794c8acd..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/mint/keys.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ -export type Keys = { [amount: number]: string }; - -/** - * An array of mint keysets - */ -export type MintActiveKeys = { - /** - * Keysets - */ - keysets: Array; -}; - -/** - * An array of mint keyset entries. - */ -export type MintAllKeysets = { - /** - * Keysets - */ - keysets: Array; -}; - -/** - * A mint keyset. - */ -export type MintKeys = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Public keys are a dictionary of number and string. The number represents the amount that the key signs for. - */ - keys: Keys; -}; - -/** - * A mint keyset entry. - */ -export type MintKeyset = { - /** - * Keyset ID - */ - id: string; - /** - * Unit of the keyset. - */ - unit: string; - /** - * Whether the keyset is active or not. - */ - active: boolean; - /** - * Input fee for keyset (in ppk) - */ - input_fee_ppk?: number; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/mint/responses.ts b/node_modules/@cashu/cashu-ts/src/model/types/mint/responses.ts deleted file mode 100644 index 43a6ccd0..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/mint/responses.ts +++ /dev/null @@ -1,217 +0,0 @@ -import { SerializedBlindedMessage } from '../wallet'; - -/** - * Cashu api error - */ -export type ApiError = { - /** - * Error message - */ - error?: string; - /** - * HTTP error code - */ - code?: number; - /** - * Detailed error message - */ - detail?: string; -}; - -/** - * Entries of CheckStateResponse with state of the proof - */ -export type ProofState = { - Y: string; - state: CheckStateEnum; - witness: string | null; -}; - -/** - * Enum for the state of a proof - */ -export enum CheckStateEnum { - UNSPENT = 'UNSPENT', - PENDING = 'PENDING', - SPENT = 'SPENT' -} - -/** - * Response when checking proofs if they are spendable. Should not rely on this for receiving, since it can be easily cheated. - */ -export type CheckStateResponse = { - /** - * - */ - states: Array; -} & ApiError; - -/** - * Response from mint at /info endpoint - */ -export type GetInfoResponse = { - name: string; - pubkey: string; - version: string; - description?: string; - description_long?: string; - contact: Array; - nuts: { - '4': { - methods: Array; - disabled: boolean; - }; - '5': { - methods: Array; - disabled: boolean; - }; - '7'?: { - supported: boolean; - }; - '8'?: { - supported: boolean; - }; - '9'?: { - supported: boolean; - }; - '10'?: { - supported: boolean; - }; - '11'?: { - supported: boolean; - }; - '12'?: { - supported: boolean; - }; - '13'?: { - supported: boolean; - }; - }; - motd?: string; -}; - -/** - * Response from the mint after requesting a melt quote - */ -export type MeltQuoteResponse = { - /** - * Quote ID - */ - quote: string; - /** - * Amount to be melted - */ - amount: number; - /** - * Fee reserve to be added to the amount - */ - fee_reserve: number; - /** - * State of the melt quote - */ - state: MeltQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; - /** - * preimage of the paid invoice. is null if it the invoice has not been paid yet. can be null, depending on which LN-backend the mint uses - */ - payment_preimage: string | null; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change?: Array; -} & ApiError; - -export enum MeltQuoteState { - UNPAID = 'UNPAID', - PENDING = 'PENDING', - PAID = 'PAID' -} - -export type MintContactInfo = { - method: string; - info: string; -}; - -export enum MintQuoteState { - UNPAID = 'UNPAID', - PAID = 'PAID', - ISSUED = 'ISSUED' -} - -/** - * Response from the mint after requesting a mint - */ -export type MintQuoteResponse = { - /** - * Payment request - */ - request: string; - /** - * Quote ID - */ - quote: string; - /** - * State of the mint quote - */ - state: MintQuoteState; - /** - * Timestamp of when the quote expires - */ - expiry: number; -} & ApiError; - -/** - * Response from the mint after requesting a mint - */ -export type MintResponse = { - signatures: Array; -} & ApiError; - -/** - * Response from mint at /v1/restore endpoint - */ -export type PostRestoreResponse = { - outputs: Array; - promises: Array; -}; - -/** - * Blinded signature as it is received from the mint - */ -export type SerializedBlindedSignature = { - /** - * keyset id for indicating which public key was used to sign the blinded message - */ - id: string; - /** - * Amount denominated in Satoshi - */ - amount: number; - /** - * Blinded signature - */ - C_: string; -}; - -/** - * Ecash to other MoE swap method, displayed in @type {GetInfoResponse} - */ -export type SwapMethod = { - method: string; - unit: string; - min_amount: number; - max_amount: number; -}; - -/** - * Response from the mint after performing a split action - */ -export type SwapResponse = { - /** - * represents the outputs after the split - */ - signatures: Array; -} & ApiError; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/wallet/index.ts b/node_modules/@cashu/cashu-ts/src/model/types/wallet/index.ts deleted file mode 100644 index 853df5d9..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/wallet/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -export * from './payloads'; -export * from './responses'; -export * from './tokens'; -export * from './paymentRequests'; - -/** - * represents a single Cashu proof. - */ -export type Proof = { - /** - * Keyset id, used to link proofs to a mint an its MintKeys. - */ - id: string; - /** - * Amount denominated in Satoshis. Has to match the amount of the mints signing key. - */ - amount: number; - /** - * The initial secret that was (randomly) chosen for the creation of this proof. - */ - secret: string; - /** - * The unblinded signature for this secret, signed by the mints private key. - */ - C: string; -}; - -/** - * response when after receiving a single TokenEntry - */ -export type ReceiveTokenEntryResponse = { - /** - * Received proofs - */ - proofs: Array; -}; - -/** - * Payload that needs to be sent to the mint when paying a lightning invoice. - */ -export type PaymentPayload = { - /** - * Payment request/Lighting invoice that should get paid by the mint. - */ - pr: string; - /** - * Proofs, matching Lightning invoices amount + fees. - */ - proofs: Array; -}; - -/** - * @deprecated Token V2 - * should no longer be used - */ -export type TokenV2 = { - proofs: Array; - mints: Array<{ url: string; ids: Array }>; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/wallet/payloads.ts b/node_modules/@cashu/cashu-ts/src/model/types/wallet/payloads.ts deleted file mode 100644 index 2ab98720..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/wallet/payloads.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Proof } from './index'; - -/** - * Data that the library needs to hold in memory while it awaits the blinded signatures for the mint. It is later used for unblinding the signatures. - */ -export type BlindingData = { - /** - * Blinded messages sent to the mint for signing. - */ - blindedMessages: Array; - /** - * secrets, kept client side for constructing proofs later. - */ - secrets: Array; - /** - * Blinding factor used for blinding messages and unblinding signatures after they are received from the mint. - */ - blindingFactors: Array; -}; - -/** - * Payload that needs to be sent to the mint when melting. Includes Return for overpaid fees - */ -export type MeltPayload = { - /** - * ID of the melt quote - */ - quote: string; - /** - * Inputs (Proofs) to be melted - */ - inputs: Array; - /** - * Blank outputs (blinded messages) that can be filled by the mint to return overpaid fees - */ - outputs: Array; -}; - -/** - * Payload that needs to be send to the mint to request a melt quote - */ -export type MeltQuotePayload = { - /** - * Unit to be melted - */ - unit: string; - /** - * Request to be melted to - */ - request: string; -}; - -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintPayload = { - /** - * Quote ID received from the mint. - */ - quote: string; - /** - * Outputs (blinded messages) to be signed by the mint. - */ - outputs: Array; -}; - -/** - * Payload that needs to be sent to the mint when requesting a mint - */ -export type MintQuotePayload = { - /** - * Unit to be minted - */ - unit: string; - /** - * Amount to be minted - */ - amount: number; - /** - * Description for the invoice - */ - description?: string; -}; - -/** - * Payload that needs to be sent to the mint when performing a split action - */ -export type SwapPayload = { - /** - * Inputs to the split operation - */ - inputs: Array; - /** - * Outputs (blinded messages) to be signed by the mint - */ - outputs: Array; -}; - -/** - * blinded message for sending to the mint - */ -export type SerializedBlindedMessage = { - /** - * amount - */ - amount: number; - /** - * Blinded message - */ - B_: string; - /** - * Keyset id - */ - id: string; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/wallet/paymentRequests.ts b/node_modules/@cashu/cashu-ts/src/model/types/wallet/paymentRequests.ts deleted file mode 100644 index ef3cc971..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/wallet/paymentRequests.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Proof } from './index'; - -export type RawTransport = { - t: PaymentRequestTransportType; // type - a: string; // target - g?: Array>; // tags -}; - -export type RawPaymentRequest = { - i?: string; // id - a?: number; // amount - u?: string; // unit - s?: boolean; // single use - m?: Array; // mints - d?: string; // description - t: Array; // transports -}; - -export type PaymentRequestTransport = { - type: PaymentRequestTransportType; - target: string; - tags?: Array>; -}; - -export enum PaymentRequestTransportType { - POST = 'post', - NOSTR = 'nostr' -} - -export type PaymentRequestPayload = { - id?: string; - memo?: string; - unit: string; - mint: string; - proofs: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/wallet/responses.ts b/node_modules/@cashu/cashu-ts/src/model/types/wallet/responses.ts deleted file mode 100644 index c3f93ea6..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/wallet/responses.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { MeltQuoteResponse } from '../mint'; -import { Proof, Token } from './index'; - -/** - * Response after paying a Lightning invoice - */ -export type MeltProofsResponse = { - /** - * if false, the proofs have not been invalidated and the payment can be tried later again with the same proofs - */ - quote: MeltQuoteResponse; - /** - * Return/Change from overpaid fees. This happens due to Lighting fee estimation being inaccurate - */ - change: Array; -}; - -/** - * Response when receiving a complete token. - */ -export type ReceiveResponse = { - /** - * Successfully received Cashu Token - */ - token: Token; - /** - * TokenEntries that had errors. No error will be thrown, but clients can choose to handle tokens with errors accordingly. - */ - tokensWithErrors: Token | undefined; -}; - -/** - * response after sending - */ -export type SendResponse = { - /** - * Proofs that exceeded the needed amount - */ - keep: Array; - /** - * Proofs to be sent, matching the chosen amount - */ - send: Array; -}; diff --git a/node_modules/@cashu/cashu-ts/src/model/types/wallet/tokens.ts b/node_modules/@cashu/cashu-ts/src/model/types/wallet/tokens.ts deleted file mode 100644 index 8d32662b..00000000 --- a/node_modules/@cashu/cashu-ts/src/model/types/wallet/tokens.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Proof } from './index'; - -/** - * A Cashu token - */ -export type Token = { - /** - * the mints URL - */ - mint: string; - /** - * a list of proofs - */ - proofs: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; - -/** - * Template for a Proof inside a V4 Token - */ -export type V4ProofTemplate = { - /** - * Amount - */ - a: number; - /** - * Secret - */ - s: string; - /** - * Signature - */ - c: Uint8Array; -}; - -/** - * TokenEntry in a V4 Token - */ -export type V4InnerToken = { - /** - * ID - */ - i: Uint8Array; - /** - * Proofs - */ - p: Array; -}; - -/** - * Template for a V4 Token - */ -export type TokenV4Template = { - /** - * TokenEntries - */ - t: Array; - /** - * Memo - */ - d: string; - /** - * Mint Url - */ - m: string; - /** - * Unit - */ - u: string; -}; - -/** - * A Cashu token - */ -export type DeprecatedToken = { - /** - * token entries - */ - token: Array; - /** - * a message to send along with the token - */ - memo?: string; - /** - * the unit of the token - */ - unit?: string; -}; -/** - * TokenEntry that stores proofs and mints - */ -type TokenEntry = { - /** - * a list of proofs - */ - proofs: Array; - /** - * the mints URL - */ - mint: string; -}; diff --git a/node_modules/@cashu/cashu-ts/src/request.ts b/node_modules/@cashu/cashu-ts/src/request.ts deleted file mode 100644 index d74630ae..00000000 --- a/node_modules/@cashu/cashu-ts/src/request.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { HttpResponseError } from './model/Errors'; - -type RequestArgs = { - endpoint: string; - requestBody?: Record; - headers?: Record; -}; - -type RequestOptions = RequestArgs & Omit; - -let globalRequestOptions: Partial = {}; - -/** - * An object containing any custom settings that you want to apply to the global fetch method. - * @param options See possible options here: https://developer.mozilla.org/en-US/docs/Web/API/fetch#options - */ -export function setGlobalRequestOptions(options: Partial): void { - globalRequestOptions = options; -} - -async function _request({ - endpoint, - requestBody, - headers: requestHeaders, - ...options -}: RequestOptions): Promise { - const body = requestBody ? JSON.stringify(requestBody) : undefined; - const headers = { - ...{ Accept: 'application/json, text/plain, */*' }, - ...(body ? { 'Content-Type': 'application/json' } : undefined), - ...requestHeaders - }; - - const response = await fetch(endpoint, { body, headers, ...options }); - - if (!response.ok) { - // expecting: { error: '', code: 0 } - // or: { detail: '' } (cashuBtc via pythonApi) - const { error, detail } = await response.json().catch(() => ({ error: 'bad response' })); - throw new HttpResponseError(error || detail || 'bad response', response.status); - } - - try { - return await response.json(); - } catch (err) { - console.error('Failed to parse HTTP response', err); - throw new HttpResponseError('bad response', response.status); - } -} - -export default async function request(options: RequestOptions): Promise { - const data = await _request({ ...options, ...globalRequestOptions }); - return data as T; -} diff --git a/node_modules/@cashu/cashu-ts/src/utils.ts b/node_modules/@cashu/cashu-ts/src/utils.ts deleted file mode 100644 index 826e2705..00000000 --- a/node_modules/@cashu/cashu-ts/src/utils.ts +++ /dev/null @@ -1,362 +0,0 @@ -import { - encodeBase64ToJson, - encodeBase64toUint8, - encodeJsonToBase64, - encodeUint8toBase64Url -} from './base64.js'; -import { - DeprecatedToken, - Keys, - Proof, - Token, - TokenV4Template, - V4InnerToken, - V4ProofTemplate -} from './model/types/index.js'; -import { TOKEN_PREFIX, TOKEN_VERSION } from './utils/Constants.js'; -import { bytesToHex, hexToBytes } from '@noble/curves/abstract/utils'; -import { sha256 } from '@noble/hashes/sha256'; -import { decodeCBOR, encodeCBOR } from './cbor.js'; -import { PaymentRequest } from './model/PaymentRequest.js'; - -/** - * Splits the amount into denominations of the provided @param keyset - * @param value amount to split - * @param keyset keys to look up split amounts - * @param split? optional custom split amounts - * @param order? optional order for split amounts (default: "asc") - * @returns Array of split amounts - * @throws Error if @param split amount is greater than @param value amount - */ -export function splitAmount( - value: number, - keyset: Keys, - split?: Array, - order?: 'desc' | 'asc' -): Array { - if (split) { - if (split.reduce((a: number, b: number) => a + b, 0) > value) { - throw new Error( - `Split is greater than total amount: ${split.reduce( - (a: number, b: number) => a + b, - 0 - )} > ${value}` - ); - } - split.forEach((amt: number) => { - if (!hasCorrespondingKey(amt, keyset)) { - throw new Error('Provided amount preferences do not match the amounts of the mint keyset.'); - } - }); - value = - value - - split.reduce((curr: number, acc: number) => { - return curr + acc; - }, 0); - } else { - split = []; - } - const sortedKeyAmounts = getKeysetAmounts(keyset); - sortedKeyAmounts.forEach((amt: number) => { - const q = Math.floor(value / amt); - for (let i = 0; i < q; ++i) split?.push(amt); - value %= amt; - }); - return split.sort((a, b) => (order === 'desc' ? b - a : a - b)); -} - -/** - * Creates a list of amounts to keep based on the proofs we have and the proofs we want to reach. - * @param proofsWeHave complete set of proofs stored (from current mint) - * @param amountToKeep amount to keep - * @param keys keys of current keyset - * @param targetCount the target number of proofs to reach - * @returns an array of amounts to keep - */ -export function getKeepAmounts( - proofsWeHave: Array, - amountToKeep: number, - keys: Keys, - targetCount: number -): Array { - // determines amounts we need to reach the targetCount for each amount based on the amounts of the proofs we have - // it tries to select amounts so that the proofs we have and the proofs we want reach the targetCount - const amountsWeWant: Array = []; - const amountsWeHave = proofsWeHave.map((p: Proof) => p.amount); - const sortedKeyAmounts = getKeysetAmounts(keys, 'asc'); - sortedKeyAmounts.forEach((amt) => { - const countWeHave = amountsWeHave.filter((a) => a === amt).length; - const countWeWant = Math.max(targetCount - countWeHave, 0); - for (let i = 0; i < countWeWant; ++i) { - if (amountsWeWant.reduce((a, b) => a + b, 0) + amt > amountToKeep) { - break; - } - amountsWeWant.push(amt); - } - }); - // use splitAmount to fill the rest between the sum of amountsWeHave and amountToKeep - const amountDiff = amountToKeep - amountsWeWant.reduce((a, b) => a + b, 0); - if (amountDiff) { - const remainingAmounts = splitAmount(amountDiff, keys); - remainingAmounts.forEach((amt: number) => { - amountsWeWant.push(amt); - }); - } - const sortedAmountsWeWant = amountsWeWant.sort((a, b) => a - b); - return sortedAmountsWeWant; -} -/** - * returns the amounts in the keyset sorted by the order specified - * @param keyset to search in - * @param order order to sort the amounts in - * @returns the amounts in the keyset sorted by the order specified - */ -export function getKeysetAmounts(keyset: Keys, order: 'asc' | 'desc' = 'desc'): Array { - if (order == 'desc') { - return Object.keys(keyset) - .map((k: string) => parseInt(k)) - .sort((a: number, b: number) => b - a); - } - return Object.keys(keyset) - .map((k: string) => parseInt(k)) - .sort((a: number, b: number) => a - b); -} - -/** - * Checks if the provided amount is in the keyset. - * @param amount amount to check - * @param keyset to search in - * @returns true if the amount is in the keyset, false otherwise - */ -export function hasCorrespondingKey(amount: number, keyset: Keys): boolean { - return amount in keyset; -} - -/** - * Converts a bytes array to a number. - * @param bytes to convert to number - * @returns number - */ -export function bytesToNumber(bytes: Uint8Array): bigint { - return hexToNumber(bytesToHex(bytes)); -} - -/** - * Converts a hex string to a number. - * @param hex to convert to number - * @returns number - */ -export function hexToNumber(hex: string): bigint { - return BigInt(`0x${hex}`); -} - -function isValidHex(str: string) { - return /^[a-f0-9]*$/i.test(str); -} - -/** - * Checks wether a proof or a list of proofs contains a non-hex id - * @param p Proof or list of proofs - * @returns boolean - */ -export function hasNonHexId(p: Proof | Array) { - if (Array.isArray(p)) { - return p.some((proof) => !isValidHex(proof.id)); - } - return isValidHex(p.id); -} - -//used for json serialization -export function bigIntStringify(_key: unknown, value: T) { - return typeof value === 'bigint' ? value.toString() : value; -} - -/** - * Helper function to encode a v3 cashu token - * @param token to encode - * @returns encoded token - */ -export function getEncodedTokenV3(token: Token): string { - const v3TokenObj: DeprecatedToken = { token: [{ mint: token.mint, proofs: token.proofs }] }; - if (token.unit) { - v3TokenObj.unit = token.unit; - } - if (token.memo) { - v3TokenObj.memo = token.memo; - } - return TOKEN_PREFIX + TOKEN_VERSION + encodeJsonToBase64(v3TokenObj); -} - -/** - * Helper function to encode a cashu token (defaults to v4 if keyset id allows it) - * @param token - * @param [opts] - */ -export function getEncodedToken(token: Token, opts?: { version: 3 | 4 }): string { - const nonHex = hasNonHexId(token.proofs); - if (nonHex || opts?.version === 3) { - if (opts?.version === 4) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - return getEncodedTokenV3(token); - } - return getEncodedTokenV4(token); -} - -export function getEncodedTokenV4(token: Token): string { - const nonHex = hasNonHexId(token.proofs); - if (nonHex) { - throw new Error('can not encode to v4 token if proofs contain non-hex keyset id'); - } - const idMap: { [id: string]: Array } = {}; - const mint = token.mint; - for (let i = 0; i < token.proofs.length; i++) { - const proof = token.proofs[i]; - if (idMap[proof.id]) { - idMap[proof.id].push(proof); - } else { - idMap[proof.id] = [proof]; - } - } - const tokenTemplate: TokenV4Template = { - m: mint, - u: token.unit || 'sat', - t: Object.keys(idMap).map( - (id: string): V4InnerToken => ({ - i: hexToBytes(id), - p: idMap[id].map( - (p: Proof): V4ProofTemplate => ({ a: p.amount, s: p.secret, c: hexToBytes(p.C) }) - ) - }) - ) - } as TokenV4Template; - - if (token.memo) { - tokenTemplate.d = token.memo; - } - - const encodedData = encodeCBOR(tokenTemplate); - const prefix = 'cashu'; - const version = 'B'; - const base64Data = encodeUint8toBase64Url(encodedData); - return prefix + version + base64Data; -} - -/** - * Helper function to decode cashu tokens into object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu token object - */ -export function getDecodedToken(token: string) { - // remove prefixes - const uriPrefixes = ['web+cashu://', 'cashu://', 'cashu:', 'cashu']; - uriPrefixes.forEach((prefix: string) => { - if (!token.startsWith(prefix)) { - return; - } - token = token.slice(prefix.length); - }); - return handleTokens(token); -} - -/** - * Helper function to decode different versions of cashu tokens into an object - * @param token an encoded cashu token (cashuAey...) - * @returns cashu Token object - */ -export function handleTokens(token: string): Token { - const version = token.slice(0, 1); - const encodedToken = token.slice(1); - if (version === 'A') { - const parsedV3Token = encodeBase64ToJson(encodedToken); - if (parsedV3Token.token.length > 1) { - throw new Error('Multi entry token are not supported'); - } - const entry = parsedV3Token.token[0]; - const tokenObj: Token = { - mint: entry.mint, - proofs: entry.proofs, - unit: parsedV3Token.unit || 'sat' - }; - if (parsedV3Token.memo) { - tokenObj.memo = parsedV3Token.memo; - } - return tokenObj; - } else if (version === 'B') { - const uInt8Token = encodeBase64toUint8(encodedToken); - const tokenData = decodeCBOR(uInt8Token) as TokenV4Template; - const proofs: Array = []; - tokenData.t.forEach((t) => - t.p.forEach((p) => { - proofs.push({ - secret: p.s, - C: bytesToHex(p.c), - amount: p.a, - id: bytesToHex(t.i) - }); - }) - ); - const decodedToken: Token = { mint: tokenData.m, proofs, unit: tokenData.u || 'sat' }; - if (tokenData.d) { - decodedToken.memo = tokenData.d; - } - return decodedToken; - } - throw new Error('Token version is not supported'); -} -/** - * Returns the keyset id of a set of keys - * @param keys keys object to derive keyset id from - * @returns - */ -export function deriveKeysetId(keys: Keys) { - const pubkeysConcat = Object.entries(keys) - .sort((a: [string, string], b: [string, string]) => +a[0] - +b[0]) - .map(([, pubKey]: [unknown, string]) => hexToBytes(pubKey)) - .reduce((prev: Uint8Array, curr: Uint8Array) => mergeUInt8Arrays(prev, curr), new Uint8Array()); - const hash = sha256(pubkeysConcat); - const hashHex = Buffer.from(hash).toString('hex').slice(0, 14); - return '00' + hashHex; -} - -export function mergeUInt8Arrays(a1: Uint8Array, a2: Uint8Array): Uint8Array { - // sum of individual array lengths - const mergedArray = new Uint8Array(a1.length + a2.length); - mergedArray.set(a1); - mergedArray.set(a2, a1.length); - return mergedArray; -} - -export function sortProofsById(proofs: Array) { - return proofs.sort((a: Proof, b: Proof) => a.id.localeCompare(b.id)); -} - -export function isObj(v: unknown): v is object { - return typeof v === 'object'; -} - -export function checkResponse(data: { error?: string; detail?: string }) { - if (!isObj(data)) return; - if ('error' in data && data.error) { - throw new Error(data.error); - } - if ('detail' in data && data.detail) { - throw new Error(data.detail); - } -} - -export function joinUrls(...parts: Array): string { - return parts.map((part: string) => part.replace(/(^\/+|\/+$)/g, '')).join('/'); -} - -export function sanitizeUrl(url: string): string { - return url.replace(/\/$/, ''); -} - -export function sumProofs(proofs: Array) { - return proofs.reduce((acc: number, proof: Proof) => acc + proof.amount, 0); -} - -export function decodePaymentRequest(paymentRequest: string) { - return PaymentRequest.fromEncodedRequest(paymentRequest); -} diff --git a/node_modules/@cashu/cashu-ts/src/utils/Constants.ts b/node_modules/@cashu/cashu-ts/src/utils/Constants.ts deleted file mode 100644 index 8badadbe..00000000 --- a/node_modules/@cashu/cashu-ts/src/utils/Constants.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * per protocol definition since tokenV3 tokens have a prefix and a version number - */ -const TOKEN_VERSION = 'A'; -const TOKEN_PREFIX = 'cashu'; - -export { TOKEN_VERSION, TOKEN_PREFIX }; diff --git a/node_modules/@cashu/cashu-ts/tsconfig.es5.json b/node_modules/@cashu/cashu-ts/tsconfig.es5.json deleted file mode 100644 index ec351e2f..00000000 --- a/node_modules/@cashu/cashu-ts/tsconfig.es5.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "ES5", - "declaration": true, - "outDir": "./dist/lib/es5", - "moduleResolution": "node", - "lib": ["ES2020", "DOM"], - "noImplicitAny": true, - "esModuleInterop": true - }, - "include": ["src/**/*"] -} diff --git a/node_modules/@scure/bip39/README.md b/node_modules/@scure/bip39/README.md index 34ca5493..281df3b2 100644 --- a/node_modules/@scure/bip39/README.md +++ b/node_modules/@scure/bip39/README.md @@ -1,41 +1,38 @@ # scure-bip39 -Audited & minimal JS implementation of [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). +Secure, [audited](#security) & minimal implementation of BIP39 mnemonic phrases. -- 🔒 [**Audited**](#security) by an independent security firm -- 🔻 Tree-shakeable: unused code is excluded from your builds -- 📦 ESM and common.js -- ➰ Only 2 audited dependencies by the same author: - [noble-hashes](https://github.com/paulmillr/noble-hashes) and [scure-base](https://github.com/paulmillr/scure-base) -- 🪶 14KB gzipped with one wordlist, 79KB with all of them: much smaller than similar libraries +Compared to popular `bip39` package, scure-bip39: + +- Supports ESM and common.js +- Supports tree-shaking: only actually used wordlists are bundled +- Is 491KB all-bundled instead of 1.3MB +- Uses 2 dependencies instead of 15 +- Wordlists are 157KB instead of 315KB +- Had an external security [audit](#security) by Cure53 Check out [scure-bip32](https://github.com/paulmillr/scure-bip32) if you need hierarchical deterministic wallets ("HD Wallets"). -### This library belongs to _scure_ +### This library belongs to *scure* -> **scure** — audited micro-libraries. +> **scure** — secure, independently audited packages for every use case. -- Zero or minimal dependencies -- Highly readable TypeScript / JS code -- PGP-signed releases and transparent NPM builds -- Check out [homepage](https://paulmillr.com/noble/#scure) & all libraries: +- All releases are signed with PGP keys +- As minimal as possible +- Check out all libraries: [base](https://github.com/paulmillr/scure-base), [bip32](https://github.com/paulmillr/scure-bip32), [bip39](https://github.com/paulmillr/scure-bip39), - [btc-signer](https://github.com/paulmillr/scure-btc-signer), - [starknet](https://github.com/paulmillr/scure-starknet) + [btc-signer](https://github.com/paulmillr/scure-btc-signer) ## Usage -> `npm install @scure/bip39` +> npm install @scure/bip39 -> `deno add jsr:@scure/bip39` +Or -> `deno doc jsr:@scure/bip39` # command-line documentation - -We don't provide source maps. -Wordlists are large, including source maps would double package size. +> yarn add @scure/bip39 ```js import * as bip39 from '@scure/bip39'; @@ -46,7 +43,7 @@ const mn = bip39.generateMnemonic(wordlist); console.log(mn); // Reversible: Converts mnemonic string to raw entropy in form of byte array. -const ent = bip39.mnemonicToEntropy(mn, wordlist); +const ent = bip39.mnemonicToEntropy(mn, wordlist) // Reversible: Converts raw entropy in form of byte array to mnemonic string. bip39.entropyToMnemonic(ent, wordlist); @@ -59,7 +56,7 @@ await bip39.mnemonicToSeed(mn, 'password'); bip39.mnemonicToSeedSync(mn, 'password'); ``` -This submodule contains the word lists defined by BIP39 for Czech, English, French, Italian, Japanese, Korean, Portuguese, Simplified and Traditional Chinese, and Spanish. These are not imported by default, as that would increase bundle sizes too much. Instead, you should import and use them explicitly. +This submodule contains the word lists defined by BIP39 for Czech, English, French, Italian, Japanese, Korean, Simplified and Traditional Chinese, and Spanish. These are not imported by default, as that would increase bundle sizes too much. Instead, you should import and use them explicitly. ```typescript function generateMnemonic(wordlist: string[], strength?: number): string; @@ -79,52 +76,19 @@ import { wordlist as french } from '@scure/bip39/wordlists/french'; import { wordlist as italian } from '@scure/bip39/wordlists/italian'; import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; +import { wordlist as simp } from '@scure/bip39/wordlists/simplified-chinese'; import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; +import { wordlist as trad } from '@scure/bip39/wordlists/traditional-chinese'; ``` ## Security -To audit wordlist content, run `node scripts/fetch-wordlist.js`. +The library has been audited by Cure53 on Jan 5, 2022. Check out the audit [PDF](./audit/2022-01-05-cure53-audit-nbl2.pdf) & [URL](https://cure53.de/pentest-report_hashing-libs.pdf). See [changes since audit](https://github.com/paulmillr/scure-bip39/compare/1.0.0..main). -The library has been independently audited: - -- at version 1.0.0, in Jan 2022, by [cure53](https://cure53.de) - - PDFs: [online](https://cure53.de/pentest-report_hashing-libs.pdf), [offline](./audit/2022-01-05-cure53-audit-nbl2.pdf) - - [Changes since audit](https://github.com/paulmillr/scure-bip39/compare/1.0.0..main). - - The audit has been funded by [Ethereum Foundation](https://ethereum.org/en/) with help of [Nomic Labs](https://nomiclabs.io) - -The library was initially developed for [js-ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography). -At commit [ae00e6d7](https://github.com/ethereum/js-ethereum-cryptography/commit/ae00e6d7d24fb3c76a1c7fe10039f6ecd120b77e), -it was extracted to a separate package called `micro-bip39`. -After the audit we've decided to use `@scure` NPM namespace for security. - -### Supply chain security - -- **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures -- **Releases** are transparent and built on GitHub CI. Make sure to verify [provenance](https://docs.npmjs.com/generating-provenance-statements) logs - - Use GitHub CLI to verify single-file builds: - `gh attestation verify --owner paulmillr scure-bip39.js` -- **Rare releasing** is followed to ensure less re-audit need for end-users -- **Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install. - - We make sure to use as few dependencies as possible - - Automatic dep updates are prevented by locking-down version ranges; diffs are checked with `npm-diff` -- **Dev Dependencies** are disabled for end-users; they are only used to develop / build the source code - -For this package, there are 2 dependencies; and a few dev dependencies: - -- [noble-hashes](https://github.com/paulmillr/noble-hashes) provides cryptographic hashing functionality -- [scure-base](https://github.com/paulmillr/scure-base) provides low-level wordlist utilities -- micro-bmark, micro-should and jsbt are used for benchmarking / testing / build tooling and developed by the same author -- prettier, fast-check and typescript are used for code quality / test generation / ts compilation. It's hard to audit their source code thoroughly and fully because of their size - -## Contributing & testing - -- `npm install && npm run build && npm test` will build the code and run tests. -- `npm run lint` / `npm run format` will run linter / fix linter issues. -- `npm run build:release` will build single file +1. The library was initially developed for [js-ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography) +2. At commit [ae00e6d7](https://github.com/ethereum/js-ethereum-cryptography/commit/ae00e6d7d24fb3c76a1c7fe10039f6ecd120b77e), it + was extracted to a separate package called `micro-bip39` +3. After the audit we've decided to use NPM namespace for security. Since `@micro` namespace was taken, we've renamed the package to `@scure/bip39` ## License diff --git a/node_modules/@scure/bip39/esm/index.d.ts b/node_modules/@scure/bip39/esm/index.d.ts deleted file mode 100644 index 5dfbeb57..00000000 --- a/node_modules/@scure/bip39/esm/index.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Audited & minimal JS implementation of - * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). - * @module - * @example -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); -const ent = bip39.mnemonicToEntropy(mn, wordlist) -bip39.entropyToMnemonic(ent, wordlist); -bip39.validateMnemonic(mn, wordlist); -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); - -// Wordlists -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; -``` - */ -/** - * Generate x random words. Uses Cryptographically-Secure Random Number Generator. - * @param wordlist imported wordlist for specific language - * @param strength mnemonic strength 128-256 bits - * @example - * generateMnemonic(wordlist, 128) - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export declare function generateMnemonic(wordlist: string[], strength?: number): string; -/** - * Reversible: Converts mnemonic string to raw entropy in form of byte array. - * @param mnemonic 12-24 words - * @param wordlist imported wordlist for specific language - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToEntropy(mnem, wordlist) - * // Produces - * new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]) - */ -export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array; -/** - * Reversible: Converts raw entropy in form of byte array to mnemonic string. - * @param entropy byte array - * @param wordlist imported wordlist for specific language - * @returns 12-24 words - * @example - * const ent = new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]); - * entropyToMnemonic(ent, wordlist); - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string; -/** - * Validates mnemonic for being 12-24 words contained in `wordlist`. - */ -export declare function validateMnemonic(mnemonic: string, wordlist: string[]): boolean; -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * await mnemonicToSeed(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise; -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToSeedSync(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array; diff --git a/node_modules/@scure/bip39/esm/index.js b/node_modules/@scure/bip39/esm/index.js index d5734b0a..fd55e60b 100644 --- a/node_modules/@scure/bip39/esm/index.js +++ b/node_modules/@scure/bip39/esm/index.js @@ -1,46 +1,13 @@ -/** - * Audited & minimal JS implementation of - * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). - * @module - * @example -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); -const ent = bip39.mnemonicToEntropy(mn, wordlist) -bip39.entropyToMnemonic(ent, wordlist); -bip39.validateMnemonic(mn, wordlist); -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); - -// Wordlists -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; -``` - */ -/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */ +import assert from '@noble/hashes/_assert'; import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2'; -import { sha256, sha512 } from '@noble/hashes/sha2'; -import { abytes, anumber, randomBytes } from '@noble/hashes/utils'; +import { sha256 } from '@noble/hashes/sha256'; +import { sha512 } from '@noble/hashes/sha512'; +import { randomBytes } from '@noble/hashes/utils'; import { utils as baseUtils } from '@scure/base'; -// Japanese wordlist const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093'; -// Normalization replaces equivalent sequences of characters -// so that any two texts that are equivalent will be reduced -// to the same sequence of code points, called the normal form of the original text. -// https://tonsky.me/blog/unicode/#why-is-a---- function nfkd(str) { if (typeof str !== 'string') - throw new TypeError('invalid mnemonic type: ' + typeof str); + throw new TypeError(`Invalid mnemonic type: ${typeof str}`); return str.normalize('NFKD'); } function normalize(str) { @@ -50,79 +17,39 @@ function normalize(str) { throw new Error('Invalid mnemonic'); return { nfkd: norm, words }; } -function aentropy(ent) { - abytes(ent, 16, 20, 24, 28, 32); +function assertEntropy(entropy) { + assert.bytes(entropy, 16, 20, 24, 28, 32); } -/** - * Generate x random words. Uses Cryptographically-Secure Random Number Generator. - * @param wordlist imported wordlist for specific language - * @param strength mnemonic strength 128-256 bits - * @example - * generateMnemonic(wordlist, 128) - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ export function generateMnemonic(wordlist, strength = 128) { - anumber(strength); + assert.number(strength); if (strength % 32 !== 0 || strength > 256) throw new TypeError('Invalid entropy'); return entropyToMnemonic(randomBytes(strength / 8), wordlist); } const calcChecksum = (entropy) => { - // Checksum is ent.length/4 bits long const bitsLeft = 8 - entropy.length / 4; - // Zero rightmost "bitsLeft" bits in byte - // For example: bitsLeft=4 val=10111101 -> 10110000 return new Uint8Array([(sha256(entropy)[0] >> bitsLeft) << bitsLeft]); }; function getCoder(wordlist) { if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string') - throw new Error('Wordlist: expected array of 2048 strings'); + throw new Error('Worlist: expected array of 2048 strings'); wordlist.forEach((i) => { if (typeof i !== 'string') - throw new Error('wordlist: non-string element: ' + i); + throw new Error(`Wordlist: non-string element: ${i}`); }); return baseUtils.chain(baseUtils.checksum(1, calcChecksum), baseUtils.radix2(11, true), baseUtils.alphabet(wordlist)); } -/** - * Reversible: Converts mnemonic string to raw entropy in form of byte array. - * @param mnemonic 12-24 words - * @param wordlist imported wordlist for specific language - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToEntropy(mnem, wordlist) - * // Produces - * new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]) - */ export function mnemonicToEntropy(mnemonic, wordlist) { const { words } = normalize(mnemonic); const entropy = getCoder(wordlist).decode(words); - aentropy(entropy); + assertEntropy(entropy); return entropy; } -/** - * Reversible: Converts raw entropy in form of byte array to mnemonic string. - * @param entropy byte array - * @param wordlist imported wordlist for specific language - * @returns 12-24 words - * @example - * const ent = new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]); - * entropyToMnemonic(ent, wordlist); - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ export function entropyToMnemonic(entropy, wordlist) { - aentropy(entropy); + assertEntropy(entropy); const words = getCoder(wordlist).encode(entropy); return words.join(isJapanese(wordlist) ? '\u3000' : ' '); } -/** - * Validates mnemonic for being 12-24 words contained in `wordlist`. - */ export function validateMnemonic(mnemonic, wordlist) { try { mnemonicToEntropy(mnemonic, wordlist); @@ -132,30 +59,11 @@ export function validateMnemonic(mnemonic, wordlist) { } return true; } -const psalt = (passphrase) => nfkd('mnemonic' + passphrase); -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * await mnemonicToSeed(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ +const salt = (passphrase) => nfkd(`mnemonic${passphrase}`); export function mnemonicToSeed(mnemonic, passphrase = '') { - return pbkdf2Async(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); + return pbkdf2Async(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); } -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToSeedSync(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ export function mnemonicToSeedSync(mnemonic, passphrase = '') { - return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); + return pbkdf2(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/czech.d.ts b/node_modules/@scure/bip39/esm/wordlists/czech.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/czech.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/czech.js b/node_modules/@scure/bip39/esm/wordlists/czech.js index 12cdd267..cf7b564f 100644 --- a/node_modules/@scure/bip39/esm/wordlists/czech.js +++ b/node_modules/@scure/bip39/esm/wordlists/czech.js @@ -2046,3 +2046,4 @@ zvon zvrat zvukovod zvyk`.split('\n'); +//# sourceMappingURL=czech.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/english.d.ts b/node_modules/@scure/bip39/esm/wordlists/english.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/english.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/english.js b/node_modules/@scure/bip39/esm/wordlists/english.js index e996bc6c..bb8972e5 100644 --- a/node_modules/@scure/bip39/esm/wordlists/english.js +++ b/node_modules/@scure/bip39/esm/wordlists/english.js @@ -2046,3 +2046,4 @@ zebra zero zone zoo`.split('\n'); +//# sourceMappingURL=english.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/french.d.ts b/node_modules/@scure/bip39/esm/wordlists/french.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/french.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/french.js b/node_modules/@scure/bip39/esm/wordlists/french.js index 4a67ca45..b599b656 100644 --- a/node_modules/@scure/bip39/esm/wordlists/french.js +++ b/node_modules/@scure/bip39/esm/wordlists/french.js @@ -2046,3 +2046,4 @@ zèbre zénith zeste zoologie`.split('\n'); +//# sourceMappingURL=french.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/italian.d.ts b/node_modules/@scure/bip39/esm/wordlists/italian.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/italian.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/italian.js b/node_modules/@scure/bip39/esm/wordlists/italian.js index f273f2ea..5fd1b4ea 100644 --- a/node_modules/@scure/bip39/esm/wordlists/italian.js +++ b/node_modules/@scure/bip39/esm/wordlists/italian.js @@ -2046,3 +2046,4 @@ zucchero zufolo zulu zuppa`.split('\n'); +//# sourceMappingURL=italian.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/japanese.d.ts b/node_modules/@scure/bip39/esm/wordlists/japanese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/japanese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/japanese.js b/node_modules/@scure/bip39/esm/wordlists/japanese.js index d0501299..44c62bf0 100644 --- a/node_modules/@scure/bip39/esm/wordlists/japanese.js +++ b/node_modules/@scure/bip39/esm/wordlists/japanese.js @@ -2046,3 +2046,4 @@ export const wordlist = `あいこくしん わすれもの わらう われる`.split('\n'); +//# sourceMappingURL=japanese.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/korean.d.ts b/node_modules/@scure/bip39/esm/wordlists/korean.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/korean.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/korean.js b/node_modules/@scure/bip39/esm/wordlists/korean.js index 2ec7d6fd..535ae22a 100644 --- a/node_modules/@scure/bip39/esm/wordlists/korean.js +++ b/node_modules/@scure/bip39/esm/wordlists/korean.js @@ -2046,3 +2046,4 @@ export const wordlist = `가격 희생 흰색 힘껏`.split('\n'); +//# sourceMappingURL=korean.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/portuguese.d.ts b/node_modules/@scure/bip39/esm/wordlists/portuguese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/portuguese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/portuguese.js b/node_modules/@scure/bip39/esm/wordlists/portuguese.js deleted file mode 100644 index 8359553c..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/portuguese.js +++ /dev/null @@ -1,2048 +0,0 @@ -export const wordlist = `abacate -abaixo -abalar -abater -abduzir -abelha -aberto -abismo -abotoar -abranger -abreviar -abrigar -abrupto -absinto -absoluto -absurdo -abutre -acabado -acalmar -acampar -acanhar -acaso -aceitar -acelerar -acenar -acervo -acessar -acetona -achatar -acidez -acima -acionado -acirrar -aclamar -aclive -acolhida -acomodar -acoplar -acordar -acumular -acusador -adaptar -adega -adentro -adepto -adequar -aderente -adesivo -adeus -adiante -aditivo -adjetivo -adjunto -admirar -adorar -adquirir -adubo -adverso -advogado -aeronave -afastar -aferir -afetivo -afinador -afivelar -aflito -afluente -afrontar -agachar -agarrar -agasalho -agenciar -agilizar -agiota -agitado -agora -agradar -agreste -agrupar -aguardar -agulha -ajoelhar -ajudar -ajustar -alameda -alarme -alastrar -alavanca -albergue -albino -alcatra -aldeia -alecrim -alegria -alertar -alface -alfinete -algum -alheio -aliar -alicate -alienar -alinhar -aliviar -almofada -alocar -alpiste -alterar -altitude -alucinar -alugar -aluno -alusivo -alvo -amaciar -amador -amarelo -amassar -ambas -ambiente -ameixa -amenizar -amido -amistoso -amizade -amolador -amontoar -amoroso -amostra -amparar -ampliar -ampola -anagrama -analisar -anarquia -anatomia -andaime -anel -anexo -angular -animar -anjo -anomalia -anotado -ansioso -anterior -anuidade -anunciar -anzol -apagador -apalpar -apanhado -apego -apelido -apertada -apesar -apetite -apito -aplauso -aplicada -apoio -apontar -aposta -aprendiz -aprovar -aquecer -arame -aranha -arara -arcada -ardente -areia -arejar -arenito -aresta -argiloso -argola -arma -arquivo -arraial -arrebate -arriscar -arroba -arrumar -arsenal -arterial -artigo -arvoredo -asfaltar -asilado -aspirar -assador -assinar -assoalho -assunto -astral -atacado -atadura -atalho -atarefar -atear -atender -aterro -ateu -atingir -atirador -ativo -atoleiro -atracar -atrevido -atriz -atual -atum -auditor -aumentar -aura -aurora -autismo -autoria -autuar -avaliar -avante -avaria -avental -avesso -aviador -avisar -avulso -axila -azarar -azedo -azeite -azulejo -babar -babosa -bacalhau -bacharel -bacia -bagagem -baiano -bailar -baioneta -bairro -baixista -bajular -baleia -baliza -balsa -banal -bandeira -banho -banir -banquete -barato -barbado -baronesa -barraca -barulho -baseado -bastante -batata -batedor -batida -batom -batucar -baunilha -beber -beijo -beirada -beisebol -beldade -beleza -belga -beliscar -bendito -bengala -benzer -berimbau -berlinda -berro -besouro -bexiga -bezerro -bico -bicudo -bienal -bifocal -bifurcar -bigorna -bilhete -bimestre -bimotor -biologia -biombo -biosfera -bipolar -birrento -biscoito -bisneto -bispo -bissexto -bitola -bizarro -blindado -bloco -bloquear -boato -bobagem -bocado -bocejo -bochecha -boicotar -bolada -boletim -bolha -bolo -bombeiro -bonde -boneco -bonita -borbulha -borda -boreal -borracha -bovino -boxeador -branco -brasa -braveza -breu -briga -brilho -brincar -broa -brochura -bronzear -broto -bruxo -bucha -budismo -bufar -bule -buraco -busca -busto -buzina -cabana -cabelo -cabide -cabo -cabrito -cacau -cacetada -cachorro -cacique -cadastro -cadeado -cafezal -caiaque -caipira -caixote -cajado -caju -calafrio -calcular -caldeira -calibrar -calmante -calota -camada -cambista -camisa -camomila -campanha -camuflar -canavial -cancelar -caneta -canguru -canhoto -canivete -canoa -cansado -cantar -canudo -capacho -capela -capinar -capotar -capricho -captador -capuz -caracol -carbono -cardeal -careca -carimbar -carneiro -carpete -carreira -cartaz -carvalho -casaco -casca -casebre -castelo -casulo -catarata -cativar -caule -causador -cautelar -cavalo -caverna -cebola -cedilha -cegonha -celebrar -celular -cenoura -censo -centeio -cercar -cerrado -certeiro -cerveja -cetim -cevada -chacota -chaleira -chamado -chapada -charme -chatice -chave -chefe -chegada -cheiro -cheque -chicote -chifre -chinelo -chocalho -chover -chumbo -chutar -chuva -cicatriz -ciclone -cidade -cidreira -ciente -cigana -cimento -cinto -cinza -ciranda -circuito -cirurgia -citar -clareza -clero -clicar -clone -clube -coado -coagir -cobaia -cobertor -cobrar -cocada -coelho -coentro -coeso -cogumelo -coibir -coifa -coiote -colar -coleira -colher -colidir -colmeia -colono -coluna -comando -combinar -comentar -comitiva -comover -complexo -comum -concha -condor -conectar -confuso -congelar -conhecer -conjugar -consumir -contrato -convite -cooperar -copeiro -copiador -copo -coquetel -coragem -cordial -corneta -coronha -corporal -correio -cortejo -coruja -corvo -cosseno -costela -cotonete -couro -couve -covil -cozinha -cratera -cravo -creche -credor -creme -crer -crespo -criada -criminal -crioulo -crise -criticar -crosta -crua -cruzeiro -cubano -cueca -cuidado -cujo -culatra -culminar -culpar -cultura -cumprir -cunhado -cupido -curativo -curral -cursar -curto -cuspir -custear -cutelo -damasco -datar -debater -debitar -deboche -debulhar -decalque -decimal -declive -decote -decretar -dedal -dedicado -deduzir -defesa -defumar -degelo -degrau -degustar -deitado -deixar -delator -delegado -delinear -delonga -demanda -demitir -demolido -dentista -depenado -depilar -depois -depressa -depurar -deriva -derramar -desafio -desbotar -descanso -desenho -desfiado -desgaste -desigual -deslize -desmamar -desova -despesa -destaque -desviar -detalhar -detentor -detonar -detrito -deusa -dever -devido -devotado -dezena -diagrama -dialeto -didata -difuso -digitar -dilatado -diluente -diminuir -dinastia -dinheiro -diocese -direto -discreta -disfarce -disparo -disquete -dissipar -distante -ditador -diurno -diverso -divisor -divulgar -dizer -dobrador -dolorido -domador -dominado -donativo -donzela -dormente -dorsal -dosagem -dourado -doutor -drenagem -drible -drogaria -duelar -duende -dueto -duplo -duquesa -durante -duvidoso -eclodir -ecoar -ecologia -edificar -edital -educado -efeito -efetivar -ejetar -elaborar -eleger -eleitor -elenco -elevador -eliminar -elogiar -embargo -embolado -embrulho -embutido -emenda -emergir -emissor -empatia -empenho -empinado -empolgar -emprego -empurrar -emulador -encaixe -encenado -enchente -encontro -endeusar -endossar -enfaixar -enfeite -enfim -engajado -engenho -englobar -engomado -engraxar -enguia -enjoar -enlatar -enquanto -enraizar -enrolado -enrugar -ensaio -enseada -ensino -ensopado -entanto -enteado -entidade -entortar -entrada -entulho -envergar -enviado -envolver -enxame -enxerto -enxofre -enxuto -epiderme -equipar -ereto -erguido -errata -erva -ervilha -esbanjar -esbelto -escama -escola -escrita -escuta -esfinge -esfolar -esfregar -esfumado -esgrima -esmalte -espanto -espelho -espiga -esponja -espreita -espumar -esquerda -estaca -esteira -esticar -estofado -estrela -estudo -esvaziar -etanol -etiqueta -euforia -europeu -evacuar -evaporar -evasivo -eventual -evidente -evoluir -exagero -exalar -examinar -exato -exausto -excesso -excitar -exclamar -executar -exemplo -exibir -exigente -exonerar -expandir -expelir -expirar -explanar -exposto -expresso -expulsar -externo -extinto -extrato -fabricar -fabuloso -faceta -facial -fada -fadiga -faixa -falar -falta -familiar -fandango -fanfarra -fantoche -fardado -farelo -farinha -farofa -farpa -fartura -fatia -fator -favorita -faxina -fazenda -fechado -feijoada -feirante -felino -feminino -fenda -feno -fera -feriado -ferrugem -ferver -festejar -fetal -feudal -fiapo -fibrose -ficar -ficheiro -figurado -fileira -filho -filme -filtrar -firmeza -fisgada -fissura -fita -fivela -fixador -fixo -flacidez -flamingo -flanela -flechada -flora -flutuar -fluxo -focal -focinho -fofocar -fogo -foguete -foice -folgado -folheto -forjar -formiga -forno -forte -fosco -fossa -fragata -fralda -frango -frasco -fraterno -freira -frente -fretar -frieza -friso -fritura -fronha -frustrar -fruteira -fugir -fulano -fuligem -fundar -fungo -funil -furador -furioso -futebol -gabarito -gabinete -gado -gaiato -gaiola -gaivota -galega -galho -galinha -galocha -ganhar -garagem -garfo -gargalo -garimpo -garoupa -garrafa -gasoduto -gasto -gata -gatilho -gaveta -gazela -gelado -geleia -gelo -gemada -gemer -gemido -generoso -gengiva -genial -genoma -genro -geologia -gerador -germinar -gesso -gestor -ginasta -gincana -gingado -girafa -girino -glacial -glicose -global -glorioso -goela -goiaba -golfe -golpear -gordura -gorjeta -gorro -gostoso -goteira -governar -gracejo -gradual -grafite -gralha -grampo -granada -gratuito -graveto -graxa -grego -grelhar -greve -grilo -grisalho -gritaria -grosso -grotesco -grudado -grunhido -gruta -guache -guarani -guaxinim -guerrear -guiar -guincho -guisado -gula -guloso -guru -habitar -harmonia -haste -haver -hectare -herdar -heresia -hesitar -hiato -hibernar -hidratar -hiena -hino -hipismo -hipnose -hipoteca -hoje -holofote -homem -honesto -honrado -hormonal -hospedar -humorado -iate -ideia -idoso -ignorado -igreja -iguana -ileso -ilha -iludido -iluminar -ilustrar -imagem -imediato -imenso -imersivo -iminente -imitador -imortal -impacto -impedir -implante -impor -imprensa -impune -imunizar -inalador -inapto -inativo -incenso -inchar -incidir -incluir -incolor -indeciso -indireto -indutor -ineficaz -inerente -infantil -infestar -infinito -inflamar -informal -infrator -ingerir -inibido -inicial -inimigo -injetar -inocente -inodoro -inovador -inox -inquieto -inscrito -inseto -insistir -inspetor -instalar -insulto -intacto -integral -intimar -intocado -intriga -invasor -inverno -invicto -invocar -iogurte -iraniano -ironizar -irreal -irritado -isca -isento -isolado -isqueiro -italiano -janeiro -jangada -janta -jararaca -jardim -jarro -jasmim -jato -javali -jazida -jejum -joaninha -joelhada -jogador -joia -jornal -jorrar -jovem -juba -judeu -judoca -juiz -julgador -julho -jurado -jurista -juro -justa -labareda -laboral -lacre -lactante -ladrilho -lagarta -lagoa -laje -lamber -lamentar -laminar -lampejo -lanche -lapidar -lapso -laranja -lareira -largura -lasanha -lastro -lateral -latido -lavanda -lavoura -lavrador -laxante -lazer -lealdade -lebre -legado -legendar -legista -leigo -leiloar -leitura -lembrete -leme -lenhador -lentilha -leoa -lesma -leste -letivo -letreiro -levar -leveza -levitar -liberal -libido -liderar -ligar -ligeiro -limitar -limoeiro -limpador -linda -linear -linhagem -liquidez -listagem -lisura -litoral -livro -lixa -lixeira -locador -locutor -lojista -lombo -lona -longe -lontra -lorde -lotado -loteria -loucura -lousa -louvar -luar -lucidez -lucro -luneta -lustre -lutador -luva -macaco -macete -machado -macio -madeira -madrinha -magnata -magreza -maior -mais -malandro -malha -malote -maluco -mamilo -mamoeiro -mamute -manada -mancha -mandato -manequim -manhoso -manivela -manobrar -mansa -manter -manusear -mapeado -maquinar -marcador -maresia -marfim -margem -marinho -marmita -maroto -marquise -marreco -martelo -marujo -mascote -masmorra -massagem -mastigar -matagal -materno -matinal -matutar -maxilar -medalha -medida -medusa -megafone -meiga -melancia -melhor -membro -memorial -menino -menos -mensagem -mental -merecer -mergulho -mesada -mesclar -mesmo -mesquita -mestre -metade -meteoro -metragem -mexer -mexicano -micro -migalha -migrar -milagre -milenar -milhar -mimado -minerar -minhoca -ministro -minoria -miolo -mirante -mirtilo -misturar -mocidade -moderno -modular -moeda -moer -moinho -moita -moldura -moleza -molho -molinete -molusco -montanha -moqueca -morango -morcego -mordomo -morena -mosaico -mosquete -mostarda -motel -motim -moto -motriz -muda -muito -mulata -mulher -multar -mundial -munido -muralha -murcho -muscular -museu -musical -nacional -nadador -naja -namoro -narina -narrado -nascer -nativa -natureza -navalha -navegar -navio -neblina -nebuloso -negativa -negociar -negrito -nervoso -neta -neural -nevasca -nevoeiro -ninar -ninho -nitidez -nivelar -nobreza -noite -noiva -nomear -nominal -nordeste -nortear -notar -noticiar -noturno -novelo -novilho -novo -nublado -nudez -numeral -nupcial -nutrir -nuvem -obcecado -obedecer -objetivo -obrigado -obscuro -obstetra -obter -obturar -ocidente -ocioso -ocorrer -oculista -ocupado -ofegante -ofensiva -oferenda -oficina -ofuscado -ogiva -olaria -oleoso -olhar -oliveira -ombro -omelete -omisso -omitir -ondulado -oneroso -ontem -opcional -operador -oponente -oportuno -oposto -orar -orbitar -ordem -ordinal -orfanato -orgasmo -orgulho -oriental -origem -oriundo -orla -ortodoxo -orvalho -oscilar -ossada -osso -ostentar -otimismo -ousadia -outono -outubro -ouvido -ovelha -ovular -oxidar -oxigenar -pacato -paciente -pacote -pactuar -padaria -padrinho -pagar -pagode -painel -pairar -paisagem -palavra -palestra -palheta -palito -palmada -palpitar -pancada -panela -panfleto -panqueca -pantanal -papagaio -papelada -papiro -parafina -parcial -pardal -parede -partida -pasmo -passado -pastel -patamar -patente -patinar -patrono -paulada -pausar -peculiar -pedalar -pedestre -pediatra -pedra -pegada -peitoral -peixe -pele -pelicano -penca -pendurar -peneira -penhasco -pensador -pente -perceber -perfeito -pergunta -perito -permitir -perna -perplexo -persiana -pertence -peruca -pescado -pesquisa -pessoa -petiscar -piada -picado -piedade -pigmento -pilastra -pilhado -pilotar -pimenta -pincel -pinguim -pinha -pinote -pintar -pioneiro -pipoca -piquete -piranha -pires -pirueta -piscar -pistola -pitanga -pivete -planta -plaqueta -platina -plebeu -plumagem -pluvial -pneu -poda -poeira -poetisa -polegada -policiar -poluente -polvilho -pomar -pomba -ponderar -pontaria -populoso -porta -possuir -postal -pote -poupar -pouso -povoar -praia -prancha -prato -praxe -prece -predador -prefeito -premiar -prensar -preparar -presilha -pretexto -prevenir -prezar -primata -princesa -prisma -privado -processo -produto -profeta -proibido -projeto -prometer -propagar -prosa -protetor -provador -publicar -pudim -pular -pulmonar -pulseira -punhal -punir -pupilo -pureza -puxador -quadra -quantia -quarto -quase -quebrar -queda -queijo -quente -querido -quimono -quina -quiosque -rabanada -rabisco -rachar -racionar -radial -raiar -rainha -raio -raiva -rajada -ralado -ramal -ranger -ranhura -rapadura -rapel -rapidez -raposa -raquete -raridade -rasante -rascunho -rasgar -raspador -rasteira -rasurar -ratazana -ratoeira -realeza -reanimar -reaver -rebaixar -rebelde -rebolar -recado -recente -recheio -recibo -recordar -recrutar -recuar -rede -redimir -redonda -reduzida -reenvio -refinar -refletir -refogar -refresco -refugiar -regalia -regime -regra -reinado -reitor -rejeitar -relativo -remador -remendo -remorso -renovado -reparo -repelir -repleto -repolho -represa -repudiar -requerer -resenha -resfriar -resgatar -residir -resolver -respeito -ressaca -restante -resumir -retalho -reter -retirar -retomada -retratar -revelar -revisor -revolta -riacho -rica -rigidez -rigoroso -rimar -ringue -risada -risco -risonho -robalo -rochedo -rodada -rodeio -rodovia -roedor -roleta -romano -roncar -rosado -roseira -rosto -rota -roteiro -rotina -rotular -rouco -roupa -roxo -rubro -rugido -rugoso -ruivo -rumo -rupestre -russo -sabor -saciar -sacola -sacudir -sadio -safira -saga -sagrada -saibro -salada -saleiro -salgado -saliva -salpicar -salsicha -saltar -salvador -sambar -samurai -sanar -sanfona -sangue -sanidade -sapato -sarda -sargento -sarjeta -saturar -saudade -saxofone -sazonal -secar -secular -seda -sedento -sediado -sedoso -sedutor -segmento -segredo -segundo -seiva -seleto -selvagem -semanal -semente -senador -senhor -sensual -sentado -separado -sereia -seringa -serra -servo -setembro -setor -sigilo -silhueta -silicone -simetria -simpatia -simular -sinal -sincero -singular -sinopse -sintonia -sirene -siri -situado -soberano -sobra -socorro -sogro -soja -solda -soletrar -solteiro -sombrio -sonata -sondar -sonegar -sonhador -sono -soprano -soquete -sorrir -sorteio -sossego -sotaque -soterrar -sovado -sozinho -suavizar -subida -submerso -subsolo -subtrair -sucata -sucesso -suco -sudeste -sufixo -sugador -sugerir -sujeito -sulfato -sumir -suor -superior -suplicar -suposto -suprimir -surdina -surfista -surpresa -surreal -surtir -suspiro -sustento -tabela -tablete -tabuada -tacho -tagarela -talher -talo -talvez -tamanho -tamborim -tampa -tangente -tanto -tapar -tapioca -tardio -tarefa -tarja -tarraxa -tatuagem -taurino -taxativo -taxista -teatral -tecer -tecido -teclado -tedioso -teia -teimar -telefone -telhado -tempero -tenente -tensor -tentar -termal -terno -terreno -tese -tesoura -testado -teto -textura -texugo -tiara -tigela -tijolo -timbrar -timidez -tingido -tinteiro -tiragem -titular -toalha -tocha -tolerar -tolice -tomada -tomilho -tonel -tontura -topete -tora -torcido -torneio -torque -torrada -torto -tostar -touca -toupeira -toxina -trabalho -tracejar -tradutor -trafegar -trajeto -trama -trancar -trapo -traseiro -tratador -travar -treino -tremer -trepidar -trevo -triagem -tribo -triciclo -tridente -trilogia -trindade -triplo -triturar -triunfal -trocar -trombeta -trova -trunfo -truque -tubular -tucano -tudo -tulipa -tupi -turbo -turma -turquesa -tutelar -tutorial -uivar -umbigo -unha -unidade -uniforme -urologia -urso -urtiga -urubu -usado -usina -usufruir -vacina -vadiar -vagaroso -vaidoso -vala -valente -validade -valores -vantagem -vaqueiro -varanda -vareta -varrer -vascular -vasilha -vassoura -vazar -vazio -veado -vedar -vegetar -veicular -veleiro -velhice -veludo -vencedor -vendaval -venerar -ventre -verbal -verdade -vereador -vergonha -vermelho -verniz -versar -vertente -vespa -vestido -vetorial -viaduto -viagem -viajar -viatura -vibrador -videira -vidraria -viela -viga -vigente -vigiar -vigorar -vilarejo -vinco -vinheta -vinil -violeta -virada -virtude -visitar -visto -vitral -viveiro -vizinho -voador -voar -vogal -volante -voleibol -voltagem -volumoso -vontade -vulto -vuvuzela -xadrez -xarope -xeque -xeretar -xerife -xingar -zangado -zarpar -zebu -zelador -zombar -zoologia -zumbido`.split('\n'); diff --git a/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.d.ts b/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js b/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js index 5989d01a..bb5512d6 100644 --- a/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js +++ b/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js @@ -2046,3 +2046,4 @@ export const wordlist = `的 怨 矮 歇`.split('\n'); +//# sourceMappingURL=simplified-chinese.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/spanish.d.ts b/node_modules/@scure/bip39/esm/wordlists/spanish.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/spanish.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/spanish.js b/node_modules/@scure/bip39/esm/wordlists/spanish.js index 92b3a9e0..afd6c53e 100644 --- a/node_modules/@scure/bip39/esm/wordlists/spanish.js +++ b/node_modules/@scure/bip39/esm/wordlists/spanish.js @@ -2046,3 +2046,4 @@ zona zorro zumo zurdo`.split('\n'); +//# sourceMappingURL=spanish.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.d.ts b/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js b/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js index 4075b3b9..82ca23c6 100644 --- a/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js +++ b/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js @@ -2046,3 +2046,4 @@ export const wordlist = `的 怨 矮 歇`.split('\n'); +//# sourceMappingURL=traditional-chinese.js.map \ No newline at end of file diff --git a/node_modules/@scure/bip39/index.d.ts b/node_modules/@scure/bip39/index.d.ts index 5dfbeb57..85cdb221 100644 --- a/node_modules/@scure/bip39/index.d.ts +++ b/node_modules/@scure/bip39/index.d.ts @@ -1,32 +1,3 @@ -/** - * Audited & minimal JS implementation of - * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). - * @module - * @example -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); -const ent = bip39.mnemonicToEntropy(mn, wordlist) -bip39.entropyToMnemonic(ent, wordlist); -bip39.validateMnemonic(mn, wordlist); -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); - -// Wordlists -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; -``` - */ /** * Generate x random words. Uses Cryptographically-Secure Random Number Generator. * @param wordlist imported wordlist for specific language diff --git a/node_modules/@scure/bip39/index.js b/node_modules/@scure/bip39/index.js index 5292f989..924ae10c 100644 --- a/node_modules/@scure/bip39/index.js +++ b/node_modules/@scure/bip39/index.js @@ -1,43 +1,11 @@ "use strict"; -/** - * Audited & minimal JS implementation of - * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). - * @module - * @example -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); -const ent = bip39.mnemonicToEntropy(mn, wordlist) -bip39.entropyToMnemonic(ent, wordlist); -bip39.validateMnemonic(mn, wordlist); -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); - -// Wordlists -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; -``` - */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.generateMnemonic = generateMnemonic; -exports.mnemonicToEntropy = mnemonicToEntropy; -exports.entropyToMnemonic = entropyToMnemonic; -exports.validateMnemonic = validateMnemonic; -exports.mnemonicToSeed = mnemonicToSeed; -exports.mnemonicToSeedSync = mnemonicToSeedSync; +exports.mnemonicToSeedSync = exports.mnemonicToSeed = exports.validateMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.generateMnemonic = void 0; /*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */ +const _assert_1 = require("@noble/hashes/_assert"); const pbkdf2_1 = require("@noble/hashes/pbkdf2"); -const sha2_1 = require("@noble/hashes/sha2"); +const sha256_1 = require("@noble/hashes/sha256"); +const sha512_1 = require("@noble/hashes/sha512"); const utils_1 = require("@noble/hashes/utils"); const base_1 = require("@scure/base"); // Japanese wordlist @@ -45,10 +13,9 @@ const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057 // Normalization replaces equivalent sequences of characters // so that any two texts that are equivalent will be reduced // to the same sequence of code points, called the normal form of the original text. -// https://tonsky.me/blog/unicode/#why-is-a---- function nfkd(str) { if (typeof str !== 'string') - throw new TypeError('invalid mnemonic type: ' + typeof str); + throw new TypeError(`Invalid mnemonic type: ${typeof str}`); return str.normalize('NFKD'); } function normalize(str) { @@ -58,8 +25,8 @@ function normalize(str) { throw new Error('Invalid mnemonic'); return { nfkd: norm, words }; } -function aentropy(ent) { - (0, utils_1.abytes)(ent, 16, 20, 24, 28, 32); +function assertEntropy(entropy) { + _assert_1.default.bytes(entropy, 16, 20, 24, 28, 32); } /** * Generate x random words. Uses Cryptographically-Secure Random Number Generator. @@ -70,24 +37,25 @@ function aentropy(ent) { * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' */ function generateMnemonic(wordlist, strength = 128) { - (0, utils_1.anumber)(strength); + _assert_1.default.number(strength); if (strength % 32 !== 0 || strength > 256) throw new TypeError('Invalid entropy'); return entropyToMnemonic((0, utils_1.randomBytes)(strength / 8), wordlist); } +exports.generateMnemonic = generateMnemonic; const calcChecksum = (entropy) => { // Checksum is ent.length/4 bits long const bitsLeft = 8 - entropy.length / 4; // Zero rightmost "bitsLeft" bits in byte // For example: bitsLeft=4 val=10111101 -> 10110000 - return new Uint8Array([((0, sha2_1.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]); + return new Uint8Array([((0, sha256_1.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]); }; function getCoder(wordlist) { if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string') - throw new Error('Wordlist: expected array of 2048 strings'); + throw new Error('Worlist: expected array of 2048 strings'); wordlist.forEach((i) => { if (typeof i !== 'string') - throw new Error('wordlist: non-string element: ' + i); + throw new Error(`Wordlist: non-string element: ${i}`); }); return base_1.utils.chain(base_1.utils.checksum(1, calcChecksum), base_1.utils.radix2(11, true), base_1.utils.alphabet(wordlist)); } @@ -107,9 +75,10 @@ function getCoder(wordlist) { function mnemonicToEntropy(mnemonic, wordlist) { const { words } = normalize(mnemonic); const entropy = getCoder(wordlist).decode(words); - aentropy(entropy); + assertEntropy(entropy); return entropy; } +exports.mnemonicToEntropy = mnemonicToEntropy; /** * Reversible: Converts raw entropy in form of byte array to mnemonic string. * @param entropy byte array @@ -124,10 +93,11 @@ function mnemonicToEntropy(mnemonic, wordlist) { * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' */ function entropyToMnemonic(entropy, wordlist) { - aentropy(entropy); + assertEntropy(entropy); const words = getCoder(wordlist).encode(entropy); return words.join(isJapanese(wordlist) ? '\u3000' : ' '); } +exports.entropyToMnemonic = entropyToMnemonic; /** * Validates mnemonic for being 12-24 words contained in `wordlist`. */ @@ -140,7 +110,8 @@ function validateMnemonic(mnemonic, wordlist) { } return true; } -const psalt = (passphrase) => nfkd('mnemonic' + passphrase); +exports.validateMnemonic = validateMnemonic; +const salt = (passphrase) => nfkd(`mnemonic${passphrase}`); /** * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. * @param mnemonic 12-24 words @@ -152,8 +123,9 @@ const psalt = (passphrase) => nfkd('mnemonic' + passphrase); * // new Uint8Array([...64 bytes]) */ function mnemonicToSeed(mnemonic, passphrase = '') { - return (0, pbkdf2_1.pbkdf2Async)(sha2_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); + return (0, pbkdf2_1.pbkdf2Async)(sha512_1.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); } +exports.mnemonicToSeed = mnemonicToSeed; /** * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. * @param mnemonic 12-24 words @@ -165,5 +137,6 @@ function mnemonicToSeed(mnemonic, passphrase = '') { * // new Uint8Array([...64 bytes]) */ function mnemonicToSeedSync(mnemonic, passphrase = '') { - return (0, pbkdf2_1.pbkdf2)(sha2_1.sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); + return (0, pbkdf2_1.pbkdf2)(sha512_1.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); } +exports.mnemonicToSeedSync = mnemonicToSeedSync; diff --git a/node_modules/@scure/bip39/package.json b/node_modules/@scure/bip39/package.json index 270060d5..51102a90 100644 --- a/node_modules/@scure/bip39/package.json +++ b/node_modules/@scure/bip39/package.json @@ -1,94 +1,103 @@ { "name": "@scure/bip39", - "version": "1.6.0", + "version": "1.2.1", "description": "Secure, audited & minimal implementation of BIP39 mnemonic phrases", + "main": "index.js", "files": [ "index.js", "index.d.ts", "wordlists/*.js", "wordlists/*.d.ts", - "esm", - "src/index.ts" + "esm" ], + "types": "index.d.ts", "dependencies": { - "@noble/hashes": "~1.8.0", - "@scure/base": "~1.2.5" + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" }, "devDependencies": { - "@paulmillr/jsbt": "0.3.3", - "micro-bmark": "0.4.1", - "micro-should": "0.5.2", - "prettier": "3.5.3", - "typescript": "5.8.3" + "micro-should": "0.4.0", + "prettier": "2.8.4", + "typescript": "5.0.2" }, "author": "Paul Miller (https://paulmillr.com)", "homepage": "https://paulmillr.com/", "repository": { "type": "git", - "url": "git+https://github.com/paulmillr/scure-bip39.git" + "url": "https://github.com/paulmillr/scure-bip39.git" }, + "contributors": [ + { + "name": "Patricio Palladino", + "email": "patricio@nomiclabs.io" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } + ], "license": "MIT", "scripts": { - "build": "tsc && tsc -p tsconfig.cjs.json", - "build:release": "npx jsbt esbuild test/build", - "lint": "prettier --check 'src/**/*.ts' 'test/*.test.ts' 'scripts/*.js'", - "format": "prettier --write 'src/**/*.ts' 'test/*.test.ts' 'scripts/*.js'", - "test": "node test/index.js", - "test:bun": "bun test/index.js", - "test:deno": "deno --allow-env --allow-read test/index.js", - "fetch-wordlist": "./scripts/fetch-wordlist.js" + "build": "tsc && tsc -p tsconfig.esm.json", + "lint": "prettier --check 'src/**/*.ts' 'test/*.test.ts'", + "format": "prettier --write 'src/**/*.ts' 'test/*.test.ts'", + "test": "cd test && tsc && node bip39.test.js" }, - "sideEffects": false, - "main": "index.js", - "types": "./index.d.ts", "exports": { ".": { + "types": "./index.d.ts", "import": "./esm/index.js", - "require": "./index.js" + "default": "./index.js" }, "./index": { + "types": "./index.d.ts", "import": "./esm/index.js", - "require": "./index.js" + "default": "./index.js" }, "./wordlists/czech": { + "types": "./wordlists/czech.d.ts", "import": "./esm/wordlists/czech.js", - "require": "./wordlists/czech.js" + "default": "./wordlists/czech.js" }, "./wordlists/english": { + "types": "./wordlists/english.d.ts", "import": "./esm/wordlists/english.js", - "require": "./wordlists/english.js" + "default": "./wordlists/english.js" }, "./wordlists/french": { + "types": "./wordlists/french.d.ts", "import": "./esm/wordlists/french.js", - "require": "./wordlists/french.js" + "default": "./wordlists/french.js" }, "./wordlists/italian": { + "types": "./wordlists/italian.d.ts", "import": "./esm/wordlists/italian.js", - "require": "./wordlists/italian.js" + "default": "./wordlists/italian.js" }, "./wordlists/japanese": { + "types": "./wordlists/japanese.d.ts", "import": "./esm/wordlists/japanese.js", - "require": "./wordlists/japanese.js" + "default": "./wordlists/japanese.js" }, "./wordlists/korean": { + "types": "./wordlists/korean.d.ts", "import": "./esm/wordlists/korean.js", - "require": "./wordlists/korean.js" - }, - "./wordlists/portuguese": { - "import": "./esm/wordlists/portuguese.js", - "require": "./wordlists/portuguese.js" + "default": "./wordlists/korean.js" }, "./wordlists/simplified-chinese": { + "types": "./wordlists/simplified-chinese.d.ts", "import": "./esm/wordlists/simplified-chinese.js", - "require": "./wordlists/simplified-chinese.js" + "default": "./wordlists/simplified-chinese.js" }, "./wordlists/spanish": { + "types": "./wordlists/spanish.d.ts", "import": "./esm/wordlists/spanish.js", - "require": "./wordlists/spanish.js" + "default": "./wordlists/spanish.js" }, "./wordlists/traditional-chinese": { + "types": "./wordlists/traditional-chinese.d.ts", "import": "./esm/wordlists/traditional-chinese.js", - "require": "./wordlists/traditional-chinese.js" + "default": "./wordlists/traditional-chinese.js" } }, "keywords": [ @@ -98,8 +107,9 @@ "code", "bip0039", "bip-39", - "wordlist", + "micro", "scure", + "wordlist", "noble" ], "funding": "https://paulmillr.com/funding/" diff --git a/node_modules/@scure/bip39/src/index.ts b/node_modules/@scure/bip39/src/index.ts deleted file mode 100644 index 4284c3e6..00000000 --- a/node_modules/@scure/bip39/src/index.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Audited & minimal JS implementation of - * [BIP39 mnemonic phrases](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki). - * @module - * @example -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); -const ent = bip39.mnemonicToEntropy(mn, wordlist) -bip39.entropyToMnemonic(ent, wordlist); -bip39.validateMnemonic(mn, wordlist); -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); - -// Wordlists -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese'; -import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as traditionalChinese } from '@scure/bip39/wordlists/traditional-chinese'; -``` - */ - -/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */ -import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2'; -import { sha256, sha512 } from '@noble/hashes/sha2'; -import { abytes, anumber, randomBytes } from '@noble/hashes/utils'; -import { utils as baseUtils } from '@scure/base'; - -// Japanese wordlist -const isJapanese = (wordlist: string[]) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093'; - -// Normalization replaces equivalent sequences of characters -// so that any two texts that are equivalent will be reduced -// to the same sequence of code points, called the normal form of the original text. -// https://tonsky.me/blog/unicode/#why-is-a---- -function nfkd(str: string) { - if (typeof str !== 'string') throw new TypeError('invalid mnemonic type: ' + typeof str); - return str.normalize('NFKD'); -} - -function normalize(str: string) { - const norm = nfkd(str); - const words = norm.split(' '); - if (![12, 15, 18, 21, 24].includes(words.length)) throw new Error('Invalid mnemonic'); - return { nfkd: norm, words }; -} - -function aentropy(ent: Uint8Array) { - abytes(ent, 16, 20, 24, 28, 32); -} - -/** - * Generate x random words. Uses Cryptographically-Secure Random Number Generator. - * @param wordlist imported wordlist for specific language - * @param strength mnemonic strength 128-256 bits - * @example - * generateMnemonic(wordlist, 128) - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export function generateMnemonic(wordlist: string[], strength: number = 128): string { - anumber(strength); - if (strength % 32 !== 0 || strength > 256) throw new TypeError('Invalid entropy'); - return entropyToMnemonic(randomBytes(strength / 8), wordlist); -} - -const calcChecksum = (entropy: Uint8Array) => { - // Checksum is ent.length/4 bits long - const bitsLeft = 8 - entropy.length / 4; - // Zero rightmost "bitsLeft" bits in byte - // For example: bitsLeft=4 val=10111101 -> 10110000 - return new Uint8Array([(sha256(entropy)[0]! >> bitsLeft) << bitsLeft]); -}; - -function getCoder(wordlist: string[]) { - if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string') - throw new Error('Wordlist: expected array of 2048 strings'); - wordlist.forEach((i) => { - if (typeof i !== 'string') throw new Error('wordlist: non-string element: ' + i); - }); - return baseUtils.chain( - baseUtils.checksum(1, calcChecksum), - baseUtils.radix2(11, true), - baseUtils.alphabet(wordlist) - ); -} - -/** - * Reversible: Converts mnemonic string to raw entropy in form of byte array. - * @param mnemonic 12-24 words - * @param wordlist imported wordlist for specific language - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToEntropy(mnem, wordlist) - * // Produces - * new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]) - */ -export function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array { - const { words } = normalize(mnemonic); - const entropy = getCoder(wordlist).decode(words); - aentropy(entropy); - return entropy; -} - -/** - * Reversible: Converts raw entropy in form of byte array to mnemonic string. - * @param entropy byte array - * @param wordlist imported wordlist for specific language - * @returns 12-24 words - * @example - * const ent = new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]); - * entropyToMnemonic(ent, wordlist); - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string { - aentropy(entropy); - const words = getCoder(wordlist).encode(entropy); - return words.join(isJapanese(wordlist) ? '\u3000' : ' '); -} - -/** - * Validates mnemonic for being 12-24 words contained in `wordlist`. - */ -export function validateMnemonic(mnemonic: string, wordlist: string[]): boolean { - try { - mnemonicToEntropy(mnemonic, wordlist); - } catch (e) { - return false; - } - return true; -} - -const psalt = (passphrase: string) => nfkd('mnemonic' + passphrase); - -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * await mnemonicToSeed(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export function mnemonicToSeed(mnemonic: string, passphrase = ''): Promise { - return pbkdf2Async(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); -} - -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToSeedSync(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export function mnemonicToSeedSync(mnemonic: string, passphrase = ''): Uint8Array { - return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 }); -} diff --git a/node_modules/@scure/bip39/wordlists/portuguese.d.ts b/node_modules/@scure/bip39/wordlists/portuguese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/@scure/bip39/wordlists/portuguese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/@scure/bip39/wordlists/portuguese.js b/node_modules/@scure/bip39/wordlists/portuguese.js deleted file mode 100644 index 5eac9efe..00000000 --- a/node_modules/@scure/bip39/wordlists/portuguese.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `abacate -abaixo -abalar -abater -abduzir -abelha -aberto -abismo -abotoar -abranger -abreviar -abrigar -abrupto -absinto -absoluto -absurdo -abutre -acabado -acalmar -acampar -acanhar -acaso -aceitar -acelerar -acenar -acervo -acessar -acetona -achatar -acidez -acima -acionado -acirrar -aclamar -aclive -acolhida -acomodar -acoplar -acordar -acumular -acusador -adaptar -adega -adentro -adepto -adequar -aderente -adesivo -adeus -adiante -aditivo -adjetivo -adjunto -admirar -adorar -adquirir -adubo -adverso -advogado -aeronave -afastar -aferir -afetivo -afinador -afivelar -aflito -afluente -afrontar -agachar -agarrar -agasalho -agenciar -agilizar -agiota -agitado -agora -agradar -agreste -agrupar -aguardar -agulha -ajoelhar -ajudar -ajustar -alameda -alarme -alastrar -alavanca -albergue -albino -alcatra -aldeia -alecrim -alegria -alertar -alface -alfinete -algum -alheio -aliar -alicate -alienar -alinhar -aliviar -almofada -alocar -alpiste -alterar -altitude -alucinar -alugar -aluno -alusivo -alvo -amaciar -amador -amarelo -amassar -ambas -ambiente -ameixa -amenizar -amido -amistoso -amizade -amolador -amontoar -amoroso -amostra -amparar -ampliar -ampola -anagrama -analisar -anarquia -anatomia -andaime -anel -anexo -angular -animar -anjo -anomalia -anotado -ansioso -anterior -anuidade -anunciar -anzol -apagador -apalpar -apanhado -apego -apelido -apertada -apesar -apetite -apito -aplauso -aplicada -apoio -apontar -aposta -aprendiz -aprovar -aquecer -arame -aranha -arara -arcada -ardente -areia -arejar -arenito -aresta -argiloso -argola -arma -arquivo -arraial -arrebate -arriscar -arroba -arrumar -arsenal -arterial -artigo -arvoredo -asfaltar -asilado -aspirar -assador -assinar -assoalho -assunto -astral -atacado -atadura -atalho -atarefar -atear -atender -aterro -ateu -atingir -atirador -ativo -atoleiro -atracar -atrevido -atriz -atual -atum -auditor -aumentar -aura -aurora -autismo -autoria -autuar -avaliar -avante -avaria -avental -avesso -aviador -avisar -avulso -axila -azarar -azedo -azeite -azulejo -babar -babosa -bacalhau -bacharel -bacia -bagagem -baiano -bailar -baioneta -bairro -baixista -bajular -baleia -baliza -balsa -banal -bandeira -banho -banir -banquete -barato -barbado -baronesa -barraca -barulho -baseado -bastante -batata -batedor -batida -batom -batucar -baunilha -beber -beijo -beirada -beisebol -beldade -beleza -belga -beliscar -bendito -bengala -benzer -berimbau -berlinda -berro -besouro -bexiga -bezerro -bico -bicudo -bienal -bifocal -bifurcar -bigorna -bilhete -bimestre -bimotor -biologia -biombo -biosfera -bipolar -birrento -biscoito -bisneto -bispo -bissexto -bitola -bizarro -blindado -bloco -bloquear -boato -bobagem -bocado -bocejo -bochecha -boicotar -bolada -boletim -bolha -bolo -bombeiro -bonde -boneco -bonita -borbulha -borda -boreal -borracha -bovino -boxeador -branco -brasa -braveza -breu -briga -brilho -brincar -broa -brochura -bronzear -broto -bruxo -bucha -budismo -bufar -bule -buraco -busca -busto -buzina -cabana -cabelo -cabide -cabo -cabrito -cacau -cacetada -cachorro -cacique -cadastro -cadeado -cafezal -caiaque -caipira -caixote -cajado -caju -calafrio -calcular -caldeira -calibrar -calmante -calota -camada -cambista -camisa -camomila -campanha -camuflar -canavial -cancelar -caneta -canguru -canhoto -canivete -canoa -cansado -cantar -canudo -capacho -capela -capinar -capotar -capricho -captador -capuz -caracol -carbono -cardeal -careca -carimbar -carneiro -carpete -carreira -cartaz -carvalho -casaco -casca -casebre -castelo -casulo -catarata -cativar -caule -causador -cautelar -cavalo -caverna -cebola -cedilha -cegonha -celebrar -celular -cenoura -censo -centeio -cercar -cerrado -certeiro -cerveja -cetim -cevada -chacota -chaleira -chamado -chapada -charme -chatice -chave -chefe -chegada -cheiro -cheque -chicote -chifre -chinelo -chocalho -chover -chumbo -chutar -chuva -cicatriz -ciclone -cidade -cidreira -ciente -cigana -cimento -cinto -cinza -ciranda -circuito -cirurgia -citar -clareza -clero -clicar -clone -clube -coado -coagir -cobaia -cobertor -cobrar -cocada -coelho -coentro -coeso -cogumelo -coibir -coifa -coiote -colar -coleira -colher -colidir -colmeia -colono -coluna -comando -combinar -comentar -comitiva -comover -complexo -comum -concha -condor -conectar -confuso -congelar -conhecer -conjugar -consumir -contrato -convite -cooperar -copeiro -copiador -copo -coquetel -coragem -cordial -corneta -coronha -corporal -correio -cortejo -coruja -corvo -cosseno -costela -cotonete -couro -couve -covil -cozinha -cratera -cravo -creche -credor -creme -crer -crespo -criada -criminal -crioulo -crise -criticar -crosta -crua -cruzeiro -cubano -cueca -cuidado -cujo -culatra -culminar -culpar -cultura -cumprir -cunhado -cupido -curativo -curral -cursar -curto -cuspir -custear -cutelo -damasco -datar -debater -debitar -deboche -debulhar -decalque -decimal -declive -decote -decretar -dedal -dedicado -deduzir -defesa -defumar -degelo -degrau -degustar -deitado -deixar -delator -delegado -delinear -delonga -demanda -demitir -demolido -dentista -depenado -depilar -depois -depressa -depurar -deriva -derramar -desafio -desbotar -descanso -desenho -desfiado -desgaste -desigual -deslize -desmamar -desova -despesa -destaque -desviar -detalhar -detentor -detonar -detrito -deusa -dever -devido -devotado -dezena -diagrama -dialeto -didata -difuso -digitar -dilatado -diluente -diminuir -dinastia -dinheiro -diocese -direto -discreta -disfarce -disparo -disquete -dissipar -distante -ditador -diurno -diverso -divisor -divulgar -dizer -dobrador -dolorido -domador -dominado -donativo -donzela -dormente -dorsal -dosagem -dourado -doutor -drenagem -drible -drogaria -duelar -duende -dueto -duplo -duquesa -durante -duvidoso -eclodir -ecoar -ecologia -edificar -edital -educado -efeito -efetivar -ejetar -elaborar -eleger -eleitor -elenco -elevador -eliminar -elogiar -embargo -embolado -embrulho -embutido -emenda -emergir -emissor -empatia -empenho -empinado -empolgar -emprego -empurrar -emulador -encaixe -encenado -enchente -encontro -endeusar -endossar -enfaixar -enfeite -enfim -engajado -engenho -englobar -engomado -engraxar -enguia -enjoar -enlatar -enquanto -enraizar -enrolado -enrugar -ensaio -enseada -ensino -ensopado -entanto -enteado -entidade -entortar -entrada -entulho -envergar -enviado -envolver -enxame -enxerto -enxofre -enxuto -epiderme -equipar -ereto -erguido -errata -erva -ervilha -esbanjar -esbelto -escama -escola -escrita -escuta -esfinge -esfolar -esfregar -esfumado -esgrima -esmalte -espanto -espelho -espiga -esponja -espreita -espumar -esquerda -estaca -esteira -esticar -estofado -estrela -estudo -esvaziar -etanol -etiqueta -euforia -europeu -evacuar -evaporar -evasivo -eventual -evidente -evoluir -exagero -exalar -examinar -exato -exausto -excesso -excitar -exclamar -executar -exemplo -exibir -exigente -exonerar -expandir -expelir -expirar -explanar -exposto -expresso -expulsar -externo -extinto -extrato -fabricar -fabuloso -faceta -facial -fada -fadiga -faixa -falar -falta -familiar -fandango -fanfarra -fantoche -fardado -farelo -farinha -farofa -farpa -fartura -fatia -fator -favorita -faxina -fazenda -fechado -feijoada -feirante -felino -feminino -fenda -feno -fera -feriado -ferrugem -ferver -festejar -fetal -feudal -fiapo -fibrose -ficar -ficheiro -figurado -fileira -filho -filme -filtrar -firmeza -fisgada -fissura -fita -fivela -fixador -fixo -flacidez -flamingo -flanela -flechada -flora -flutuar -fluxo -focal -focinho -fofocar -fogo -foguete -foice -folgado -folheto -forjar -formiga -forno -forte -fosco -fossa -fragata -fralda -frango -frasco -fraterno -freira -frente -fretar -frieza -friso -fritura -fronha -frustrar -fruteira -fugir -fulano -fuligem -fundar -fungo -funil -furador -furioso -futebol -gabarito -gabinete -gado -gaiato -gaiola -gaivota -galega -galho -galinha -galocha -ganhar -garagem -garfo -gargalo -garimpo -garoupa -garrafa -gasoduto -gasto -gata -gatilho -gaveta -gazela -gelado -geleia -gelo -gemada -gemer -gemido -generoso -gengiva -genial -genoma -genro -geologia -gerador -germinar -gesso -gestor -ginasta -gincana -gingado -girafa -girino -glacial -glicose -global -glorioso -goela -goiaba -golfe -golpear -gordura -gorjeta -gorro -gostoso -goteira -governar -gracejo -gradual -grafite -gralha -grampo -granada -gratuito -graveto -graxa -grego -grelhar -greve -grilo -grisalho -gritaria -grosso -grotesco -grudado -grunhido -gruta -guache -guarani -guaxinim -guerrear -guiar -guincho -guisado -gula -guloso -guru -habitar -harmonia -haste -haver -hectare -herdar -heresia -hesitar -hiato -hibernar -hidratar -hiena -hino -hipismo -hipnose -hipoteca -hoje -holofote -homem -honesto -honrado -hormonal -hospedar -humorado -iate -ideia -idoso -ignorado -igreja -iguana -ileso -ilha -iludido -iluminar -ilustrar -imagem -imediato -imenso -imersivo -iminente -imitador -imortal -impacto -impedir -implante -impor -imprensa -impune -imunizar -inalador -inapto -inativo -incenso -inchar -incidir -incluir -incolor -indeciso -indireto -indutor -ineficaz -inerente -infantil -infestar -infinito -inflamar -informal -infrator -ingerir -inibido -inicial -inimigo -injetar -inocente -inodoro -inovador -inox -inquieto -inscrito -inseto -insistir -inspetor -instalar -insulto -intacto -integral -intimar -intocado -intriga -invasor -inverno -invicto -invocar -iogurte -iraniano -ironizar -irreal -irritado -isca -isento -isolado -isqueiro -italiano -janeiro -jangada -janta -jararaca -jardim -jarro -jasmim -jato -javali -jazida -jejum -joaninha -joelhada -jogador -joia -jornal -jorrar -jovem -juba -judeu -judoca -juiz -julgador -julho -jurado -jurista -juro -justa -labareda -laboral -lacre -lactante -ladrilho -lagarta -lagoa -laje -lamber -lamentar -laminar -lampejo -lanche -lapidar -lapso -laranja -lareira -largura -lasanha -lastro -lateral -latido -lavanda -lavoura -lavrador -laxante -lazer -lealdade -lebre -legado -legendar -legista -leigo -leiloar -leitura -lembrete -leme -lenhador -lentilha -leoa -lesma -leste -letivo -letreiro -levar -leveza -levitar -liberal -libido -liderar -ligar -ligeiro -limitar -limoeiro -limpador -linda -linear -linhagem -liquidez -listagem -lisura -litoral -livro -lixa -lixeira -locador -locutor -lojista -lombo -lona -longe -lontra -lorde -lotado -loteria -loucura -lousa -louvar -luar -lucidez -lucro -luneta -lustre -lutador -luva -macaco -macete -machado -macio -madeira -madrinha -magnata -magreza -maior -mais -malandro -malha -malote -maluco -mamilo -mamoeiro -mamute -manada -mancha -mandato -manequim -manhoso -manivela -manobrar -mansa -manter -manusear -mapeado -maquinar -marcador -maresia -marfim -margem -marinho -marmita -maroto -marquise -marreco -martelo -marujo -mascote -masmorra -massagem -mastigar -matagal -materno -matinal -matutar -maxilar -medalha -medida -medusa -megafone -meiga -melancia -melhor -membro -memorial -menino -menos -mensagem -mental -merecer -mergulho -mesada -mesclar -mesmo -mesquita -mestre -metade -meteoro -metragem -mexer -mexicano -micro -migalha -migrar -milagre -milenar -milhar -mimado -minerar -minhoca -ministro -minoria -miolo -mirante -mirtilo -misturar -mocidade -moderno -modular -moeda -moer -moinho -moita -moldura -moleza -molho -molinete -molusco -montanha -moqueca -morango -morcego -mordomo -morena -mosaico -mosquete -mostarda -motel -motim -moto -motriz -muda -muito -mulata -mulher -multar -mundial -munido -muralha -murcho -muscular -museu -musical -nacional -nadador -naja -namoro -narina -narrado -nascer -nativa -natureza -navalha -navegar -navio -neblina -nebuloso -negativa -negociar -negrito -nervoso -neta -neural -nevasca -nevoeiro -ninar -ninho -nitidez -nivelar -nobreza -noite -noiva -nomear -nominal -nordeste -nortear -notar -noticiar -noturno -novelo -novilho -novo -nublado -nudez -numeral -nupcial -nutrir -nuvem -obcecado -obedecer -objetivo -obrigado -obscuro -obstetra -obter -obturar -ocidente -ocioso -ocorrer -oculista -ocupado -ofegante -ofensiva -oferenda -oficina -ofuscado -ogiva -olaria -oleoso -olhar -oliveira -ombro -omelete -omisso -omitir -ondulado -oneroso -ontem -opcional -operador -oponente -oportuno -oposto -orar -orbitar -ordem -ordinal -orfanato -orgasmo -orgulho -oriental -origem -oriundo -orla -ortodoxo -orvalho -oscilar -ossada -osso -ostentar -otimismo -ousadia -outono -outubro -ouvido -ovelha -ovular -oxidar -oxigenar -pacato -paciente -pacote -pactuar -padaria -padrinho -pagar -pagode -painel -pairar -paisagem -palavra -palestra -palheta -palito -palmada -palpitar -pancada -panela -panfleto -panqueca -pantanal -papagaio -papelada -papiro -parafina -parcial -pardal -parede -partida -pasmo -passado -pastel -patamar -patente -patinar -patrono -paulada -pausar -peculiar -pedalar -pedestre -pediatra -pedra -pegada -peitoral -peixe -pele -pelicano -penca -pendurar -peneira -penhasco -pensador -pente -perceber -perfeito -pergunta -perito -permitir -perna -perplexo -persiana -pertence -peruca -pescado -pesquisa -pessoa -petiscar -piada -picado -piedade -pigmento -pilastra -pilhado -pilotar -pimenta -pincel -pinguim -pinha -pinote -pintar -pioneiro -pipoca -piquete -piranha -pires -pirueta -piscar -pistola -pitanga -pivete -planta -plaqueta -platina -plebeu -plumagem -pluvial -pneu -poda -poeira -poetisa -polegada -policiar -poluente -polvilho -pomar -pomba -ponderar -pontaria -populoso -porta -possuir -postal -pote -poupar -pouso -povoar -praia -prancha -prato -praxe -prece -predador -prefeito -premiar -prensar -preparar -presilha -pretexto -prevenir -prezar -primata -princesa -prisma -privado -processo -produto -profeta -proibido -projeto -prometer -propagar -prosa -protetor -provador -publicar -pudim -pular -pulmonar -pulseira -punhal -punir -pupilo -pureza -puxador -quadra -quantia -quarto -quase -quebrar -queda -queijo -quente -querido -quimono -quina -quiosque -rabanada -rabisco -rachar -racionar -radial -raiar -rainha -raio -raiva -rajada -ralado -ramal -ranger -ranhura -rapadura -rapel -rapidez -raposa -raquete -raridade -rasante -rascunho -rasgar -raspador -rasteira -rasurar -ratazana -ratoeira -realeza -reanimar -reaver -rebaixar -rebelde -rebolar -recado -recente -recheio -recibo -recordar -recrutar -recuar -rede -redimir -redonda -reduzida -reenvio -refinar -refletir -refogar -refresco -refugiar -regalia -regime -regra -reinado -reitor -rejeitar -relativo -remador -remendo -remorso -renovado -reparo -repelir -repleto -repolho -represa -repudiar -requerer -resenha -resfriar -resgatar -residir -resolver -respeito -ressaca -restante -resumir -retalho -reter -retirar -retomada -retratar -revelar -revisor -revolta -riacho -rica -rigidez -rigoroso -rimar -ringue -risada -risco -risonho -robalo -rochedo -rodada -rodeio -rodovia -roedor -roleta -romano -roncar -rosado -roseira -rosto -rota -roteiro -rotina -rotular -rouco -roupa -roxo -rubro -rugido -rugoso -ruivo -rumo -rupestre -russo -sabor -saciar -sacola -sacudir -sadio -safira -saga -sagrada -saibro -salada -saleiro -salgado -saliva -salpicar -salsicha -saltar -salvador -sambar -samurai -sanar -sanfona -sangue -sanidade -sapato -sarda -sargento -sarjeta -saturar -saudade -saxofone -sazonal -secar -secular -seda -sedento -sediado -sedoso -sedutor -segmento -segredo -segundo -seiva -seleto -selvagem -semanal -semente -senador -senhor -sensual -sentado -separado -sereia -seringa -serra -servo -setembro -setor -sigilo -silhueta -silicone -simetria -simpatia -simular -sinal -sincero -singular -sinopse -sintonia -sirene -siri -situado -soberano -sobra -socorro -sogro -soja -solda -soletrar -solteiro -sombrio -sonata -sondar -sonegar -sonhador -sono -soprano -soquete -sorrir -sorteio -sossego -sotaque -soterrar -sovado -sozinho -suavizar -subida -submerso -subsolo -subtrair -sucata -sucesso -suco -sudeste -sufixo -sugador -sugerir -sujeito -sulfato -sumir -suor -superior -suplicar -suposto -suprimir -surdina -surfista -surpresa -surreal -surtir -suspiro -sustento -tabela -tablete -tabuada -tacho -tagarela -talher -talo -talvez -tamanho -tamborim -tampa -tangente -tanto -tapar -tapioca -tardio -tarefa -tarja -tarraxa -tatuagem -taurino -taxativo -taxista -teatral -tecer -tecido -teclado -tedioso -teia -teimar -telefone -telhado -tempero -tenente -tensor -tentar -termal -terno -terreno -tese -tesoura -testado -teto -textura -texugo -tiara -tigela -tijolo -timbrar -timidez -tingido -tinteiro -tiragem -titular -toalha -tocha -tolerar -tolice -tomada -tomilho -tonel -tontura -topete -tora -torcido -torneio -torque -torrada -torto -tostar -touca -toupeira -toxina -trabalho -tracejar -tradutor -trafegar -trajeto -trama -trancar -trapo -traseiro -tratador -travar -treino -tremer -trepidar -trevo -triagem -tribo -triciclo -tridente -trilogia -trindade -triplo -triturar -triunfal -trocar -trombeta -trova -trunfo -truque -tubular -tucano -tudo -tulipa -tupi -turbo -turma -turquesa -tutelar -tutorial -uivar -umbigo -unha -unidade -uniforme -urologia -urso -urtiga -urubu -usado -usina -usufruir -vacina -vadiar -vagaroso -vaidoso -vala -valente -validade -valores -vantagem -vaqueiro -varanda -vareta -varrer -vascular -vasilha -vassoura -vazar -vazio -veado -vedar -vegetar -veicular -veleiro -velhice -veludo -vencedor -vendaval -venerar -ventre -verbal -verdade -vereador -vergonha -vermelho -verniz -versar -vertente -vespa -vestido -vetorial -viaduto -viagem -viajar -viatura -vibrador -videira -vidraria -viela -viga -vigente -vigiar -vigorar -vilarejo -vinco -vinheta -vinil -violeta -virada -virtude -visitar -visto -vitral -viveiro -vizinho -voador -voar -vogal -volante -voleibol -voltagem -volumoso -vontade -vulto -vuvuzela -xadrez -xarope -xeque -xeretar -xerife -xingar -zangado -zarpar -zebu -zelador -zombar -zoologia -zumbido`.split('\n'); diff --git a/node_modules/applesauce-content/package.json b/node_modules/applesauce-content/package.json index 6c87f7b3..a4f2f12c 100644 --- a/node_modules/applesauce-content/package.json +++ b/node_modules/applesauce-content/package.json @@ -1,19 +1,17 @@ { "name": "applesauce-content", - "version": "3.1.0", + "version": "4.0.0", "description": "Unified plugins for processing event content", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", "keywords": [ - "nostr", - "applesauce" + "nostr" ], "author": "hzrd149", "license": "MIT", "files": [ - "dist", - "applesauce" + "dist" ], "exports": { ".": { @@ -48,28 +46,30 @@ } }, "dependencies": { - "@cashu/cashu-ts": "2.0.0-rc1", + "@cashu/cashu-ts": "^2.7.2", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3", - "applesauce-core": "^3.1.0", + "applesauce-core": "^4.0.0", "mdast-util-find-and-replace": "^3.0.2", - "nostr-tools": "~2.15", + "nostr-tools": "~2.17", "remark": "^15.0.1", "remark-parse": "^11.0.0", "unified": "^11.0.5", "unist-util-visit-parents": "^6.0.1" }, "devDependencies": { + "applesauce-signers": "^4.0.0", + "rimraf": "^6.0.1", "typescript": "^5.8.3", - "applesauce-signers": "^3.1.0", - "vitest": "^3.2.3" + "vitest": "^3.2.4" }, "funding": { "type": "lightning", "url": "lightning:nostrudel@geyser.fund" }, "scripts": { + "prebuild": "rimraf dist", "build": "tsc", "watch:build": "tsc --watch > /dev/null", "test": "vitest run --passWithNoTests", diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/LICENSE b/node_modules/nostr-tools/node_modules/@scure/bip39/LICENSE deleted file mode 100644 index 68222b80..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/README.md b/node_modules/nostr-tools/node_modules/@scure/bip39/README.md deleted file mode 100644 index 281df3b2..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# scure-bip39 - -Secure, [audited](#security) & minimal implementation of BIP39 mnemonic phrases. - -Compared to popular `bip39` package, scure-bip39: - -- Supports ESM and common.js -- Supports tree-shaking: only actually used wordlists are bundled -- Is 491KB all-bundled instead of 1.3MB -- Uses 2 dependencies instead of 15 -- Wordlists are 157KB instead of 315KB -- Had an external security [audit](#security) by Cure53 - -Check out [scure-bip32](https://github.com/paulmillr/scure-bip32) if you need -hierarchical deterministic wallets ("HD Wallets"). - -### This library belongs to *scure* - -> **scure** — secure, independently audited packages for every use case. - -- All releases are signed with PGP keys -- As minimal as possible -- Check out all libraries: - [base](https://github.com/paulmillr/scure-base), - [bip32](https://github.com/paulmillr/scure-bip32), - [bip39](https://github.com/paulmillr/scure-bip39), - [btc-signer](https://github.com/paulmillr/scure-btc-signer) - -## Usage - -> npm install @scure/bip39 - -Or - -> yarn add @scure/bip39 - -```js -import * as bip39 from '@scure/bip39'; -import { wordlist } from '@scure/bip39/wordlists/english'; - -// Generate x random words. Uses Cryptographically-Secure Random Number Generator. -const mn = bip39.generateMnemonic(wordlist); -console.log(mn); - -// Reversible: Converts mnemonic string to raw entropy in form of byte array. -const ent = bip39.mnemonicToEntropy(mn, wordlist) - -// Reversible: Converts raw entropy in form of byte array to mnemonic string. -bip39.entropyToMnemonic(ent, wordlist); - -// Validates mnemonic for being 12-24 words contained in `wordlist`. -bip39.validateMnemonic(mn, wordlist); - -// Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. -await bip39.mnemonicToSeed(mn, 'password'); -bip39.mnemonicToSeedSync(mn, 'password'); -``` - -This submodule contains the word lists defined by BIP39 for Czech, English, French, Italian, Japanese, Korean, Simplified and Traditional Chinese, and Spanish. These are not imported by default, as that would increase bundle sizes too much. Instead, you should import and use them explicitly. - -```typescript -function generateMnemonic(wordlist: string[], strength?: number): string; -function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array; -function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string; -function validateMnemonic(mnemonic: string, wordlist: string[]): boolean; -function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise; -function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array; -``` - -All wordlists: - -```typescript -import { wordlist as czech } from '@scure/bip39/wordlists/czech'; -import { wordlist as english } from '@scure/bip39/wordlists/english'; -import { wordlist as french } from '@scure/bip39/wordlists/french'; -import { wordlist as italian } from '@scure/bip39/wordlists/italian'; -import { wordlist as japanese } from '@scure/bip39/wordlists/japanese'; -import { wordlist as korean } from '@scure/bip39/wordlists/korean'; -import { wordlist as simp } from '@scure/bip39/wordlists/simplified-chinese'; -import { wordlist as spanish } from '@scure/bip39/wordlists/spanish'; -import { wordlist as trad } from '@scure/bip39/wordlists/traditional-chinese'; -``` - -## Security - -The library has been audited by Cure53 on Jan 5, 2022. Check out the audit [PDF](./audit/2022-01-05-cure53-audit-nbl2.pdf) & [URL](https://cure53.de/pentest-report_hashing-libs.pdf). See [changes since audit](https://github.com/paulmillr/scure-bip39/compare/1.0.0..main). - -1. The library was initially developed for [js-ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography) -2. At commit [ae00e6d7](https://github.com/ethereum/js-ethereum-cryptography/commit/ae00e6d7d24fb3c76a1c7fe10039f6ecd120b77e), it - was extracted to a separate package called `micro-bip39` -3. After the audit we've decided to use NPM namespace for security. Since `@micro` namespace was taken, we've renamed the package to `@scure/bip39` - -## License - -[MIT License](./LICENSE) - -Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js deleted file mode 100644 index fd55e60b..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js +++ /dev/null @@ -1,69 +0,0 @@ -import assert from '@noble/hashes/_assert'; -import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2'; -import { sha256 } from '@noble/hashes/sha256'; -import { sha512 } from '@noble/hashes/sha512'; -import { randomBytes } from '@noble/hashes/utils'; -import { utils as baseUtils } from '@scure/base'; -const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093'; -function nfkd(str) { - if (typeof str !== 'string') - throw new TypeError(`Invalid mnemonic type: ${typeof str}`); - return str.normalize('NFKD'); -} -function normalize(str) { - const norm = nfkd(str); - const words = norm.split(' '); - if (![12, 15, 18, 21, 24].includes(words.length)) - throw new Error('Invalid mnemonic'); - return { nfkd: norm, words }; -} -function assertEntropy(entropy) { - assert.bytes(entropy, 16, 20, 24, 28, 32); -} -export function generateMnemonic(wordlist, strength = 128) { - assert.number(strength); - if (strength % 32 !== 0 || strength > 256) - throw new TypeError('Invalid entropy'); - return entropyToMnemonic(randomBytes(strength / 8), wordlist); -} -const calcChecksum = (entropy) => { - const bitsLeft = 8 - entropy.length / 4; - return new Uint8Array([(sha256(entropy)[0] >> bitsLeft) << bitsLeft]); -}; -function getCoder(wordlist) { - if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string') - throw new Error('Worlist: expected array of 2048 strings'); - wordlist.forEach((i) => { - if (typeof i !== 'string') - throw new Error(`Wordlist: non-string element: ${i}`); - }); - return baseUtils.chain(baseUtils.checksum(1, calcChecksum), baseUtils.radix2(11, true), baseUtils.alphabet(wordlist)); -} -export function mnemonicToEntropy(mnemonic, wordlist) { - const { words } = normalize(mnemonic); - const entropy = getCoder(wordlist).decode(words); - assertEntropy(entropy); - return entropy; -} -export function entropyToMnemonic(entropy, wordlist) { - assertEntropy(entropy); - const words = getCoder(wordlist).encode(entropy); - return words.join(isJapanese(wordlist) ? '\u3000' : ' '); -} -export function validateMnemonic(mnemonic, wordlist) { - try { - mnemonicToEntropy(mnemonic, wordlist); - } - catch (e) { - return false; - } - return true; -} -const salt = (passphrase) => nfkd(`mnemonic${passphrase}`); -export function mnemonicToSeed(mnemonic, passphrase = '') { - return pbkdf2Async(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); -} -export function mnemonicToSeedSync(mnemonic, passphrase = '') { - return pbkdf2(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js.map deleted file mode 100644 index a8297d20..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,UAAU,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,sCAAsC,CAAC;AAKlG,SAAS,IAAI,CAAC,GAAW;IACvB,IAAI,OAAO,GAAG,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,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC3D,CAAC;AAKD,MAAM,UAAU,gBAAgB,CAAC,QAAgB,EAAE,QAAkB;IACnE,IAAI;QACF,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;KACvC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,UAAU,EAAE,CAAC,CAAC;AAYnE,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,UAAU,GAAG,EAAE;IAC9D,OAAO,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AACjG,CAAC;AAYD,MAAM,UAAU,kBAAkB,CAAC,QAAgB,EAAE,UAAU,GAAG,EAAE;IAClE,OAAO,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5F,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/package.json b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/package.json deleted file mode 100644 index aead43de..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/czech.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/czech.js deleted file mode 100644 index cf7b564f..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/czech.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `abdikace -abeceda -adresa -agrese -akce -aktovka -alej -alkohol -amputace -ananas -andulka -anekdota -anketa -antika -anulovat -archa -arogance -asfalt -asistent -aspirace -astma -astronom -atlas -atletika -atol -autobus -azyl -babka -bachor -bacil -baculka -badatel -bageta -bagr -bahno -bakterie -balada -baletka -balkon -balonek -balvan -balza -bambus -bankomat -barbar -baret -barman -baroko -barva -baterka -batoh -bavlna -bazalka -bazilika -bazuka -bedna -beran -beseda -bestie -beton -bezinka -bezmoc -beztak -bicykl -bidlo -biftek -bikiny -bilance -biograf -biolog -bitva -bizon -blahobyt -blatouch -blecha -bledule -blesk -blikat -blizna -blokovat -bloudit -blud -bobek -bobr -bodlina -bodnout -bohatost -bojkot -bojovat -bokorys -bolest -borec -borovice -bota -boubel -bouchat -bouda -boule -bourat -boxer -bradavka -brambora -branka -bratr -brepta -briketa -brko -brloh -bronz -broskev -brunetka -brusinka -brzda -brzy -bublina -bubnovat -buchta -buditel -budka -budova -bufet -bujarost -bukvice -buldok -bulva -bunda -bunkr -burza -butik -buvol -buzola -bydlet -bylina -bytovka -bzukot -capart -carevna -cedr -cedule -cejch -cejn -cela -celer -celkem -celnice -cenina -cennost -cenovka -centrum -cenzor -cestopis -cetka -chalupa -chapadlo -charita -chata -chechtat -chemie -chichot -chirurg -chlad -chleba -chlubit -chmel -chmura -chobot -chochol -chodba -cholera -chomout -chopit -choroba -chov -chrapot -chrlit -chrt -chrup -chtivost -chudina -chutnat -chvat -chvilka -chvost -chyba -chystat -chytit -cibule -cigareta -cihelna -cihla -cinkot -cirkus -cisterna -citace -citrus -cizinec -cizost -clona -cokoliv -couvat -ctitel -ctnost -cudnost -cuketa -cukr -cupot -cvaknout -cval -cvik -cvrkot -cyklista -daleko -dareba -datel -datum -dcera -debata -dechovka -decibel -deficit -deflace -dekl -dekret -demokrat -deprese -derby -deska -detektiv -dikobraz -diktovat -dioda -diplom -disk -displej -divadlo -divoch -dlaha -dlouho -dluhopis -dnes -dobro -dobytek -docent -dochutit -dodnes -dohled -dohoda -dohra -dojem -dojnice -doklad -dokola -doktor -dokument -dolar -doleva -dolina -doma -dominant -domluvit -domov -donutit -dopad -dopis -doplnit -doposud -doprovod -dopustit -dorazit -dorost -dort -dosah -doslov -dostatek -dosud -dosyta -dotaz -dotek -dotknout -doufat -doutnat -dovozce -dozadu -doznat -dozorce -drahota -drak -dramatik -dravec -draze -drdol -drobnost -drogerie -drozd -drsnost -drtit -drzost -duben -duchovno -dudek -duha -duhovka -dusit -dusno -dutost -dvojice -dvorec -dynamit -ekolog -ekonomie -elektron -elipsa -email -emise -emoce -empatie -epizoda -epocha -epopej -epos -esej -esence -eskorta -eskymo -etiketa -euforie -evoluce -exekuce -exkurze -expedice -exploze -export -extrakt -facka -fajfka -fakulta -fanatik -fantazie -farmacie -favorit -fazole -federace -fejeton -fenka -fialka -figurant -filozof -filtr -finance -finta -fixace -fjord -flanel -flirt -flotila -fond -fosfor -fotbal -fotka -foton -frakce -freska -fronta -fukar -funkce -fyzika -galeje -garant -genetika -geolog -gilotina -glazura -glejt -golem -golfista -gotika -graf -gramofon -granule -grep -gril -grog -groteska -guma -hadice -hadr -hala -halenka -hanba -hanopis -harfa -harpuna -havran -hebkost -hejkal -hejno -hejtman -hektar -helma -hematom -herec -herna -heslo -hezky -historik -hladovka -hlasivky -hlava -hledat -hlen -hlodavec -hloh -hloupost -hltat -hlubina -hluchota -hmat -hmota -hmyz -hnis -hnojivo -hnout -hoblina -hoboj -hoch -hodiny -hodlat -hodnota -hodovat -hojnost -hokej -holinka -holka -holub -homole -honitba -honorace -horal -horda -horizont -horko -horlivec -hormon -hornina -horoskop -horstvo -hospoda -hostina -hotovost -houba -houf -houpat -houska -hovor -hradba -hranice -hravost -hrazda -hrbolek -hrdina -hrdlo -hrdost -hrnek -hrobka -hromada -hrot -hrouda -hrozen -hrstka -hrubost -hryzat -hubenost -hubnout -hudba -hukot -humr -husita -hustota -hvozd -hybnost -hydrant -hygiena -hymna -hysterik -idylka -ihned -ikona -iluze -imunita -infekce -inflace -inkaso -inovace -inspekce -internet -invalida -investor -inzerce -ironie -jablko -jachta -jahoda -jakmile -jakost -jalovec -jantar -jarmark -jaro -jasan -jasno -jatka -javor -jazyk -jedinec -jedle -jednatel -jehlan -jekot -jelen -jelito -jemnost -jenom -jepice -jeseter -jevit -jezdec -jezero -jinak -jindy -jinoch -jiskra -jistota -jitrnice -jizva -jmenovat -jogurt -jurta -kabaret -kabel -kabinet -kachna -kadet -kadidlo -kahan -kajak -kajuta -kakao -kaktus -kalamita -kalhoty -kalibr -kalnost -kamera -kamkoliv -kamna -kanibal -kanoe -kantor -kapalina -kapela -kapitola -kapka -kaple -kapota -kapr -kapusta -kapybara -karamel -karotka -karton -kasa -katalog -katedra -kauce -kauza -kavalec -kazajka -kazeta -kazivost -kdekoliv -kdesi -kedluben -kemp -keramika -kino -klacek -kladivo -klam -klapot -klasika -klaun -klec -klenba -klepat -klesnout -klid -klima -klisna -klobouk -klokan -klopa -kloub -klubovna -klusat -kluzkost -kmen -kmitat -kmotr -kniha -knot -koalice -koberec -kobka -kobliha -kobyla -kocour -kohout -kojenec -kokos -koktejl -kolaps -koleda -kolize -kolo -komando -kometa -komik -komnata -komora -kompas -komunita -konat -koncept -kondice -konec -konfese -kongres -konina -konkurs -kontakt -konzerva -kopanec -kopie -kopnout -koprovka -korbel -korektor -kormidlo -koroptev -korpus -koruna -koryto -korzet -kosatec -kostka -kotel -kotleta -kotoul -koukat -koupelna -kousek -kouzlo -kovboj -koza -kozoroh -krabice -krach -krajina -kralovat -krasopis -kravata -kredit -krejcar -kresba -kreveta -kriket -kritik -krize -krkavec -krmelec -krmivo -krocan -krok -kronika -kropit -kroupa -krovka -krtek -kruhadlo -krupice -krutost -krvinka -krychle -krypta -krystal -kryt -kudlanka -kufr -kujnost -kukla -kulajda -kulich -kulka -kulomet -kultura -kuna -kupodivu -kurt -kurzor -kutil -kvalita -kvasinka -kvestor -kynolog -kyselina -kytara -kytice -kytka -kytovec -kyvadlo -labrador -lachtan -ladnost -laik -lakomec -lamela -lampa -lanovka -lasice -laso -lastura -latinka -lavina -lebka -leckdy -leden -lednice -ledovka -ledvina -legenda -legie -legrace -lehce -lehkost -lehnout -lektvar -lenochod -lentilka -lepenka -lepidlo -letadlo -letec -letmo -letokruh -levhart -levitace -levobok -libra -lichotka -lidojed -lidskost -lihovina -lijavec -lilek -limetka -linie -linka -linoleum -listopad -litina -litovat -lobista -lodivod -logika -logoped -lokalita -loket -lomcovat -lopata -lopuch -lord -losos -lotr -loudal -louh -louka -louskat -lovec -lstivost -lucerna -lucifer -lump -lusk -lustrace -lvice -lyra -lyrika -lysina -madam -madlo -magistr -mahagon -majetek -majitel -majorita -makak -makovice -makrela -malba -malina -malovat -malvice -maminka -mandle -manko -marnost -masakr -maskot -masopust -matice -matrika -maturita -mazanec -mazivo -mazlit -mazurka -mdloba -mechanik -meditace -medovina -melasa -meloun -mentolka -metla -metoda -metr -mezera -migrace -mihnout -mihule -mikina -mikrofon -milenec -milimetr -milost -mimika -mincovna -minibar -minomet -minulost -miska -mistr -mixovat -mladost -mlha -mlhovina -mlok -mlsat -mluvit -mnich -mnohem -mobil -mocnost -modelka -modlitba -mohyla -mokro -molekula -momentka -monarcha -monokl -monstrum -montovat -monzun -mosaz -moskyt -most -motivace -motorka -motyka -moucha -moudrost -mozaika -mozek -mozol -mramor -mravenec -mrkev -mrtvola -mrzet -mrzutost -mstitel -mudrc -muflon -mulat -mumie -munice -muset -mutace -muzeum -muzikant -myslivec -mzda -nabourat -nachytat -nadace -nadbytek -nadhoz -nadobro -nadpis -nahlas -nahnat -nahodile -nahradit -naivita -najednou -najisto -najmout -naklonit -nakonec -nakrmit -nalevo -namazat -namluvit -nanometr -naoko -naopak -naostro -napadat -napevno -naplnit -napnout -naposled -naprosto -narodit -naruby -narychlo -nasadit -nasekat -naslepo -nastat -natolik -navenek -navrch -navzdory -nazvat -nebe -nechat -necky -nedaleko -nedbat -neduh -negace -nehet -nehoda -nejen -nejprve -neklid -nelibost -nemilost -nemoc -neochota -neonka -nepokoj -nerost -nerv -nesmysl -nesoulad -netvor -neuron -nevina -nezvykle -nicota -nijak -nikam -nikdy -nikl -nikterak -nitro -nocleh -nohavice -nominace -nora -norek -nositel -nosnost -nouze -noviny -novota -nozdra -nuda -nudle -nuget -nutit -nutnost -nutrie -nymfa -obal -obarvit -obava -obdiv -obec -obehnat -obejmout -obezita -obhajoba -obilnice -objasnit -objekt -obklopit -oblast -oblek -obliba -obloha -obluda -obnos -obohatit -obojek -obout -obrazec -obrna -obruba -obrys -obsah -obsluha -obstarat -obuv -obvaz -obvinit -obvod -obvykle -obyvatel -obzor -ocas -ocel -ocenit -ochladit -ochota -ochrana -ocitnout -odboj -odbyt -odchod -odcizit -odebrat -odeslat -odevzdat -odezva -odhadce -odhodit -odjet -odjinud -odkaz -odkoupit -odliv -odluka -odmlka -odolnost -odpad -odpis -odplout -odpor -odpustit -odpykat -odrazka -odsoudit -odstup -odsun -odtok -odtud -odvaha -odveta -odvolat -odvracet -odznak -ofina -ofsajd -ohlas -ohnisko -ohrada -ohrozit -ohryzek -okap -okenice -oklika -okno -okouzlit -okovy -okrasa -okres -okrsek -okruh -okupant -okurka -okusit -olejnina -olizovat -omak -omeleta -omezit -omladina -omlouvat -omluva -omyl -onehdy -opakovat -opasek -operace -opice -opilost -opisovat -opora -opozice -opravdu -oproti -orbital -orchestr -orgie -orlice -orloj -ortel -osada -oschnout -osika -osivo -oslava -oslepit -oslnit -oslovit -osnova -osoba -osolit -ospalec -osten -ostraha -ostuda -ostych -osvojit -oteplit -otisk -otop -otrhat -otrlost -otrok -otruby -otvor -ovanout -ovar -oves -ovlivnit -ovoce -oxid -ozdoba -pachatel -pacient -padouch -pahorek -pakt -palanda -palec -palivo -paluba -pamflet -pamlsek -panenka -panika -panna -panovat -panstvo -pantofle -paprika -parketa -parodie -parta -paruka -paryba -paseka -pasivita -pastelka -patent -patrona -pavouk -pazneht -pazourek -pecka -pedagog -pejsek -peklo -peloton -penalta -pendrek -penze -periskop -pero -pestrost -petarda -petice -petrolej -pevnina -pexeso -pianista -piha -pijavice -pikle -piknik -pilina -pilnost -pilulka -pinzeta -pipeta -pisatel -pistole -pitevna -pivnice -pivovar -placenta -plakat -plamen -planeta -plastika -platit -plavidlo -plaz -plech -plemeno -plenta -ples -pletivo -plevel -plivat -plnit -plno -plocha -plodina -plomba -plout -pluk -plyn -pobavit -pobyt -pochod -pocit -poctivec -podat -podcenit -podepsat -podhled -podivit -podklad -podmanit -podnik -podoba -podpora -podraz -podstata -podvod -podzim -poezie -pohanka -pohnutka -pohovor -pohroma -pohyb -pointa -pojistka -pojmout -pokazit -pokles -pokoj -pokrok -pokuta -pokyn -poledne -polibek -polknout -poloha -polynom -pomalu -pominout -pomlka -pomoc -pomsta -pomyslet -ponechat -ponorka -ponurost -popadat -popel -popisek -poplach -poprosit -popsat -popud -poradce -porce -porod -porucha -poryv -posadit -posed -posila -poskok -poslanec -posoudit -pospolu -postava -posudek -posyp -potah -potkan -potlesk -potomek -potrava -potupa -potvora -poukaz -pouto -pouzdro -povaha -povidla -povlak -povoz -povrch -povstat -povyk -povzdech -pozdrav -pozemek -poznatek -pozor -pozvat -pracovat -prahory -praktika -prales -praotec -praporek -prase -pravda -princip -prkno -probudit -procento -prodej -profese -prohra -projekt -prolomit -promile -pronikat -propad -prorok -prosba -proton -proutek -provaz -prskavka -prsten -prudkost -prut -prvek -prvohory -psanec -psovod -pstruh -ptactvo -puberta -puch -pudl -pukavec -puklina -pukrle -pult -pumpa -punc -pupen -pusa -pusinka -pustina -putovat -putyka -pyramida -pysk -pytel -racek -rachot -radiace -radnice -radon -raft -ragby -raketa -rakovina -rameno -rampouch -rande -rarach -rarita -rasovna -rastr -ratolest -razance -razidlo -reagovat -reakce -recept -redaktor -referent -reflex -rejnok -reklama -rekord -rekrut -rektor -reputace -revize -revma -revolver -rezerva -riskovat -riziko -robotika -rodokmen -rohovka -rokle -rokoko -romaneto -ropovod -ropucha -rorejs -rosol -rostlina -rotmistr -rotoped -rotunda -roubenka -roucho -roup -roura -rovina -rovnice -rozbor -rozchod -rozdat -rozeznat -rozhodce -rozinka -rozjezd -rozkaz -rozloha -rozmar -rozpad -rozruch -rozsah -roztok -rozum -rozvod -rubrika -ruchadlo -rukavice -rukopis -ryba -rybolov -rychlost -rydlo -rypadlo -rytina -ryzost -sadista -sahat -sako -samec -samizdat -samota -sanitka -sardinka -sasanka -satelit -sazba -sazenice -sbor -schovat -sebranka -secese -sedadlo -sediment -sedlo -sehnat -sejmout -sekera -sekta -sekunda -sekvoje -semeno -seno -servis -sesadit -seshora -seskok -seslat -sestra -sesuv -sesypat -setba -setina -setkat -setnout -setrvat -sever -seznam -shoda -shrnout -sifon -silnice -sirka -sirotek -sirup -situace -skafandr -skalisko -skanzen -skaut -skeptik -skica -skladba -sklenice -sklo -skluz -skoba -skokan -skoro -skripta -skrz -skupina -skvost -skvrna -slabika -sladidlo -slanina -slast -slavnost -sledovat -slepec -sleva -slezina -slib -slina -sliznice -slon -sloupek -slovo -sluch -sluha -slunce -slupka -slza -smaragd -smetana -smilstvo -smlouva -smog -smrad -smrk -smrtka -smutek -smysl -snad -snaha -snob -sobota -socha -sodovka -sokol -sopka -sotva -souboj -soucit -soudce -souhlas -soulad -soumrak -souprava -soused -soutok -souviset -spalovna -spasitel -spis -splav -spodek -spojenec -spolu -sponzor -spornost -spousta -sprcha -spustit -sranda -sraz -srdce -srna -srnec -srovnat -srpen -srst -srub -stanice -starosta -statika -stavba -stehno -stezka -stodola -stolek -stopa -storno -stoupat -strach -stres -strhnout -strom -struna -studna -stupnice -stvol -styk -subjekt -subtropy -suchar -sudost -sukno -sundat -sunout -surikata -surovina -svah -svalstvo -svetr -svatba -svazek -svisle -svitek -svoboda -svodidlo -svorka -svrab -sykavka -sykot -synek -synovec -sypat -sypkost -syrovost -sysel -sytost -tabletka -tabule -tahoun -tajemno -tajfun -tajga -tajit -tajnost -taktika -tamhle -tampon -tancovat -tanec -tanker -tapeta -tavenina -tazatel -technika -tehdy -tekutina -telefon -temnota -tendence -tenista -tenor -teplota -tepna -teprve -terapie -termoska -textil -ticho -tiskopis -titulek -tkadlec -tkanina -tlapka -tleskat -tlukot -tlupa -tmel -toaleta -topinka -topol -torzo -touha -toulec -tradice -traktor -tramp -trasa -traverza -trefit -trest -trezor -trhavina -trhlina -trochu -trojice -troska -trouba -trpce -trpitel -trpkost -trubec -truchlit -truhlice -trus -trvat -tudy -tuhnout -tuhost -tundra -turista -turnaj -tuzemsko -tvaroh -tvorba -tvrdost -tvrz -tygr -tykev -ubohost -uboze -ubrat -ubrousek -ubrus -ubytovna -ucho -uctivost -udivit -uhradit -ujednat -ujistit -ujmout -ukazatel -uklidnit -uklonit -ukotvit -ukrojit -ulice -ulita -ulovit -umyvadlo -unavit -uniforma -uniknout -upadnout -uplatnit -uplynout -upoutat -upravit -uran -urazit -usednout -usilovat -usmrtit -usnadnit -usnout -usoudit -ustlat -ustrnout -utahovat -utkat -utlumit -utonout -utopenec -utrousit -uvalit -uvolnit -uvozovka -uzdravit -uzel -uzenina -uzlina -uznat -vagon -valcha -valoun -vana -vandal -vanilka -varan -varhany -varovat -vcelku -vchod -vdova -vedro -vegetace -vejce -velbloud -veletrh -velitel -velmoc -velryba -venkov -veranda -verze -veselka -veskrze -vesnice -vespodu -vesta -veterina -veverka -vibrace -vichr -videohra -vidina -vidle -vila -vinice -viset -vitalita -vize -vizitka -vjezd -vklad -vkus -vlajka -vlak -vlasec -vlevo -vlhkost -vliv -vlnovka -vloupat -vnucovat -vnuk -voda -vodivost -vodoznak -vodstvo -vojensky -vojna -vojsko -volant -volba -volit -volno -voskovka -vozidlo -vozovna -vpravo -vrabec -vracet -vrah -vrata -vrba -vrcholek -vrhat -vrstva -vrtule -vsadit -vstoupit -vstup -vtip -vybavit -vybrat -vychovat -vydat -vydra -vyfotit -vyhledat -vyhnout -vyhodit -vyhradit -vyhubit -vyjasnit -vyjet -vyjmout -vyklopit -vykonat -vylekat -vymazat -vymezit -vymizet -vymyslet -vynechat -vynikat -vynutit -vypadat -vyplatit -vypravit -vypustit -vyrazit -vyrovnat -vyrvat -vyslovit -vysoko -vystavit -vysunout -vysypat -vytasit -vytesat -vytratit -vyvinout -vyvolat -vyvrhel -vyzdobit -vyznat -vzadu -vzbudit -vzchopit -vzdor -vzduch -vzdychat -vzestup -vzhledem -vzkaz -vzlykat -vznik -vzorek -vzpoura -vztah -vztek -xylofon -zabrat -zabydlet -zachovat -zadarmo -zadusit -zafoukat -zahltit -zahodit -zahrada -zahynout -zajatec -zajet -zajistit -zaklepat -zakoupit -zalepit -zamezit -zamotat -zamyslet -zanechat -zanikat -zaplatit -zapojit -zapsat -zarazit -zastavit -zasunout -zatajit -zatemnit -zatknout -zaujmout -zavalit -zavelet -zavinit -zavolat -zavrtat -zazvonit -zbavit -zbrusu -zbudovat -zbytek -zdaleka -zdarma -zdatnost -zdivo -zdobit -zdroj -zdvih -zdymadlo -zelenina -zeman -zemina -zeptat -zezadu -zezdola -zhatit -zhltnout -zhluboka -zhotovit -zhruba -zima -zimnice -zjemnit -zklamat -zkoumat -zkratka -zkumavka -zlato -zlehka -zloba -zlom -zlost -zlozvyk -zmapovat -zmar -zmatek -zmije -zmizet -zmocnit -zmodrat -zmrzlina -zmutovat -znak -znalost -znamenat -znovu -zobrazit -zotavit -zoubek -zoufale -zplodit -zpomalit -zprava -zprostit -zprudka -zprvu -zrada -zranit -zrcadlo -zrnitost -zrno -zrovna -zrychlit -zrzavost -zticha -ztratit -zubovina -zubr -zvednout -zvenku -zvesela -zvon -zvrat -zvukovod -zvyk`.split('\n'); -//# sourceMappingURL=czech.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/czech.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/czech.js.map deleted file mode 100644 index 613dd9fe..00000000 --- a/node_modules/nostr-tools/node_modules/@scure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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+/D7B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js deleted file mode 100644 index bb8972e5..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `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`.split('\n'); -//# sourceMappingURL=english.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js.map deleted file mode 100644 index 927739d5..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/english.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"english.js","sourceRoot":"","sources":["../../src/wordlists/english.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;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,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js deleted file mode 100644 index b599b656..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `abaisser -abandon -abdiquer -abeille -abolir -aborder -aboutir -aboyer -abrasif -abreuver -abriter -abroger -abrupt -absence -absolu -absurde -abusif -abyssal -académie -acajou -acarien -accabler -accepter -acclamer -accolade -accroche -accuser -acerbe -achat -acheter -aciduler -acier -acompte -acquérir -acronyme -acteur -actif -actuel -adepte -adéquat -adhésif -adjectif -adjuger -admettre -admirer -adopter -adorer -adoucir -adresse -adroit -adulte -adverbe -aérer -aéronef -affaire -affecter -affiche -affreux -affubler -agacer -agencer -agile -agiter -agrafer -agréable -agrume -aider -aiguille -ailier -aimable -aisance -ajouter -ajuster -alarmer -alchimie -alerte -algèbre -algue -aliéner -aliment -alléger -alliage -allouer -allumer -alourdir -alpaga -altesse -alvéole -amateur -ambigu -ambre -aménager -amertume -amidon -amiral -amorcer -amour -amovible -amphibie -ampleur -amusant -analyse -anaphore -anarchie -anatomie -ancien -anéantir -angle -angoisse -anguleux -animal -annexer -annonce -annuel -anodin -anomalie -anonyme -anormal -antenne -antidote -anxieux -apaiser -apéritif -aplanir -apologie -appareil -appeler -apporter -appuyer -aquarium -aqueduc -arbitre -arbuste -ardeur -ardoise -argent -arlequin -armature -armement -armoire -armure -arpenter -arracher -arriver -arroser -arsenic -artériel -article -aspect -asphalte -aspirer -assaut -asservir -assiette -associer -assurer -asticot -astre -astuce -atelier -atome -atrium -atroce -attaque -attentif -attirer -attraper -aubaine -auberge -audace -audible -augurer -aurore -automne -autruche -avaler -avancer -avarice -avenir -averse -aveugle -aviateur -avide -avion -aviser -avoine -avouer -avril -axial -axiome -badge -bafouer -bagage -baguette -baignade -balancer -balcon -baleine -balisage -bambin -bancaire -bandage -banlieue -bannière -banquier -barbier -baril -baron -barque -barrage -bassin -bastion -bataille -bateau -batterie -baudrier -bavarder -belette -bélier -belote -bénéfice -berceau -berger -berline -bermuda -besace -besogne -bétail -beurre -biberon -bicycle -bidule -bijou -bilan -bilingue -billard -binaire -biologie -biopsie -biotype -biscuit -bison -bistouri -bitume -bizarre -blafard -blague -blanchir -blessant -blinder -blond -bloquer -blouson -bobard -bobine -boire -boiser -bolide -bonbon -bondir -bonheur -bonifier -bonus -bordure -borne -botte -boucle -boueux -bougie -boulon -bouquin -bourse -boussole -boutique -boxeur -branche -brasier -brave -brebis -brèche -breuvage -bricoler -brigade -brillant -brioche -brique -brochure -broder -bronzer -brousse -broyeur -brume -brusque -brutal -bruyant -buffle -buisson -bulletin -bureau -burin -bustier -butiner -butoir -buvable -buvette -cabanon -cabine -cachette -cadeau -cadre -caféine -caillou -caisson -calculer -calepin -calibre -calmer -calomnie -calvaire -camarade -caméra -camion -campagne -canal -caneton -canon -cantine -canular -capable -caporal -caprice -capsule -capter -capuche -carabine -carbone -caresser -caribou -carnage -carotte -carreau -carton -cascade -casier -casque -cassure -causer -caution -cavalier -caverne -caviar -cédille -ceinture -céleste -cellule -cendrier -censurer -central -cercle -cérébral -cerise -cerner -cerveau -cesser -chagrin -chaise -chaleur -chambre -chance -chapitre -charbon -chasseur -chaton -chausson -chavirer -chemise -chenille -chéquier -chercher -cheval -chien -chiffre -chignon -chimère -chiot -chlorure -chocolat -choisir -chose -chouette -chrome -chute -cigare -cigogne -cimenter -cinéma -cintrer -circuler -cirer -cirque -citerne -citoyen -citron -civil -clairon -clameur -claquer -classe -clavier -client -cligner -climat -clivage -cloche -clonage -cloporte -cobalt -cobra -cocasse -cocotier -coder -codifier -coffre -cogner -cohésion -coiffer -coincer -colère -colibri -colline -colmater -colonel -combat -comédie -commande -compact -concert -conduire -confier -congeler -connoter -consonne -contact -convexe -copain -copie -corail -corbeau -cordage -corniche -corpus -correct -cortège -cosmique -costume -coton -coude -coupure -courage -couteau -couvrir -coyote -crabe -crainte -cravate -crayon -créature -créditer -crémeux -creuser -crevette -cribler -crier -cristal -critère -croire -croquer -crotale -crucial -cruel -crypter -cubique -cueillir -cuillère -cuisine -cuivre -culminer -cultiver -cumuler -cupide -curatif -curseur -cyanure -cycle -cylindre -cynique -daigner -damier -danger -danseur -dauphin -débattre -débiter -déborder -débrider -débutant -décaler -décembre -déchirer -décider -déclarer -décorer -décrire -décupler -dédale -déductif -déesse -défensif -défiler -défrayer -dégager -dégivrer -déglutir -dégrafer -déjeuner -délice -déloger -demander -demeurer -démolir -dénicher -dénouer -dentelle -dénuder -départ -dépenser -déphaser -déplacer -déposer -déranger -dérober -désastre -descente -désert -désigner -désobéir -dessiner -destrier -détacher -détester -détourer -détresse -devancer -devenir -deviner -devoir -diable -dialogue -diamant -dicter -différer -digérer -digital -digne -diluer -dimanche -diminuer -dioxyde -directif -diriger -discuter -disposer -dissiper -distance -divertir -diviser -docile -docteur -dogme -doigt -domaine -domicile -dompter -donateur -donjon -donner -dopamine -dortoir -dorure -dosage -doseur -dossier -dotation -douanier -double -douceur -douter -doyen -dragon -draper -dresser -dribbler -droiture -duperie -duplexe -durable -durcir -dynastie -éblouir -écarter -écharpe -échelle -éclairer -éclipse -éclore -écluse -école -économie -écorce -écouter -écraser -écrémer -écrivain -écrou -écume -écureuil -édifier -éduquer -effacer -effectif -effigie -effort -effrayer -effusion -égaliser -égarer -éjecter -élaborer -élargir -électron -élégant -éléphant -élève -éligible -élitisme -éloge -élucider -éluder -emballer -embellir -embryon -émeraude -émission -emmener -émotion -émouvoir -empereur -employer -emporter -emprise -émulsion -encadrer -enchère -enclave -encoche -endiguer -endosser -endroit -enduire -énergie -enfance -enfermer -enfouir -engager -engin -englober -énigme -enjamber -enjeu -enlever -ennemi -ennuyeux -enrichir -enrobage -enseigne -entasser -entendre -entier -entourer -entraver -énumérer -envahir -enviable -envoyer -enzyme -éolien -épaissir -épargne -épatant -épaule -épicerie -épidémie -épier -épilogue -épine -épisode -épitaphe -époque -épreuve -éprouver -épuisant -équerre -équipe -ériger -érosion -erreur -éruption -escalier -espadon -espèce -espiègle -espoir -esprit -esquiver -essayer -essence -essieu -essorer -estime -estomac -estrade -étagère -étaler -étanche -étatique -éteindre -étendoir -éternel -éthanol -éthique -ethnie -étirer -étoffer -étoile -étonnant -étourdir -étrange -étroit -étude -euphorie -évaluer -évasion -éventail -évidence -éviter -évolutif -évoquer -exact -exagérer -exaucer -exceller -excitant -exclusif -excuse -exécuter -exemple -exercer -exhaler -exhorter -exigence -exiler -exister -exotique -expédier -explorer -exposer -exprimer -exquis -extensif -extraire -exulter -fable -fabuleux -facette -facile -facture -faiblir -falaise -fameux -famille -farceur -farfelu -farine -farouche -fasciner -fatal -fatigue -faucon -fautif -faveur -favori -fébrile -féconder -fédérer -félin -femme -fémur -fendoir -féodal -fermer -féroce -ferveur -festival -feuille -feutre -février -fiasco -ficeler -fictif -fidèle -figure -filature -filetage -filière -filleul -filmer -filou -filtrer -financer -finir -fiole -firme -fissure -fixer -flairer -flamme -flasque -flatteur -fléau -flèche -fleur -flexion -flocon -flore -fluctuer -fluide -fluvial -folie -fonderie -fongible -fontaine -forcer -forgeron -formuler -fortune -fossile -foudre -fougère -fouiller -foulure -fourmi -fragile -fraise -franchir -frapper -frayeur -frégate -freiner -frelon -frémir -frénésie -frère -friable -friction -frisson -frivole -froid -fromage -frontal -frotter -fruit -fugitif -fuite -fureur -furieux -furtif -fusion -futur -gagner -galaxie -galerie -gambader -garantir -gardien -garnir -garrigue -gazelle -gazon -géant -gélatine -gélule -gendarme -général -génie -genou -gentil -géologie -géomètre -géranium -germe -gestuel -geyser -gibier -gicler -girafe -givre -glace -glaive -glisser -globe -gloire -glorieux -golfeur -gomme -gonfler -gorge -gorille -goudron -gouffre -goulot -goupille -gourmand -goutte -graduel -graffiti -graine -grand -grappin -gratuit -gravir -grenat -griffure -griller -grimper -grogner -gronder -grotte -groupe -gruger -grutier -gruyère -guépard -guerrier -guide -guimauve -guitare -gustatif -gymnaste -gyrostat -habitude -hachoir -halte -hameau -hangar -hanneton -haricot -harmonie -harpon -hasard -hélium -hématome -herbe -hérisson -hermine -héron -hésiter -heureux -hiberner -hibou -hilarant -histoire -hiver -homard -hommage -homogène -honneur -honorer -honteux -horde -horizon -horloge -hormone -horrible -houleux -housse -hublot -huileux -humain -humble -humide -humour -hurler -hydromel -hygiène -hymne -hypnose -idylle -ignorer -iguane -illicite -illusion -image -imbiber -imiter -immense -immobile -immuable -impact -impérial -implorer -imposer -imprimer -imputer -incarner -incendie -incident -incliner -incolore -indexer -indice -inductif -inédit -ineptie -inexact -infini -infliger -informer -infusion -ingérer -inhaler -inhiber -injecter -injure -innocent -inoculer -inonder -inscrire -insecte -insigne -insolite -inspirer -instinct -insulter -intact -intense -intime -intrigue -intuitif -inutile -invasion -inventer -inviter -invoquer -ironique -irradier -irréel -irriter -isoler -ivoire -ivresse -jaguar -jaillir -jambe -janvier -jardin -jauger -jaune -javelot -jetable -jeton -jeudi -jeunesse -joindre -joncher -jongler -joueur -jouissif -journal -jovial -joyau -joyeux -jubiler -jugement -junior -jupon -juriste -justice -juteux -juvénile -kayak -kimono -kiosque -label -labial -labourer -lacérer -lactose -lagune -laine -laisser -laitier -lambeau -lamelle -lampe -lanceur -langage -lanterne -lapin -largeur -larme -laurier -lavabo -lavoir -lecture -légal -léger -légume -lessive -lettre -levier -lexique -lézard -liasse -libérer -libre -licence -licorne -liège -lièvre -ligature -ligoter -ligue -limer -limite -limonade -limpide -linéaire -lingot -lionceau -liquide -lisière -lister -lithium -litige -littoral -livreur -logique -lointain -loisir -lombric -loterie -louer -lourd -loutre -louve -loyal -lubie -lucide -lucratif -lueur -lugubre -luisant -lumière -lunaire -lundi -luron -lutter -luxueux -machine -magasin -magenta -magique -maigre -maillon -maintien -mairie -maison -majorer -malaxer -maléfice -malheur -malice -mallette -mammouth -mandater -maniable -manquant -manteau -manuel -marathon -marbre -marchand -mardi -maritime -marqueur -marron -marteler -mascotte -massif -matériel -matière -matraque -maudire -maussade -mauve -maximal -méchant -méconnu -médaille -médecin -méditer -méduse -meilleur -mélange -mélodie -membre -mémoire -menacer -mener -menhir -mensonge -mentor -mercredi -mérite -merle -messager -mesure -métal -météore -méthode -métier -meuble -miauler -microbe -miette -mignon -migrer -milieu -million -mimique -mince -minéral -minimal -minorer -minute -miracle -miroiter -missile -mixte -mobile -moderne -moelleux -mondial -moniteur -monnaie -monotone -monstre -montagne -monument -moqueur -morceau -morsure -mortier -moteur -motif -mouche -moufle -moulin -mousson -mouton -mouvant -multiple -munition -muraille -murène -murmure -muscle -muséum -musicien -mutation -muter -mutuel -myriade -myrtille -mystère -mythique -nageur -nappe -narquois -narrer -natation -nation -nature -naufrage -nautique -navire -nébuleux -nectar -néfaste -négation -négliger -négocier -neige -nerveux -nettoyer -neurone -neutron -neveu -niche -nickel -nitrate -niveau -noble -nocif -nocturne -noirceur -noisette -nomade -nombreux -nommer -normatif -notable -notifier -notoire -nourrir -nouveau -novateur -novembre -novice -nuage -nuancer -nuire -nuisible -numéro -nuptial -nuque -nutritif -obéir -objectif -obliger -obscur -observer -obstacle -obtenir -obturer -occasion -occuper -océan -octobre -octroyer -octupler -oculaire -odeur -odorant -offenser -officier -offrir -ogive -oiseau -oisillon -olfactif -olivier -ombrage -omettre -onctueux -onduler -onéreux -onirique -opale -opaque -opérer -opinion -opportun -opprimer -opter -optique -orageux -orange -orbite -ordonner -oreille -organe -orgueil -orifice -ornement -orque -ortie -osciller -osmose -ossature -otarie -ouragan -ourson -outil -outrager -ouvrage -ovation -oxyde -oxygène -ozone -paisible -palace -palmarès -palourde -palper -panache -panda -pangolin -paniquer -panneau -panorama -pantalon -papaye -papier -papoter -papyrus -paradoxe -parcelle -paresse -parfumer -parler -parole -parrain -parsemer -partager -parure -parvenir -passion -pastèque -paternel -patience -patron -pavillon -pavoiser -payer -paysage -peigne -peintre -pelage -pélican -pelle -pelouse -peluche -pendule -pénétrer -pénible -pensif -pénurie -pépite -péplum -perdrix -perforer -période -permuter -perplexe -persil -perte -peser -pétale -petit -pétrir -peuple -pharaon -phobie -phoque -photon -phrase -physique -piano -pictural -pièce -pierre -pieuvre -pilote -pinceau -pipette -piquer -pirogue -piscine -piston -pivoter -pixel -pizza -placard -plafond -plaisir -planer -plaque -plastron -plateau -pleurer -plexus -pliage -plomb -plonger -pluie -plumage -pochette -poésie -poète -pointe -poirier -poisson -poivre -polaire -policier -pollen -polygone -pommade -pompier -ponctuel -pondérer -poney -portique -position -posséder -posture -potager -poteau -potion -pouce -poulain -poumon -pourpre -poussin -pouvoir -prairie -pratique -précieux -prédire -préfixe -prélude -prénom -présence -prétexte -prévoir -primitif -prince -prison -priver -problème -procéder -prodige -profond -progrès -proie -projeter -prologue -promener -propre -prospère -protéger -prouesse -proverbe -prudence -pruneau -psychose -public -puceron -puiser -pulpe -pulsar -punaise -punitif -pupitre -purifier -puzzle -pyramide -quasar -querelle -question -quiétude -quitter -quotient -racine -raconter -radieux -ragondin -raideur -raisin -ralentir -rallonge -ramasser -rapide -rasage -ratisser -ravager -ravin -rayonner -réactif -réagir -réaliser -réanimer -recevoir -réciter -réclamer -récolter -recruter -reculer -recycler -rédiger -redouter -refaire -réflexe -réformer -refrain -refuge -régalien -région -réglage -régulier -réitérer -rejeter -rejouer -relatif -relever -relief -remarque -remède -remise -remonter -remplir -remuer -renard -renfort -renifler -renoncer -rentrer -renvoi -replier -reporter -reprise -reptile -requin -réserve -résineux -résoudre -respect -rester -résultat -rétablir -retenir -réticule -retomber -retracer -réunion -réussir -revanche -revivre -révolte -révulsif -richesse -rideau -rieur -rigide -rigoler -rincer -riposter -risible -risque -rituel -rival -rivière -rocheux -romance -rompre -ronce -rondin -roseau -rosier -rotatif -rotor -rotule -rouge -rouille -rouleau -routine -royaume -ruban -rubis -ruche -ruelle -rugueux -ruiner -ruisseau -ruser -rustique -rythme -sabler -saboter -sabre -sacoche -safari -sagesse -saisir -salade -salive -salon -saluer -samedi -sanction -sanglier -sarcasme -sardine -saturer -saugrenu -saumon -sauter -sauvage -savant -savonner -scalpel -scandale -scélérat -scénario -sceptre -schéma -science -scinder -score -scrutin -sculpter -séance -sécable -sécher -secouer -sécréter -sédatif -séduire -seigneur -séjour -sélectif -semaine -sembler -semence -séminal -sénateur -sensible -sentence -séparer -séquence -serein -sergent -sérieux -serrure -sérum -service -sésame -sévir -sevrage -sextuple -sidéral -siècle -siéger -siffler -sigle -signal -silence -silicium -simple -sincère -sinistre -siphon -sirop -sismique -situer -skier -social -socle -sodium -soigneux -soldat -soleil -solitude -soluble -sombre -sommeil -somnoler -sonde -songeur -sonnette -sonore -sorcier -sortir -sosie -sottise -soucieux -soudure -souffle -soulever -soupape -source -soutirer -souvenir -spacieux -spatial -spécial -sphère -spiral -stable -station -sternum -stimulus -stipuler -strict -studieux -stupeur -styliste -sublime -substrat -subtil -subvenir -succès -sucre -suffixe -suggérer -suiveur -sulfate -superbe -supplier -surface -suricate -surmener -surprise -sursaut -survie -suspect -syllabe -symbole -symétrie -synapse -syntaxe -système -tabac -tablier -tactile -tailler -talent -talisman -talonner -tambour -tamiser -tangible -tapis -taquiner -tarder -tarif -tartine -tasse -tatami -tatouage -taupe -taureau -taxer -témoin -temporel -tenaille -tendre -teneur -tenir -tension -terminer -terne -terrible -tétine -texte -thème -théorie -thérapie -thorax -tibia -tiède -timide -tirelire -tiroir -tissu -titane -titre -tituber -toboggan -tolérant -tomate -tonique -tonneau -toponyme -torche -tordre -tornade -torpille -torrent -torse -tortue -totem -toucher -tournage -tousser -toxine -traction -trafic -tragique -trahir -train -trancher -travail -trèfle -tremper -trésor -treuil -triage -tribunal -tricoter -trilogie -triomphe -tripler -triturer -trivial -trombone -tronc -tropical -troupeau -tuile -tulipe -tumulte -tunnel -turbine -tuteur -tutoyer -tuyau -tympan -typhon -typique -tyran -ubuesque -ultime -ultrason -unanime -unifier -union -unique -unitaire -univers -uranium -urbain -urticant -usage -usine -usuel -usure -utile -utopie -vacarme -vaccin -vagabond -vague -vaillant -vaincre -vaisseau -valable -valise -vallon -valve -vampire -vanille -vapeur -varier -vaseux -vassal -vaste -vecteur -vedette -végétal -véhicule -veinard -véloce -vendredi -vénérer -venger -venimeux -ventouse -verdure -vérin -vernir -verrou -verser -vertu -veston -vétéran -vétuste -vexant -vexer -viaduc -viande -victoire -vidange -vidéo -vignette -vigueur -vilain -village -vinaigre -violon -vipère -virement -virtuose -virus -visage -viseur -vision -visqueux -visuel -vital -vitesse -viticole -vitrine -vivace -vivipare -vocation -voguer -voile -voisin -voiture -volaille -volcan -voltiger -volume -vorace -vortex -voter -vouloir -voyage -voyelle -wagon -xénon -yacht -zèbre -zénith -zeste -zoologie`.split('\n'); -//# sourceMappingURL=french.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js.map deleted file mode 100644 index 9d2bc2e6..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/french.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"french.js","sourceRoot":"","sources":["../../src/wordlists/french.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA+/DzB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js deleted file mode 100644 index 5fd1b4ea..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `abaco -abbaglio -abbinato -abete -abisso -abolire -abrasivo -abrogato -accadere -accenno -accusato -acetone -achille -acido -acqua -acre -acrilico -acrobata -acuto -adagio -addebito -addome -adeguato -aderire -adipe -adottare -adulare -affabile -affetto -affisso -affranto -aforisma -afoso -africano -agave -agente -agevole -aggancio -agire -agitare -agonismo -agricolo -agrumeto -aguzzo -alabarda -alato -albatro -alberato -albo -albume -alce -alcolico -alettone -alfa -algebra -aliante -alibi -alimento -allagato -allegro -allievo -allodola -allusivo -almeno -alogeno -alpaca -alpestre -altalena -alterno -alticcio -altrove -alunno -alveolo -alzare -amalgama -amanita -amarena -ambito -ambrato -ameba -america -ametista -amico -ammasso -ammenda -ammirare -ammonito -amore -ampio -ampliare -amuleto -anacardo -anagrafe -analista -anarchia -anatra -anca -ancella -ancora -andare -andrea -anello -angelo -angolare -angusto -anima -annegare -annidato -anno -annuncio -anonimo -anticipo -anzi -apatico -apertura -apode -apparire -appetito -appoggio -approdo -appunto -aprile -arabica -arachide -aragosta -araldica -arancio -aratura -arazzo -arbitro -archivio -ardito -arenile -argento -argine -arguto -aria -armonia -arnese -arredato -arringa -arrosto -arsenico -arso -artefice -arzillo -asciutto -ascolto -asepsi -asettico -asfalto -asino -asola -aspirato -aspro -assaggio -asse -assoluto -assurdo -asta -astenuto -astice -astratto -atavico -ateismo -atomico -atono -attesa -attivare -attorno -attrito -attuale -ausilio -austria -autista -autonomo -autunno -avanzato -avere -avvenire -avviso -avvolgere -azione -azoto -azzimo -azzurro -babele -baccano -bacino -baco -badessa -badilata -bagnato -baita -balcone -baldo -balena -ballata -balzano -bambino -bandire -baraonda -barbaro -barca -baritono -barlume -barocco -basilico -basso -batosta -battuto -baule -bava -bavosa -becco -beffa -belgio -belva -benda -benevole -benigno -benzina -bere -berlina -beta -bibita -bici -bidone -bifido -biga -bilancia -bimbo -binocolo -biologo -bipede -bipolare -birbante -birra -biscotto -bisesto -bisnonno -bisonte -bisturi -bizzarro -blando -blatta -bollito -bonifico -bordo -bosco -botanico -bottino -bozzolo -braccio -bradipo -brama -branca -bravura -bretella -brevetto -brezza -briglia -brillante -brindare -broccolo -brodo -bronzina -brullo -bruno -bubbone -buca -budino -buffone -buio -bulbo -buono -burlone -burrasca -bussola -busta -cadetto -caduco -calamaro -calcolo -calesse -calibro -calmo -caloria -cambusa -camerata -camicia -cammino -camola -campale -canapa -candela -cane -canino -canotto -cantina -capace -capello -capitolo -capogiro -cappero -capra -capsula -carapace -carcassa -cardo -carisma -carovana -carretto -cartolina -casaccio -cascata -caserma -caso -cassone -castello -casuale -catasta -catena -catrame -cauto -cavillo -cedibile -cedrata -cefalo -celebre -cellulare -cena -cenone -centesimo -ceramica -cercare -certo -cerume -cervello -cesoia -cespo -ceto -chela -chiaro -chicca -chiedere -chimera -china -chirurgo -chitarra -ciao -ciclismo -cifrare -cigno -cilindro -ciottolo -circa -cirrosi -citrico -cittadino -ciuffo -civetta -civile -classico -clinica -cloro -cocco -codardo -codice -coerente -cognome -collare -colmato -colore -colposo -coltivato -colza -coma -cometa -commando -comodo -computer -comune -conciso -condurre -conferma -congelare -coniuge -connesso -conoscere -consumo -continuo -convegno -coperto -copione -coppia -copricapo -corazza -cordata -coricato -cornice -corolla -corpo -corredo -corsia -cortese -cosmico -costante -cottura -covato -cratere -cravatta -creato -credere -cremoso -crescita -creta -criceto -crinale -crisi -critico -croce -cronaca -crostata -cruciale -crusca -cucire -cuculo -cugino -cullato -cupola -curatore -cursore -curvo -cuscino -custode -dado -daino -dalmata -damerino -daniela -dannoso -danzare -datato -davanti -davvero -debutto -decennio -deciso -declino -decollo -decreto -dedicato -definito -deforme -degno -delegare -delfino -delirio -delta -demenza -denotato -dentro -deposito -derapata -derivare -deroga -descritto -deserto -desiderio -desumere -detersivo -devoto -diametro -dicembre -diedro -difeso -diffuso -digerire -digitale -diluvio -dinamico -dinnanzi -dipinto -diploma -dipolo -diradare -dire -dirotto -dirupo -disagio -discreto -disfare -disgelo -disposto -distanza -disumano -dito -divano -divelto -dividere -divorato -doblone -docente -doganale -dogma -dolce -domato -domenica -dominare -dondolo -dono -dormire -dote -dottore -dovuto -dozzina -drago -druido -dubbio -dubitare -ducale -duna -duomo -duplice -duraturo -ebano -eccesso -ecco -eclissi -economia -edera -edicola -edile -editoria -educare -egemonia -egli -egoismo -egregio -elaborato -elargire -elegante -elencato -eletto -elevare -elfico -elica -elmo -elsa -eluso -emanato -emblema -emesso -emiro -emotivo -emozione -empirico -emulo -endemico -enduro -energia -enfasi -enoteca -entrare -enzima -epatite -epilogo -episodio -epocale -eppure -equatore -erario -erba -erboso -erede -eremita -erigere -ermetico -eroe -erosivo -errante -esagono -esame -esanime -esaudire -esca -esempio -esercito -esibito -esigente -esistere -esito -esofago -esortato -esoso -espanso -espresso -essenza -esso -esteso -estimare -estonia -estroso -esultare -etilico -etnico -etrusco -etto -euclideo -europa -evaso -evidenza -evitato -evoluto -evviva -fabbrica -faccenda -fachiro -falco -famiglia -fanale -fanfara -fango -fantasma -fare -farfalla -farinoso -farmaco -fascia -fastoso -fasullo -faticare -fato -favoloso -febbre -fecola -fede -fegato -felpa -feltro -femmina -fendere -fenomeno -fermento -ferro -fertile -fessura -festivo -fetta -feudo -fiaba -fiducia -fifa -figurato -filo -finanza -finestra -finire -fiore -fiscale -fisico -fiume -flacone -flamenco -flebo -flemma -florido -fluente -fluoro -fobico -focaccia -focoso -foderato -foglio -folata -folclore -folgore -fondente -fonetico -fonia -fontana -forbito -forchetta -foresta -formica -fornaio -foro -fortezza -forzare -fosfato -fosso -fracasso -frana -frassino -fratello -freccetta -frenata -fresco -frigo -frollino -fronde -frugale -frutta -fucilata -fucsia -fuggente -fulmine -fulvo -fumante -fumetto -fumoso -fune -funzione -fuoco -furbo -furgone -furore -fuso -futile -gabbiano -gaffe -galateo -gallina -galoppo -gambero -gamma -garanzia -garbo -garofano -garzone -gasdotto -gasolio -gastrico -gatto -gaudio -gazebo -gazzella -geco -gelatina -gelso -gemello -gemmato -gene -genitore -gennaio -genotipo -gergo -ghepardo -ghiaccio -ghisa -giallo -gilda -ginepro -giocare -gioiello -giorno -giove -girato -girone -gittata -giudizio -giurato -giusto -globulo -glutine -gnomo -gobba -golf -gomito -gommone -gonfio -gonna -governo -gracile -grado -grafico -grammo -grande -grattare -gravoso -grazia -greca -gregge -grifone -grigio -grinza -grotta -gruppo -guadagno -guaio -guanto -guardare -gufo -guidare -ibernato -icona -identico -idillio -idolo -idra -idrico -idrogeno -igiene -ignaro -ignorato -ilare -illeso -illogico -illudere -imballo -imbevuto -imbocco -imbuto -immane -immerso -immolato -impacco -impeto -impiego -importo -impronta -inalare -inarcare -inattivo -incanto -incendio -inchino -incisivo -incluso -incontro -incrocio -incubo -indagine -india -indole -inedito -infatti -infilare -inflitto -ingaggio -ingegno -inglese -ingordo -ingrosso -innesco -inodore -inoltrare -inondato -insano -insetto -insieme -insonnia -insulina -intasato -intero -intonaco -intuito -inumidire -invalido -invece -invito -iperbole -ipnotico -ipotesi -ippica -iride -irlanda -ironico -irrigato -irrorare -isolato -isotopo -isterico -istituto -istrice -italia -iterare -labbro -labirinto -lacca -lacerato -lacrima -lacuna -laddove -lago -lampo -lancetta -lanterna -lardoso -larga -laringe -lastra -latenza -latino -lattuga -lavagna -lavoro -legale -leggero -lembo -lentezza -lenza -leone -lepre -lesivo -lessato -lesto -letterale -leva -levigato -libero -lido -lievito -lilla -limatura -limitare -limpido -lineare -lingua -liquido -lira -lirica -lisca -lite -litigio -livrea -locanda -lode -logica -lombare -londra -longevo -loquace -lorenzo -loto -lotteria -luce -lucidato -lumaca -luminoso -lungo -lupo -luppolo -lusinga -lusso -lutto -macabro -macchina -macero -macinato -madama -magico -maglia -magnete -magro -maiolica -malafede -malgrado -malinteso -malsano -malto -malumore -mana -mancia -mandorla -mangiare -manifesto -mannaro -manovra -mansarda -mantide -manubrio -mappa -maratona -marcire -maretta -marmo -marsupio -maschera -massaia -mastino -materasso -matricola -mattone -maturo -mazurca -meandro -meccanico -mecenate -medesimo -meditare -mega -melassa -melis -melodia -meninge -meno -mensola -mercurio -merenda -merlo -meschino -mese -messere -mestolo -metallo -metodo -mettere -miagolare -mica -micelio -michele -microbo -midollo -miele -migliore -milano -milite -mimosa -minerale -mini -minore -mirino -mirtillo -miscela -missiva -misto -misurare -mitezza -mitigare -mitra -mittente -mnemonico -modello -modifica -modulo -mogano -mogio -mole -molosso -monastero -monco -mondina -monetario -monile -monotono -monsone -montato -monviso -mora -mordere -morsicato -mostro -motivato -motosega -motto -movenza -movimento -mozzo -mucca -mucosa -muffa -mughetto -mugnaio -mulatto -mulinello -multiplo -mummia -munto -muovere -murale -musa -muscolo -musica -mutevole -muto -nababbo -nafta -nanometro -narciso -narice -narrato -nascere -nastrare -naturale -nautica -naviglio -nebulosa -necrosi -negativo -negozio -nemmeno -neofita -neretto -nervo -nessuno -nettuno -neutrale -neve -nevrotico -nicchia -ninfa -nitido -nobile -nocivo -nodo -nome -nomina -nordico -normale -norvegese -nostrano -notare -notizia -notturno -novella -nucleo -nulla -numero -nuovo -nutrire -nuvola -nuziale -oasi -obbedire -obbligo -obelisco -oblio -obolo -obsoleto -occasione -occhio -occidente -occorrere -occultare -ocra -oculato -odierno -odorare -offerta -offrire -offuscato -oggetto -oggi -ognuno -olandese -olfatto -oliato -oliva -ologramma -oltre -omaggio -ombelico -ombra -omega -omissione -ondoso -onere -onice -onnivoro -onorevole -onta -operato -opinione -opposto -oracolo -orafo -ordine -orecchino -orefice -orfano -organico -origine -orizzonte -orma -ormeggio -ornativo -orologio -orrendo -orribile -ortensia -ortica -orzata -orzo -osare -oscurare -osmosi -ospedale -ospite -ossa -ossidare -ostacolo -oste -otite -otre -ottagono -ottimo -ottobre -ovale -ovest -ovino -oviparo -ovocito -ovunque -ovviare -ozio -pacchetto -pace -pacifico -padella -padrone -paese -paga -pagina -palazzina -palesare -pallido -palo -palude -pandoro -pannello -paolo -paonazzo -paprica -parabola -parcella -parere -pargolo -pari -parlato -parola -partire -parvenza -parziale -passivo -pasticca -patacca -patologia -pattume -pavone -peccato -pedalare -pedonale -peggio -peloso -penare -pendice -penisola -pennuto -penombra -pensare -pentola -pepe -pepita -perbene -percorso -perdonato -perforare -pergamena -periodo -permesso -perno -perplesso -persuaso -pertugio -pervaso -pesatore -pesista -peso -pestifero -petalo -pettine -petulante -pezzo -piacere -pianta -piattino -piccino -picozza -piega -pietra -piffero -pigiama -pigolio -pigro -pila -pilifero -pillola -pilota -pimpante -pineta -pinna -pinolo -pioggia -piombo -piramide -piretico -pirite -pirolisi -pitone -pizzico -placebo -planare -plasma -platano -plenario -pochezza -poderoso -podismo -poesia -poggiare -polenta -poligono -pollice -polmonite -polpetta -polso -poltrona -polvere -pomice -pomodoro -ponte -popoloso -porfido -poroso -porpora -porre -portata -posa -positivo -possesso -postulato -potassio -potere -pranzo -prassi -pratica -precluso -predica -prefisso -pregiato -prelievo -premere -prenotare -preparato -presenza -pretesto -prevalso -prima -principe -privato -problema -procura -produrre -profumo -progetto -prolunga -promessa -pronome -proposta -proroga -proteso -prova -prudente -prugna -prurito -psiche -pubblico -pudica -pugilato -pugno -pulce -pulito -pulsante -puntare -pupazzo -pupilla -puro -quadro -qualcosa -quasi -querela -quota -raccolto -raddoppio -radicale -radunato -raffica -ragazzo -ragione -ragno -ramarro -ramingo -ramo -randagio -rantolare -rapato -rapina -rappreso -rasatura -raschiato -rasente -rassegna -rastrello -rata -ravveduto -reale -recepire -recinto -recluta -recondito -recupero -reddito -redimere -regalato -registro -regola -regresso -relazione -remare -remoto -renna -replica -reprimere -reputare -resa -residente -responso -restauro -rete -retina -retorica -rettifica -revocato -riassunto -ribadire -ribelle -ribrezzo -ricarica -ricco -ricevere -riciclato -ricordo -ricreduto -ridicolo -ridurre -rifasare -riflesso -riforma -rifugio -rigare -rigettato -righello -rilassato -rilevato -rimanere -rimbalzo -rimedio -rimorchio -rinascita -rincaro -rinforzo -rinnovo -rinomato -rinsavito -rintocco -rinuncia -rinvenire -riparato -ripetuto -ripieno -riportare -ripresa -ripulire -risata -rischio -riserva -risibile -riso -rispetto -ristoro -risultato -risvolto -ritardo -ritegno -ritmico -ritrovo -riunione -riva -riverso -rivincita -rivolto -rizoma -roba -robotico -robusto -roccia -roco -rodaggio -rodere -roditore -rogito -rollio -romantico -rompere -ronzio -rosolare -rospo -rotante -rotondo -rotula -rovescio -rubizzo -rubrica -ruga -rullino -rumine -rumoroso -ruolo -rupe -russare -rustico -sabato -sabbiare -sabotato -sagoma -salasso -saldatura -salgemma -salivare -salmone -salone -saltare -saluto -salvo -sapere -sapido -saporito -saraceno -sarcasmo -sarto -sassoso -satellite -satira -satollo -saturno -savana -savio -saziato -sbadiglio -sbalzo -sbancato -sbarra -sbattere -sbavare -sbendare -sbirciare -sbloccato -sbocciato -sbrinare -sbruffone -sbuffare -scabroso -scadenza -scala -scambiare -scandalo -scapola -scarso -scatenare -scavato -scelto -scenico -scettro -scheda -schiena -sciarpa -scienza -scindere -scippo -sciroppo -scivolo -sclerare -scodella -scolpito -scomparto -sconforto -scoprire -scorta -scossone -scozzese -scriba -scrollare -scrutinio -scuderia -scultore -scuola -scuro -scusare -sdebitare -sdoganare -seccatura -secondo -sedano -seggiola -segnalato -segregato -seguito -selciato -selettivo -sella -selvaggio -semaforo -sembrare -seme -seminato -sempre -senso -sentire -sepolto -sequenza -serata -serbato -sereno -serio -serpente -serraglio -servire -sestina -setola -settimana -sfacelo -sfaldare -sfamato -sfarzoso -sfaticato -sfera -sfida -sfilato -sfinge -sfocato -sfoderare -sfogo -sfoltire -sforzato -sfratto -sfruttato -sfuggito -sfumare -sfuso -sgabello -sgarbato -sgonfiare -sgorbio -sgrassato -sguardo -sibilo -siccome -sierra -sigla -signore -silenzio -sillaba -simbolo -simpatico -simulato -sinfonia -singolo -sinistro -sino -sintesi -sinusoide -sipario -sisma -sistole -situato -slitta -slogatura -sloveno -smarrito -smemorato -smentito -smeraldo -smilzo -smontare -smottato -smussato -snellire -snervato -snodo -sobbalzo -sobrio -soccorso -sociale -sodale -soffitto -sogno -soldato -solenne -solido -sollazzo -solo -solubile -solvente -somatico -somma -sonda -sonetto -sonnifero -sopire -soppeso -sopra -sorgere -sorpasso -sorriso -sorso -sorteggio -sorvolato -sospiro -sosta -sottile -spada -spalla -spargere -spatola -spavento -spazzola -specie -spedire -spegnere -spelatura -speranza -spessore -spettrale -spezzato -spia -spigoloso -spillato -spinoso -spirale -splendido -sportivo -sposo -spranga -sprecare -spronato -spruzzo -spuntino -squillo -sradicare -srotolato -stabile -stacco -staffa -stagnare -stampato -stantio -starnuto -stasera -statuto -stelo -steppa -sterzo -stiletto -stima -stirpe -stivale -stizzoso -stonato -storico -strappo -stregato -stridulo -strozzare -strutto -stuccare -stufo -stupendo -subentro -succoso -sudore -suggerito -sugo -sultano -suonare -superbo -supporto -surgelato -surrogato -sussurro -sutura -svagare -svedese -sveglio -svelare -svenuto -svezia -sviluppo -svista -svizzera -svolta -svuotare -tabacco -tabulato -tacciare -taciturno -tale -talismano -tampone -tannino -tara -tardivo -targato -tariffa -tarpare -tartaruga -tasto -tattico -taverna -tavolata -tazza -teca -tecnico -telefono -temerario -tempo -temuto -tendone -tenero -tensione -tentacolo -teorema -terme -terrazzo -terzetto -tesi -tesserato -testato -tetro -tettoia -tifare -tigella -timbro -tinto -tipico -tipografo -tiraggio -tiro -titanio -titolo -titubante -tizio -tizzone -toccare -tollerare -tolto -tombola -tomo -tonfo -tonsilla -topazio -topologia -toppa -torba -tornare -torrone -tortora -toscano -tossire -tostatura -totano -trabocco -trachea -trafila -tragedia -tralcio -tramonto -transito -trapano -trarre -trasloco -trattato -trave -treccia -tremolio -trespolo -tributo -tricheco -trifoglio -trillo -trincea -trio -tristezza -triturato -trivella -tromba -trono -troppo -trottola -trovare -truccato -tubatura -tuffato -tulipano -tumulto -tunisia -turbare -turchino -tuta -tutela -ubicato -uccello -uccisore -udire -uditivo -uffa -ufficio -uguale -ulisse -ultimato -umano -umile -umorismo -uncinetto -ungere -ungherese -unicorno -unificato -unisono -unitario -unte -uovo -upupa -uragano -urgenza -urlo -usanza -usato -uscito -usignolo -usuraio -utensile -utilizzo -utopia -vacante -vaccinato -vagabondo -vagliato -valanga -valgo -valico -valletta -valoroso -valutare -valvola -vampata -vangare -vanitoso -vano -vantaggio -vanvera -vapore -varano -varcato -variante -vasca -vedetta -vedova -veduto -vegetale -veicolo -velcro -velina -velluto -veloce -venato -vendemmia -vento -verace -verbale -vergogna -verifica -vero -verruca -verticale -vescica -vessillo -vestale -veterano -vetrina -vetusto -viandante -vibrante -vicenda -vichingo -vicinanza -vidimare -vigilia -vigneto -vigore -vile -villano -vimini -vincitore -viola -vipera -virgola -virologo -virulento -viscoso -visione -vispo -vissuto -visura -vita -vitello -vittima -vivanda -vivido -viziare -voce -voga -volatile -volere -volpe -voragine -vulcano -zampogna -zanna -zappato -zattera -zavorra -zefiro -zelante -zelo -zenzero -zerbino -zibetto -zinco -zircone -zitto -zolla -zotico -zucchero -zufolo -zulu -zuppa`.split('\n'); -//# sourceMappingURL=italian.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js.map deleted file mode 100644 index db9246a9..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/italian.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"italian.js","sourceRoot":"","sources":["../../src/wordlists/italian.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+/D5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js deleted file mode 100644 index 44c62bf0..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `あいこくしん -あいさつ -あいだ -あおぞら -あかちゃん -あきる -あけがた -あける -あこがれる -あさい -あさひ -あしあと -あじわう -あずかる -あずき -あそぶ -あたえる -あたためる -あたりまえ -あたる -あつい -あつかう -あっしゅく -あつまり -あつめる -あてな -あてはまる -あひる -あぶら -あぶる -あふれる -あまい -あまど -あまやかす -あまり -あみもの -あめりか -あやまる -あゆむ -あらいぐま -あらし -あらすじ -あらためる -あらゆる -あらわす -ありがとう -あわせる -あわてる -あんい -あんがい -あんこ -あんぜん -あんてい -あんない -あんまり -いいだす -いおん -いがい -いがく -いきおい -いきなり -いきもの -いきる -いくじ -いくぶん -いけばな -いけん -いこう -いこく -いこつ -いさましい -いさん -いしき -いじゅう -いじょう -いじわる -いずみ -いずれ -いせい -いせえび -いせかい -いせき -いぜん -いそうろう -いそがしい -いだい -いだく -いたずら -いたみ -いたりあ -いちおう -いちじ -いちど -いちば -いちぶ -いちりゅう -いつか -いっしゅん -いっせい -いっそう -いったん -いっち -いってい -いっぽう -いてざ -いてん -いどう -いとこ -いない -いなか -いねむり -いのち -いのる -いはつ -いばる -いはん -いびき -いひん -いふく -いへん -いほう -いみん -いもうと -いもたれ -いもり -いやがる -いやす -いよかん -いよく -いらい -いらすと -いりぐち -いりょう -いれい -いれもの -いれる -いろえんぴつ -いわい -いわう -いわかん -いわば -いわゆる -いんげんまめ -いんさつ -いんしょう -いんよう -うえき -うえる -うおざ -うがい -うかぶ -うかべる -うきわ -うくらいな -うくれれ -うけたまわる -うけつけ -うけとる -うけもつ -うける -うごかす -うごく -うこん -うさぎ -うしなう -うしろがみ -うすい -うすぎ -うすぐらい -うすめる -うせつ -うちあわせ -うちがわ -うちき -うちゅう -うっかり -うつくしい -うったえる -うつる -うどん -うなぎ -うなじ -うなずく -うなる -うねる -うのう -うぶげ -うぶごえ -うまれる -うめる -うもう -うやまう -うよく -うらがえす -うらぐち -うらない -うりあげ -うりきれ -うるさい -うれしい -うれゆき -うれる -うろこ -うわき -うわさ -うんこう -うんちん -うんてん -うんどう -えいえん -えいが -えいきょう -えいご -えいせい -えいぶん -えいよう -えいわ -えおり -えがお -えがく -えきたい -えくせる -えしゃく -えすて -えつらん -えのぐ -えほうまき -えほん -えまき -えもじ -えもの -えらい -えらぶ -えりあ -えんえん -えんかい -えんぎ -えんげき -えんしゅう -えんぜつ -えんそく -えんちょう -えんとつ -おいかける -おいこす -おいしい -おいつく -おうえん -おうさま -おうじ -おうせつ -おうたい -おうふく -おうべい -おうよう -おえる -おおい -おおう -おおどおり -おおや -おおよそ -おかえり -おかず -おがむ -おかわり -おぎなう -おきる -おくさま -おくじょう -おくりがな -おくる -おくれる -おこす -おこなう -おこる -おさえる -おさない -おさめる -おしいれ -おしえる -おじぎ -おじさん -おしゃれ -おそらく -おそわる -おたがい -おたく -おだやか -おちつく -おっと -おつり -おでかけ -おとしもの -おとなしい -おどり -おどろかす -おばさん -おまいり -おめでとう -おもいで -おもう -おもたい -おもちゃ -おやつ -おやゆび -およぼす -おらんだ -おろす -おんがく -おんけい -おんしゃ -おんせん -おんだん -おんちゅう -おんどけい -かあつ -かいが -がいき -がいけん -がいこう -かいさつ -かいしゃ -かいすいよく -かいぜん -かいぞうど -かいつう -かいてん -かいとう -かいふく -がいへき -かいほう -かいよう -がいらい -かいわ -かえる -かおり -かかえる -かがく -かがし -かがみ -かくご -かくとく -かざる -がぞう -かたい -かたち -がちょう -がっきゅう -がっこう -がっさん -がっしょう -かなざわし -かのう -がはく -かぶか -かほう -かほご -かまう -かまぼこ -かめれおん -かゆい -かようび -からい -かるい -かろう -かわく -かわら -がんか -かんけい -かんこう -かんしゃ -かんそう -かんたん -かんち -がんばる -きあい -きあつ -きいろ -ぎいん -きうい -きうん -きえる -きおう -きおく -きおち -きおん -きかい -きかく -きかんしゃ -ききて -きくばり -きくらげ -きけんせい -きこう -きこえる -きこく -きさい -きさく -きさま -きさらぎ -ぎじかがく -ぎしき -ぎじたいけん -ぎじにってい -ぎじゅつしゃ -きすう -きせい -きせき -きせつ -きそう -きぞく -きぞん -きたえる -きちょう -きつえん -ぎっちり -きつつき -きつね -きてい -きどう -きどく -きない -きなが -きなこ -きぬごし -きねん -きのう -きのした -きはく -きびしい -きひん -きふく -きぶん -きぼう -きほん -きまる -きみつ -きむずかしい -きめる -きもだめし -きもち -きもの -きゃく -きやく -ぎゅうにく -きよう -きょうりゅう -きらい -きらく -きりん -きれい -きれつ -きろく -ぎろん -きわめる -ぎんいろ -きんかくじ -きんじょ -きんようび -ぐあい -くいず -くうかん -くうき -くうぐん -くうこう -ぐうせい -くうそう -ぐうたら -くうふく -くうぼ -くかん -くきょう -くげん -ぐこう -くさい -くさき -くさばな -くさる -くしゃみ -くしょう -くすのき -くすりゆび -くせげ -くせん -ぐたいてき -くださる -くたびれる -くちこみ -くちさき -くつした -ぐっすり -くつろぐ -くとうてん -くどく -くなん -くねくね -くのう -くふう -くみあわせ -くみたてる -くめる -くやくしょ -くらす -くらべる -くるま -くれる -くろう -くわしい -ぐんかん -ぐんしょく -ぐんたい -ぐんて -けあな -けいかく -けいけん -けいこ -けいさつ -げいじゅつ -けいたい -げいのうじん -けいれき -けいろ -けおとす -けおりもの -げきか -げきげん -げきだん -げきちん -げきとつ -げきは -げきやく -げこう -げこくじょう -げざい -けさき -げざん -けしき -けしごむ -けしょう -げすと -けたば -けちゃっぷ -けちらす -けつあつ -けつい -けつえき -けっこん -けつじょ -けっせき -けってい -けつまつ -げつようび -げつれい -けつろん -げどく -けとばす -けとる -けなげ -けなす -けなみ -けぬき -げねつ -けねん -けはい -げひん -けぶかい -げぼく -けまり -けみかる -けむし -けむり -けもの -けらい -けろけろ -けわしい -けんい -けんえつ -けんお -けんか -げんき -けんげん -けんこう -けんさく -けんしゅう -けんすう -げんそう -けんちく -けんてい -けんとう -けんない -けんにん -げんぶつ -けんま -けんみん -けんめい -けんらん -けんり -こあくま -こいぬ -こいびと -ごうい -こうえん -こうおん -こうかん -ごうきゅう -ごうけい -こうこう -こうさい -こうじ -こうすい -ごうせい -こうそく -こうたい -こうちゃ -こうつう -こうてい -こうどう -こうない -こうはい -ごうほう -ごうまん -こうもく -こうりつ -こえる -こおり -ごかい -ごがつ -ごかん -こくご -こくさい -こくとう -こくない -こくはく -こぐま -こけい -こける -ここのか -こころ -こさめ -こしつ -こすう -こせい -こせき -こぜん -こそだて -こたい -こたえる -こたつ -こちょう -こっか -こつこつ -こつばん -こつぶ -こてい -こてん -ことがら -ことし -ことば -ことり -こなごな -こねこね -このまま -このみ -このよ -ごはん -こひつじ -こふう -こふん -こぼれる -ごまあぶら -こまかい -ごますり -こまつな -こまる -こむぎこ -こもじ -こもち -こもの -こもん -こやく -こやま -こゆう -こゆび -こよい -こよう -こりる -これくしょん -ころっけ -こわもて -こわれる -こんいん -こんかい -こんき -こんしゅう -こんすい -こんだて -こんとん -こんなん -こんびに -こんぽん -こんまけ -こんや -こんれい -こんわく -ざいえき -さいかい -さいきん -ざいげん -ざいこ -さいしょ -さいせい -ざいたく -ざいちゅう -さいてき -ざいりょう -さうな -さかいし -さがす -さかな -さかみち -さがる -さぎょう -さくし -さくひん -さくら -さこく -さこつ -さずかる -ざせき -さたん -さつえい -ざつおん -ざっか -ざつがく -さっきょく -ざっし -さつじん -ざっそう -さつたば -さつまいも -さてい -さといも -さとう -さとおや -さとし -さとる -さのう -さばく -さびしい -さべつ -さほう -さほど -さます -さみしい -さみだれ -さむけ -さめる -さやえんどう -さゆう -さよう -さよく -さらだ -ざるそば -さわやか -さわる -さんいん -さんか -さんきゃく -さんこう -さんさい -ざんしょ -さんすう -さんせい -さんそ -さんち -さんま -さんみ -さんらん -しあい -しあげ -しあさって -しあわせ -しいく -しいん -しうち -しえい -しおけ -しかい -しかく -じかん -しごと -しすう -じだい -したうけ -したぎ -したて -したみ -しちょう -しちりん -しっかり -しつじ -しつもん -してい -してき -してつ -じてん -じどう -しなぎれ -しなもの -しなん -しねま -しねん -しのぐ -しのぶ -しはい -しばかり -しはつ -しはらい -しはん -しひょう -しふく -じぶん -しへい -しほう -しほん -しまう -しまる -しみん -しむける -じむしょ -しめい -しめる -しもん -しゃいん -しゃうん -しゃおん -じゃがいも -しやくしょ -しゃくほう -しゃけん -しゃこ -しゃざい -しゃしん -しゃせん -しゃそう -しゃたい -しゃちょう -しゃっきん -じゃま -しゃりん -しゃれい -じゆう -じゅうしょ -しゅくはく -じゅしん -しゅっせき -しゅみ -しゅらば -じゅんばん -しょうかい -しょくたく -しょっけん -しょどう -しょもつ -しらせる -しらべる -しんか -しんこう -じんじゃ -しんせいじ -しんちく -しんりん -すあげ -すあし -すあな -ずあん -すいえい -すいか -すいとう -ずいぶん -すいようび -すうがく -すうじつ -すうせん -すおどり -すきま -すくう -すくない -すける -すごい -すこし -ずさん -すずしい -すすむ -すすめる -すっかり -ずっしり -ずっと -すてき -すてる -すねる -すのこ -すはだ -すばらしい -ずひょう -ずぶぬれ -すぶり -すふれ -すべて -すべる -ずほう -すぼん -すまい -すめし -すもう -すやき -すらすら -するめ -すれちがう -すろっと -すわる -すんぜん -すんぽう -せあぶら -せいかつ -せいげん -せいじ -せいよう -せおう -せかいかん -せきにん -せきむ -せきゆ -せきらんうん -せけん -せこう -せすじ -せたい -せたけ -せっかく -せっきゃく -ぜっく -せっけん -せっこつ -せっさたくま -せつぞく -せつだん -せつでん -せっぱん -せつび -せつぶん -せつめい -せつりつ -せなか -せのび -せはば -せびろ -せぼね -せまい -せまる -せめる -せもたれ -せりふ -ぜんあく -せんい -せんえい -せんか -せんきょ -せんく -せんげん -ぜんご -せんさい -せんしゅ -せんすい -せんせい -せんぞ -せんたく -せんちょう -せんてい -せんとう -せんぬき -せんねん -せんぱい -ぜんぶ -ぜんぽう -せんむ -せんめんじょ -せんもん -せんやく -せんゆう -せんよう -ぜんら -ぜんりゃく -せんれい -せんろ -そあく -そいとげる -そいね -そうがんきょう -そうき -そうご -そうしん -そうだん -そうなん -そうび -そうめん -そうり -そえもの -そえん -そがい -そげき -そこう -そこそこ -そざい -そしな -そせい -そせん -そそぐ -そだてる -そつう -そつえん -そっかん -そつぎょう -そっけつ -そっこう -そっせん -そっと -そとがわ -そとづら -そなえる -そなた -そふぼ -そぼく -そぼろ -そまつ -そまる -そむく -そむりえ -そめる -そもそも -そよかぜ -そらまめ -そろう -そんかい -そんけい -そんざい -そんしつ -そんぞく -そんちょう -ぞんび -ぞんぶん -そんみん -たあい -たいいん -たいうん -たいえき -たいおう -だいがく -たいき -たいぐう -たいけん -たいこ -たいざい -だいじょうぶ -だいすき -たいせつ -たいそう -だいたい -たいちょう -たいてい -だいどころ -たいない -たいねつ -たいのう -たいはん -だいひょう -たいふう -たいへん -たいほ -たいまつばな -たいみんぐ -たいむ -たいめん -たいやき -たいよう -たいら -たいりょく -たいる -たいわん -たうえ -たえる -たおす -たおる -たおれる -たかい -たかね -たきび -たくさん -たこく -たこやき -たさい -たしざん -だじゃれ -たすける -たずさわる -たそがれ -たたかう -たたく -ただしい -たたみ -たちばな -だっかい -だっきゃく -だっこ -だっしゅつ -だったい -たてる -たとえる -たなばた -たにん -たぬき -たのしみ -たはつ -たぶん -たべる -たぼう -たまご -たまる -だむる -ためいき -ためす -ためる -たもつ -たやすい -たよる -たらす -たりきほんがん -たりょう -たりる -たると -たれる -たれんと -たろっと -たわむれる -だんあつ -たんい -たんおん -たんか -たんき -たんけん -たんご -たんさん -たんじょうび -だんせい -たんそく -たんたい -だんち -たんてい -たんとう -だんな -たんにん -だんねつ -たんのう -たんぴん -だんぼう -たんまつ -たんめい -だんれつ -だんろ -だんわ -ちあい -ちあん -ちいき -ちいさい -ちえん -ちかい -ちから -ちきゅう -ちきん -ちけいず -ちけん -ちこく -ちさい -ちしき -ちしりょう -ちせい -ちそう -ちたい -ちたん -ちちおや -ちつじょ -ちてき -ちてん -ちぬき -ちぬり -ちのう -ちひょう -ちへいせん -ちほう -ちまた -ちみつ -ちみどろ -ちめいど -ちゃんこなべ -ちゅうい -ちゆりょく -ちょうし -ちょさくけん -ちらし -ちらみ -ちりがみ -ちりょう -ちるど -ちわわ -ちんたい -ちんもく -ついか -ついたち -つうか -つうじょう -つうはん -つうわ -つかう -つかれる -つくね -つくる -つけね -つける -つごう -つたえる -つづく -つつじ -つつむ -つとめる -つながる -つなみ -つねづね -つのる -つぶす -つまらない -つまる -つみき -つめたい -つもり -つもる -つよい -つるぼ -つるみく -つわもの -つわり -てあし -てあて -てあみ -ていおん -ていか -ていき -ていけい -ていこく -ていさつ -ていし -ていせい -ていたい -ていど -ていねい -ていひょう -ていへん -ていぼう -てうち -ておくれ -てきとう -てくび -でこぼこ -てさぎょう -てさげ -てすり -てそう -てちがい -てちょう -てつがく -てつづき -でっぱ -てつぼう -てつや -でぬかえ -てぬき -てぬぐい -てのひら -てはい -てぶくろ -てふだ -てほどき -てほん -てまえ -てまきずし -てみじか -てみやげ -てらす -てれび -てわけ -てわたし -でんあつ -てんいん -てんかい -てんき -てんぐ -てんけん -てんごく -てんさい -てんし -てんすう -でんち -てんてき -てんとう -てんない -てんぷら -てんぼうだい -てんめつ -てんらんかい -でんりょく -でんわ -どあい -といれ -どうかん -とうきゅう -どうぐ -とうし -とうむぎ -とおい -とおか -とおく -とおす -とおる -とかい -とかす -ときおり -ときどき -とくい -とくしゅう -とくてん -とくに -とくべつ -とけい -とける -とこや -とさか -としょかん -とそう -とたん -とちゅう -とっきゅう -とっくん -とつぜん -とつにゅう -とどける -ととのえる -とない -となえる -となり -とのさま -とばす -どぶがわ -とほう -とまる -とめる -ともだち -ともる -どようび -とらえる -とんかつ -どんぶり -ないかく -ないこう -ないしょ -ないす -ないせん -ないそう -なおす -ながい -なくす -なげる -なこうど -なさけ -なたでここ -なっとう -なつやすみ -ななおし -なにごと -なにもの -なにわ -なのか -なふだ -なまいき -なまえ -なまみ -なみだ -なめらか -なめる -なやむ -ならう -ならび -ならぶ -なれる -なわとび -なわばり -にあう -にいがた -にうけ -におい -にかい -にがて -にきび -にくしみ -にくまん -にげる -にさんかたんそ -にしき -にせもの -にちじょう -にちようび -にっか -にっき -にっけい -にっこう -にっさん -にっしょく -にっすう -にっせき -にってい -になう -にほん -にまめ -にもつ -にやり -にゅういん -にりんしゃ -にわとり -にんい -にんか -にんき -にんげん -にんしき -にんずう -にんそう -にんたい -にんち -にんてい -にんにく -にんぷ -にんまり -にんむ -にんめい -にんよう -ぬいくぎ -ぬかす -ぬぐいとる -ぬぐう -ぬくもり -ぬすむ -ぬまえび -ぬめり -ぬらす -ぬんちゃく -ねあげ -ねいき -ねいる -ねいろ -ねぐせ -ねくたい -ねくら -ねこぜ -ねこむ -ねさげ -ねすごす -ねそべる -ねだん -ねつい -ねっしん -ねつぞう -ねったいぎょ -ねぶそく -ねふだ -ねぼう -ねほりはほり -ねまき -ねまわし -ねみみ -ねむい -ねむたい -ねもと -ねらう -ねわざ -ねんいり -ねんおし -ねんかん -ねんきん -ねんぐ -ねんざ -ねんし -ねんちゃく -ねんど -ねんぴ -ねんぶつ -ねんまつ -ねんりょう -ねんれい -のいず -のおづま -のがす -のきなみ -のこぎり -のこす -のこる -のせる -のぞく -のぞむ -のたまう -のちほど -のっく -のばす -のはら -のべる -のぼる -のみもの -のやま -のらいぬ -のらねこ -のりもの -のりゆき -のれん -のんき -ばあい -はあく -ばあさん -ばいか -ばいく -はいけん -はいご -はいしん -はいすい -はいせん -はいそう -はいち -ばいばい -はいれつ -はえる -はおる -はかい -ばかり -はかる -はくしゅ -はけん -はこぶ -はさみ -はさん -はしご -ばしょ -はしる -はせる -ぱそこん -はそん -はたん -はちみつ -はつおん -はっかく -はづき -はっきり -はっくつ -はっけん -はっこう -はっさん -はっしん -はったつ -はっちゅう -はってん -はっぴょう -はっぽう -はなす -はなび -はにかむ -はぶらし -はみがき -はむかう -はめつ -はやい -はやし -はらう -はろうぃん -はわい -はんい -はんえい -はんおん -はんかく -はんきょう -ばんぐみ -はんこ -はんしゃ -はんすう -はんだん -ぱんち -ぱんつ -はんてい -はんとし -はんのう -はんぱ -はんぶん -はんぺん -はんぼうき -はんめい -はんらん -はんろん -ひいき -ひうん -ひえる -ひかく -ひかり -ひかる -ひかん -ひくい -ひけつ -ひこうき -ひこく -ひさい -ひさしぶり -ひさん -びじゅつかん -ひしょ -ひそか -ひそむ -ひたむき -ひだり -ひたる -ひつぎ -ひっこし -ひっし -ひつじゅひん -ひっす -ひつぜん -ぴったり -ぴっちり -ひつよう -ひてい -ひとごみ -ひなまつり -ひなん -ひねる -ひはん -ひびく -ひひょう -ひほう -ひまわり -ひまん -ひみつ -ひめい -ひめじし -ひやけ -ひやす -ひよう -びょうき -ひらがな -ひらく -ひりつ -ひりょう -ひるま -ひるやすみ -ひれい -ひろい -ひろう -ひろき -ひろゆき -ひんかく -ひんけつ -ひんこん -ひんしゅ -ひんそう -ぴんち -ひんぱん -びんぼう -ふあん -ふいうち -ふうけい -ふうせん -ぷうたろう -ふうとう -ふうふ -ふえる -ふおん -ふかい -ふきん -ふくざつ -ふくぶくろ -ふこう -ふさい -ふしぎ -ふじみ -ふすま -ふせい -ふせぐ -ふそく -ぶたにく -ふたん -ふちょう -ふつう -ふつか -ふっかつ -ふっき -ふっこく -ぶどう -ふとる -ふとん -ふのう -ふはい -ふひょう -ふへん -ふまん -ふみん -ふめつ -ふめん -ふよう -ふりこ -ふりる -ふるい -ふんいき -ぶんがく -ぶんぐ -ふんしつ -ぶんせき -ふんそう -ぶんぽう -へいあん -へいおん -へいがい -へいき -へいげん -へいこう -へいさ -へいしゃ -へいせつ -へいそ -へいたく -へいてん -へいねつ -へいわ -へきが -へこむ -べにいろ -べにしょうが -へらす -へんかん -べんきょう -べんごし -へんさい -へんたい -べんり -ほあん -ほいく -ぼうぎょ -ほうこく -ほうそう -ほうほう -ほうもん -ほうりつ -ほえる -ほおん -ほかん -ほきょう -ぼきん -ほくろ -ほけつ -ほけん -ほこう -ほこる -ほしい -ほしつ -ほしゅ -ほしょう -ほせい -ほそい -ほそく -ほたて -ほたる -ぽちぶくろ -ほっきょく -ほっさ -ほったん -ほとんど -ほめる -ほんい -ほんき -ほんけ -ほんしつ -ほんやく -まいにち -まかい -まかせる -まがる -まける -まこと -まさつ -まじめ -ますく -まぜる -まつり -まとめ -まなぶ -まぬけ -まねく -まほう -まもる -まゆげ -まよう -まろやか -まわす -まわり -まわる -まんが -まんきつ -まんぞく -まんなか -みいら -みうち -みえる -みがく -みかた -みかん -みけん -みこん -みじかい -みすい -みすえる -みせる -みっか -みつかる -みつける -みてい -みとめる -みなと -みなみかさい -みねらる -みのう -みのがす -みほん -みもと -みやげ -みらい -みりょく -みわく -みんか -みんぞく -むいか -むえき -むえん -むかい -むかう -むかえ -むかし -むぎちゃ -むける -むげん -むさぼる -むしあつい -むしば -むじゅん -むしろ -むすう -むすこ -むすぶ -むすめ -むせる -むせん -むちゅう -むなしい -むのう -むやみ -むよう -むらさき -むりょう -むろん -めいあん -めいうん -めいえん -めいかく -めいきょく -めいさい -めいし -めいそう -めいぶつ -めいれい -めいわく -めぐまれる -めざす -めした -めずらしい -めだつ -めまい -めやす -めんきょ -めんせき -めんどう -もうしあげる -もうどうけん -もえる -もくし -もくてき -もくようび -もちろん -もどる -もらう -もんく -もんだい -やおや -やける -やさい -やさしい -やすい -やすたろう -やすみ -やせる -やそう -やたい -やちん -やっと -やっぱり -やぶる -やめる -ややこしい -やよい -やわらかい -ゆうき -ゆうびんきょく -ゆうべ -ゆうめい -ゆけつ -ゆしゅつ -ゆせん -ゆそう -ゆたか -ゆちゃく -ゆでる -ゆにゅう -ゆびわ -ゆらい -ゆれる -ようい -ようか -ようきゅう -ようじ -ようす -ようちえん -よかぜ -よかん -よきん -よくせい -よくぼう -よけい -よごれる -よさん -よしゅう -よそう -よそく -よっか -よてい -よどがわく -よねつ -よやく -よゆう -よろこぶ -よろしい -らいう -らくがき -らくご -らくさつ -らくだ -らしんばん -らせん -らぞく -らたい -らっか -られつ -りえき -りかい -りきさく -りきせつ -りくぐん -りくつ -りけん -りこう -りせい -りそう -りそく -りてん -りねん -りゆう -りゅうがく -りよう -りょうり -りょかん -りょくちゃ -りょこう -りりく -りれき -りろん -りんご -るいけい -るいさい -るいじ -るいせき -るすばん -るりがわら -れいかん -れいぎ -れいせい -れいぞうこ -れいとう -れいぼう -れきし -れきだい -れんあい -れんけい -れんこん -れんさい -れんしゅう -れんぞく -れんらく -ろうか -ろうご -ろうじん -ろうそく -ろくが -ろこつ -ろじうら -ろしゅつ -ろせん -ろてん -ろめん -ろれつ -ろんぎ -ろんぱ -ろんぶん -ろんり -わかす -わかめ -わかやま -わかれる -わしつ -わじまし -わすれもの -わらう -われる`.split('\n'); -//# sourceMappingURL=japanese.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js.map deleted file mode 100644 index ee1323c5..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/japanese.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"japanese.js","sourceRoot":"","sources":["../../src/wordlists/japanese.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+/D9B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js deleted file mode 100644 index 535ae22a..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `가격 -가끔 -가난 -가능 -가득 -가르침 -가뭄 -가방 -가상 -가슴 -가운데 -가을 -가이드 -가입 -가장 -가정 -가족 -가죽 -각오 -각자 -간격 -간부 -간섭 -간장 -간접 -간판 -갈등 -갈비 -갈색 -갈증 -감각 -감기 -감소 -감수성 -감자 -감정 -갑자기 -강남 -강당 -강도 -강력히 -강변 -강북 -강사 -강수량 -강아지 -강원도 -강의 -강제 -강조 -같이 -개구리 -개나리 -개방 -개별 -개선 -개성 -개인 -객관적 -거실 -거액 -거울 -거짓 -거품 -걱정 -건강 -건물 -건설 -건조 -건축 -걸음 -검사 -검토 -게시판 -게임 -겨울 -견해 -결과 -결국 -결론 -결석 -결승 -결심 -결정 -결혼 -경계 -경고 -경기 -경력 -경복궁 -경비 -경상도 -경영 -경우 -경쟁 -경제 -경주 -경찰 -경치 -경향 -경험 -계곡 -계단 -계란 -계산 -계속 -계약 -계절 -계층 -계획 -고객 -고구려 -고궁 -고급 -고등학생 -고무신 -고민 -고양이 -고장 -고전 -고집 -고춧가루 -고통 -고향 -곡식 -골목 -골짜기 -골프 -공간 -공개 -공격 -공군 -공급 -공기 -공동 -공무원 -공부 -공사 -공식 -공업 -공연 -공원 -공장 -공짜 -공책 -공통 -공포 -공항 -공휴일 -과목 -과일 -과장 -과정 -과학 -관객 -관계 -관광 -관념 -관람 -관련 -관리 -관습 -관심 -관점 -관찰 -광경 -광고 -광장 -광주 -괴로움 -굉장히 -교과서 -교문 -교복 -교실 -교양 -교육 -교장 -교직 -교통 -교환 -교훈 -구경 -구름 -구멍 -구별 -구분 -구석 -구성 -구속 -구역 -구입 -구청 -구체적 -국가 -국기 -국내 -국립 -국물 -국민 -국수 -국어 -국왕 -국적 -국제 -국회 -군대 -군사 -군인 -궁극적 -권리 -권위 -권투 -귀국 -귀신 -규정 -규칙 -균형 -그날 -그냥 -그늘 -그러나 -그룹 -그릇 -그림 -그제서야 -그토록 -극복 -극히 -근거 -근교 -근래 -근로 -근무 -근본 -근원 -근육 -근처 -글씨 -글자 -금강산 -금고 -금년 -금메달 -금액 -금연 -금요일 -금지 -긍정적 -기간 -기관 -기념 -기능 -기독교 -기둥 -기록 -기름 -기법 -기본 -기분 -기쁨 -기숙사 -기술 -기억 -기업 -기온 -기운 -기원 -기적 -기준 -기침 -기혼 -기획 -긴급 -긴장 -길이 -김밥 -김치 -김포공항 -깍두기 -깜빡 -깨달음 -깨소금 -껍질 -꼭대기 -꽃잎 -나들이 -나란히 -나머지 -나물 -나침반 -나흘 -낙엽 -난방 -날개 -날씨 -날짜 -남녀 -남대문 -남매 -남산 -남자 -남편 -남학생 -낭비 -낱말 -내년 -내용 -내일 -냄비 -냄새 -냇물 -냉동 -냉면 -냉방 -냉장고 -넥타이 -넷째 -노동 -노란색 -노력 -노인 -녹음 -녹차 -녹화 -논리 -논문 -논쟁 -놀이 -농구 -농담 -농민 -농부 -농업 -농장 -농촌 -높이 -눈동자 -눈물 -눈썹 -뉴욕 -느낌 -늑대 -능동적 -능력 -다방 -다양성 -다음 -다이어트 -다행 -단계 -단골 -단독 -단맛 -단순 -단어 -단위 -단점 -단체 -단추 -단편 -단풍 -달걀 -달러 -달력 -달리 -닭고기 -담당 -담배 -담요 -담임 -답변 -답장 -당근 -당분간 -당연히 -당장 -대규모 -대낮 -대단히 -대답 -대도시 -대략 -대량 -대륙 -대문 -대부분 -대신 -대응 -대장 -대전 -대접 -대중 -대책 -대출 -대충 -대통령 -대학 -대한민국 -대합실 -대형 -덩어리 -데이트 -도대체 -도덕 -도둑 -도망 -도서관 -도심 -도움 -도입 -도자기 -도저히 -도전 -도중 -도착 -독감 -독립 -독서 -독일 -독창적 -동화책 -뒷모습 -뒷산 -딸아이 -마누라 -마늘 -마당 -마라톤 -마련 -마무리 -마사지 -마약 -마요네즈 -마을 -마음 -마이크 -마중 -마지막 -마찬가지 -마찰 -마흔 -막걸리 -막내 -막상 -만남 -만두 -만세 -만약 -만일 -만점 -만족 -만화 -많이 -말기 -말씀 -말투 -맘대로 -망원경 -매년 -매달 -매력 -매번 -매스컴 -매일 -매장 -맥주 -먹이 -먼저 -먼지 -멀리 -메일 -며느리 -며칠 -면담 -멸치 -명단 -명령 -명예 -명의 -명절 -명칭 -명함 -모금 -모니터 -모델 -모든 -모범 -모습 -모양 -모임 -모조리 -모집 -모퉁이 -목걸이 -목록 -목사 -목소리 -목숨 -목적 -목표 -몰래 -몸매 -몸무게 -몸살 -몸속 -몸짓 -몸통 -몹시 -무관심 -무궁화 -무더위 -무덤 -무릎 -무슨 -무엇 -무역 -무용 -무조건 -무지개 -무척 -문구 -문득 -문법 -문서 -문제 -문학 -문화 -물가 -물건 -물결 -물고기 -물론 -물리학 -물음 -물질 -물체 -미국 -미디어 -미사일 -미술 -미역 -미용실 -미움 -미인 -미팅 -미혼 -민간 -민족 -민주 -믿음 -밀가루 -밀리미터 -밑바닥 -바가지 -바구니 -바나나 -바늘 -바닥 -바닷가 -바람 -바이러스 -바탕 -박물관 -박사 -박수 -반대 -반드시 -반말 -반발 -반성 -반응 -반장 -반죽 -반지 -반찬 -받침 -발가락 -발걸음 -발견 -발달 -발레 -발목 -발바닥 -발생 -발음 -발자국 -발전 -발톱 -발표 -밤하늘 -밥그릇 -밥맛 -밥상 -밥솥 -방금 -방면 -방문 -방바닥 -방법 -방송 -방식 -방안 -방울 -방지 -방학 -방해 -방향 -배경 -배꼽 -배달 -배드민턴 -백두산 -백색 -백성 -백인 -백제 -백화점 -버릇 -버섯 -버튼 -번개 -번역 -번지 -번호 -벌금 -벌레 -벌써 -범위 -범인 -범죄 -법률 -법원 -법적 -법칙 -베이징 -벨트 -변경 -변동 -변명 -변신 -변호사 -변화 -별도 -별명 -별일 -병실 -병아리 -병원 -보관 -보너스 -보라색 -보람 -보름 -보상 -보안 -보자기 -보장 -보전 -보존 -보통 -보편적 -보험 -복도 -복사 -복숭아 -복습 -볶음 -본격적 -본래 -본부 -본사 -본성 -본인 -본질 -볼펜 -봉사 -봉지 -봉투 -부근 -부끄러움 -부담 -부동산 -부문 -부분 -부산 -부상 -부엌 -부인 -부작용 -부장 -부정 -부족 -부지런히 -부친 -부탁 -부품 -부회장 -북부 -북한 -분노 -분량 -분리 -분명 -분석 -분야 -분위기 -분필 -분홍색 -불고기 -불과 -불교 -불꽃 -불만 -불법 -불빛 -불안 -불이익 -불행 -브랜드 -비극 -비난 -비닐 -비둘기 -비디오 -비로소 -비만 -비명 -비밀 -비바람 -비빔밥 -비상 -비용 -비율 -비중 -비타민 -비판 -빌딩 -빗물 -빗방울 -빗줄기 -빛깔 -빨간색 -빨래 -빨리 -사건 -사계절 -사나이 -사냥 -사람 -사랑 -사립 -사모님 -사물 -사방 -사상 -사생활 -사설 -사슴 -사실 -사업 -사용 -사월 -사장 -사전 -사진 -사촌 -사춘기 -사탕 -사투리 -사흘 -산길 -산부인과 -산업 -산책 -살림 -살인 -살짝 -삼계탕 -삼국 -삼십 -삼월 -삼촌 -상관 -상금 -상대 -상류 -상반기 -상상 -상식 -상업 -상인 -상자 -상점 -상처 -상추 -상태 -상표 -상품 -상황 -새벽 -색깔 -색연필 -생각 -생명 -생물 -생방송 -생산 -생선 -생신 -생일 -생활 -서랍 -서른 -서명 -서민 -서비스 -서양 -서울 -서적 -서점 -서쪽 -서클 -석사 -석유 -선거 -선물 -선배 -선생 -선수 -선원 -선장 -선전 -선택 -선풍기 -설거지 -설날 -설렁탕 -설명 -설문 -설사 -설악산 -설치 -설탕 -섭씨 -성공 -성당 -성명 -성별 -성인 -성장 -성적 -성질 -성함 -세금 -세미나 -세상 -세월 -세종대왕 -세탁 -센터 -센티미터 -셋째 -소규모 -소극적 -소금 -소나기 -소년 -소득 -소망 -소문 -소설 -소속 -소아과 -소용 -소원 -소음 -소중히 -소지품 -소질 -소풍 -소형 -속담 -속도 -속옷 -손가락 -손길 -손녀 -손님 -손등 -손목 -손뼉 -손실 -손질 -손톱 -손해 -솔직히 -솜씨 -송아지 -송이 -송편 -쇠고기 -쇼핑 -수건 -수년 -수단 -수돗물 -수동적 -수면 -수명 -수박 -수상 -수석 -수술 -수시로 -수업 -수염 -수영 -수입 -수준 -수집 -수출 -수컷 -수필 -수학 -수험생 -수화기 -숙녀 -숙소 -숙제 -순간 -순서 -순수 -순식간 -순위 -숟가락 -술병 -술집 -숫자 -스님 -스물 -스스로 -스승 -스웨터 -스위치 -스케이트 -스튜디오 -스트레스 -스포츠 -슬쩍 -슬픔 -습관 -습기 -승객 -승리 -승부 -승용차 -승진 -시각 -시간 -시골 -시금치 -시나리오 -시댁 -시리즈 -시멘트 -시민 -시부모 -시선 -시설 -시스템 -시아버지 -시어머니 -시월 -시인 -시일 -시작 -시장 -시절 -시점 -시중 -시즌 -시집 -시청 -시합 -시험 -식구 -식기 -식당 -식량 -식료품 -식물 -식빵 -식사 -식생활 -식초 -식탁 -식품 -신고 -신규 -신념 -신문 -신발 -신비 -신사 -신세 -신용 -신제품 -신청 -신체 -신화 -실감 -실내 -실력 -실례 -실망 -실수 -실습 -실시 -실장 -실정 -실질적 -실천 -실체 -실컷 -실태 -실패 -실험 -실현 -심리 -심부름 -심사 -심장 -심정 -심판 -쌍둥이 -씨름 -씨앗 -아가씨 -아나운서 -아드님 -아들 -아쉬움 -아스팔트 -아시아 -아울러 -아저씨 -아줌마 -아직 -아침 -아파트 -아프리카 -아픔 -아홉 -아흔 -악기 -악몽 -악수 -안개 -안경 -안과 -안내 -안녕 -안동 -안방 -안부 -안주 -알루미늄 -알코올 -암시 -암컷 -압력 -앞날 -앞문 -애인 -애정 -액수 -앨범 -야간 -야단 -야옹 -약간 -약국 -약속 -약수 -약점 -약품 -약혼녀 -양념 -양력 -양말 -양배추 -양주 -양파 -어둠 -어려움 -어른 -어젯밤 -어쨌든 -어쩌다가 -어쩐지 -언니 -언덕 -언론 -언어 -얼굴 -얼른 -얼음 -얼핏 -엄마 -업무 -업종 -업체 -엉덩이 -엉망 -엉터리 -엊그제 -에너지 -에어컨 -엔진 -여건 -여고생 -여관 -여군 -여권 -여대생 -여덟 -여동생 -여든 -여론 -여름 -여섯 -여성 -여왕 -여인 -여전히 -여직원 -여학생 -여행 -역사 -역시 -역할 -연결 -연구 -연극 -연기 -연락 -연설 -연세 -연속 -연습 -연애 -연예인 -연인 -연장 -연주 -연출 -연필 -연합 -연휴 -열기 -열매 -열쇠 -열심히 -열정 -열차 -열흘 -염려 -엽서 -영국 -영남 -영상 -영양 -영역 -영웅 -영원히 -영하 -영향 -영혼 -영화 -옆구리 -옆방 -옆집 -예감 -예금 -예방 -예산 -예상 -예선 -예술 -예습 -예식장 -예약 -예전 -예절 -예정 -예컨대 -옛날 -오늘 -오락 -오랫동안 -오렌지 -오로지 -오른발 -오븐 -오십 -오염 -오월 -오전 -오직 -오징어 -오페라 -오피스텔 -오히려 -옥상 -옥수수 -온갖 -온라인 -온몸 -온종일 -온통 -올가을 -올림픽 -올해 -옷차림 -와이셔츠 -와인 -완성 -완전 -왕비 -왕자 -왜냐하면 -왠지 -외갓집 -외국 -외로움 -외삼촌 -외출 -외침 -외할머니 -왼발 -왼손 -왼쪽 -요금 -요일 -요즘 -요청 -용기 -용서 -용어 -우산 -우선 -우승 -우연히 -우정 -우체국 -우편 -운동 -운명 -운반 -운전 -운행 -울산 -울음 -움직임 -웃어른 -웃음 -워낙 -원고 -원래 -원서 -원숭이 -원인 -원장 -원피스 -월급 -월드컵 -월세 -월요일 -웨이터 -위반 -위법 -위성 -위원 -위험 -위협 -윗사람 -유난히 -유럽 -유명 -유물 -유산 -유적 -유치원 -유학 -유행 -유형 -육군 -육상 -육십 -육체 -은행 -음력 -음료 -음반 -음성 -음식 -음악 -음주 -의견 -의논 -의문 -의복 -의식 -의심 -의외로 -의욕 -의원 -의학 -이것 -이곳 -이념 -이놈 -이달 -이대로 -이동 -이렇게 -이력서 -이론적 -이름 -이민 -이발소 -이별 -이불 -이빨 -이상 -이성 -이슬 -이야기 -이용 -이웃 -이월 -이윽고 -이익 -이전 -이중 -이튿날 -이틀 -이혼 -인간 -인격 -인공 -인구 -인근 -인기 -인도 -인류 -인물 -인생 -인쇄 -인연 -인원 -인재 -인종 -인천 -인체 -인터넷 -인하 -인형 -일곱 -일기 -일단 -일대 -일등 -일반 -일본 -일부 -일상 -일생 -일손 -일요일 -일월 -일정 -일종 -일주일 -일찍 -일체 -일치 -일행 -일회용 -임금 -임무 -입대 -입력 -입맛 -입사 -입술 -입시 -입원 -입장 -입학 -자가용 -자격 -자극 -자동 -자랑 -자부심 -자식 -자신 -자연 -자원 -자율 -자전거 -자정 -자존심 -자판 -작가 -작년 -작성 -작업 -작용 -작은딸 -작품 -잔디 -잔뜩 -잔치 -잘못 -잠깐 -잠수함 -잠시 -잠옷 -잠자리 -잡지 -장관 -장군 -장기간 -장래 -장례 -장르 -장마 -장면 -장모 -장미 -장비 -장사 -장소 -장식 -장애인 -장인 -장점 -장차 -장학금 -재능 -재빨리 -재산 -재생 -재작년 -재정 -재채기 -재판 -재학 -재활용 -저것 -저고리 -저곳 -저녁 -저런 -저렇게 -저번 -저울 -저절로 -저축 -적극 -적당히 -적성 -적용 -적응 -전개 -전공 -전기 -전달 -전라도 -전망 -전문 -전반 -전부 -전세 -전시 -전용 -전자 -전쟁 -전주 -전철 -전체 -전통 -전혀 -전후 -절대 -절망 -절반 -절약 -절차 -점검 -점수 -점심 -점원 -점점 -점차 -접근 -접시 -접촉 -젓가락 -정거장 -정도 -정류장 -정리 -정말 -정면 -정문 -정반대 -정보 -정부 -정비 -정상 -정성 -정오 -정원 -정장 -정지 -정치 -정확히 -제공 -제과점 -제대로 -제목 -제발 -제법 -제삿날 -제안 -제일 -제작 -제주도 -제출 -제품 -제한 -조각 -조건 -조금 -조깅 -조명 -조미료 -조상 -조선 -조용히 -조절 -조정 -조직 -존댓말 -존재 -졸업 -졸음 -종교 -종로 -종류 -종소리 -종업원 -종종 -종합 -좌석 -죄인 -주관적 -주름 -주말 -주머니 -주먹 -주문 -주민 -주방 -주변 -주식 -주인 -주일 -주장 -주전자 -주택 -준비 -줄거리 -줄기 -줄무늬 -중간 -중계방송 -중국 -중년 -중단 -중독 -중반 -중부 -중세 -중소기업 -중순 -중앙 -중요 -중학교 -즉석 -즉시 -즐거움 -증가 -증거 -증권 -증상 -증세 -지각 -지갑 -지경 -지극히 -지금 -지급 -지능 -지름길 -지리산 -지방 -지붕 -지식 -지역 -지우개 -지원 -지적 -지점 -지진 -지출 -직선 -직업 -직원 -직장 -진급 -진동 -진로 -진료 -진리 -진짜 -진찰 -진출 -진통 -진행 -질문 -질병 -질서 -짐작 -집단 -집안 -집중 -짜증 -찌꺼기 -차남 -차라리 -차량 -차림 -차별 -차선 -차츰 -착각 -찬물 -찬성 -참가 -참기름 -참새 -참석 -참여 -참외 -참조 -찻잔 -창가 -창고 -창구 -창문 -창밖 -창작 -창조 -채널 -채점 -책가방 -책방 -책상 -책임 -챔피언 -처벌 -처음 -천국 -천둥 -천장 -천재 -천천히 -철도 -철저히 -철학 -첫날 -첫째 -청년 -청바지 -청소 -청춘 -체계 -체력 -체온 -체육 -체중 -체험 -초등학생 -초반 -초밥 -초상화 -초순 -초여름 -초원 -초저녁 -초점 -초청 -초콜릿 -촛불 -총각 -총리 -총장 -촬영 -최근 -최상 -최선 -최신 -최악 -최종 -추석 -추억 -추진 -추천 -추측 -축구 -축소 -축제 -축하 -출근 -출발 -출산 -출신 -출연 -출입 -출장 -출판 -충격 -충고 -충돌 -충분히 -충청도 -취업 -취직 -취향 -치약 -친구 -친척 -칠십 -칠월 -칠판 -침대 -침묵 -침실 -칫솔 -칭찬 -카메라 -카운터 -칼국수 -캐릭터 -캠퍼스 -캠페인 -커튼 -컨디션 -컬러 -컴퓨터 -코끼리 -코미디 -콘서트 -콜라 -콤플렉스 -콩나물 -쾌감 -쿠데타 -크림 -큰길 -큰딸 -큰소리 -큰아들 -큰어머니 -큰일 -큰절 -클래식 -클럽 -킬로 -타입 -타자기 -탁구 -탁자 -탄생 -태권도 -태양 -태풍 -택시 -탤런트 -터널 -터미널 -테니스 -테스트 -테이블 -텔레비전 -토론 -토마토 -토요일 -통계 -통과 -통로 -통신 -통역 -통일 -통장 -통제 -통증 -통합 -통화 -퇴근 -퇴원 -퇴직금 -튀김 -트럭 -특급 -특별 -특성 -특수 -특징 -특히 -튼튼히 -티셔츠 -파란색 -파일 -파출소 -판결 -판단 -판매 -판사 -팔십 -팔월 -팝송 -패션 -팩스 -팩시밀리 -팬티 -퍼센트 -페인트 -편견 -편의 -편지 -편히 -평가 -평균 -평생 -평소 -평양 -평일 -평화 -포스터 -포인트 -포장 -포함 -표면 -표정 -표준 -표현 -품목 -품질 -풍경 -풍속 -풍습 -프랑스 -프린터 -플라스틱 -피곤 -피망 -피아노 -필름 -필수 -필요 -필자 -필통 -핑계 -하느님 -하늘 -하드웨어 -하룻밤 -하반기 -하숙집 -하순 -하여튼 -하지만 -하천 -하품 -하필 -학과 -학교 -학급 -학기 -학년 -학력 -학번 -학부모 -학비 -학생 -학술 -학습 -학용품 -학원 -학위 -학자 -학점 -한계 -한글 -한꺼번에 -한낮 -한눈 -한동안 -한때 -한라산 -한마디 -한문 -한번 -한복 -한식 -한여름 -한쪽 -할머니 -할아버지 -할인 -함께 -함부로 -합격 -합리적 -항공 -항구 -항상 -항의 -해결 -해군 -해답 -해당 -해물 -해석 -해설 -해수욕장 -해안 -핵심 -핸드백 -햄버거 -햇볕 -햇살 -행동 -행복 -행사 -행운 -행위 -향기 -향상 -향수 -허락 -허용 -헬기 -현관 -현금 -현대 -현상 -현실 -현장 -현재 -현지 -혈액 -협력 -형부 -형사 -형수 -형식 -형제 -형태 -형편 -혜택 -호기심 -호남 -호랑이 -호박 -호텔 -호흡 -혹시 -홀로 -홈페이지 -홍보 -홍수 -홍차 -화면 -화분 -화살 -화요일 -화장 -화학 -확보 -확인 -확장 -확정 -환갑 -환경 -환영 -환율 -환자 -활기 -활동 -활발히 -활용 -활짝 -회견 -회관 -회복 -회색 -회원 -회장 -회전 -횟수 -횡단보도 -효율적 -후반 -후춧가루 -훈련 -훨씬 -휴식 -휴일 -흉내 -흐름 -흑백 -흑인 -흔적 -흔히 -흥미 -흥분 -희곡 -희망 -희생 -흰색 -힘껏`.split('\n'); -//# sourceMappingURL=korean.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js.map deleted file mode 100644 index 082def04..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/korean.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"korean.js","sourceRoot":"","sources":["../../src/wordlists/korean.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ools/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js deleted file mode 100644 index bb5512d6..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `的 -一 -是 -在 -不 -了 -有 -和 -人 -这 -中 -大 -为 -上 -个 -国 -我 -以 -要 -他 -时 -来 -用 -们 -生 -到 -作 -地 -于 -出 -就 -分 -对 -成 -会 -可 -主 -发 -年 -动 -同 -工 -也 -能 -下 -过 -子 -说 -产 -种 -面 -而 -方 -后 -多 -定 -行 -学 -法 -所 -民 -得 -经 -十 -三 -之 -进 -着 -等 -部 -度 -家 -电 -力 -里 -如 -水 -化 -高 -自 -二 -理 -起 -小 -物 -现 -实 -加 -量 -都 -两 -体 -制 -机 -当 -使 -点 -从 -业 -本 -去 -把 -性 -好 -应 -开 -它 -合 -还 -因 -由 -其 -些 -然 -前 -外 -天 -政 -四 -日 -那 -社 -义 -事 -平 -形 -相 -全 -表 -间 -样 -与 -关 -各 -重 -新 -线 -内 -数 -正 -心 -反 -你 -明 -看 -原 -又 -么 -利 -比 -或 -但 -质 -气 -第 -向 -道 -命 -此 -变 -条 -只 -没 -结 -解 -问 -意 -建 -月 -公 -无 -系 -军 -很 -情 -者 -最 -立 -代 -想 -已 -通 -并 -提 -直 -题 -党 -程 -展 -五 -果 -料 -象 -员 -革 -位 -入 -常 -文 -总 -次 -品 -式 -活 -设 -及 -管 -特 -件 -长 -求 -老 -头 -基 -资 -边 -流 -路 -级 -少 -图 -山 -统 -接 -知 -较 -将 -组 -见 -计 -别 -她 -手 -角 -期 -根 -论 -运 -农 -指 -几 -九 -区 -强 -放 -决 -西 -被 -干 -做 -必 -战 -先 -回 -则 -任 -取 -据 -处 -队 -南 -给 -色 -光 -门 -即 -保 -治 -北 -造 -百 -规 -热 -领 -七 -海 -口 -东 -导 -器 -压 -志 -世 -金 -增 -争 -济 -阶 -油 -思 -术 -极 -交 -受 -联 -什 -认 -六 -共 -权 -收 -证 -改 -清 -美 -再 -采 -转 -更 -单 -风 -切 -打 -白 -教 -速 -花 -带 -安 -场 -身 -车 -例 -真 -务 -具 -万 -每 -目 -至 -达 -走 -积 -示 -议 -声 -报 -斗 -完 -类 -八 -离 -华 -名 -确 -才 -科 -张 -信 -马 -节 -话 -米 -整 -空 -元 -况 -今 -集 -温 -传 -土 -许 -步 -群 -广 -石 -记 -需 -段 -研 -界 -拉 -林 -律 -叫 -且 -究 -观 -越 -织 -装 -影 -算 -低 -持 -音 -众 -书 -布 -复 -容 -儿 -须 -际 -商 -非 -验 -连 -断 -深 -难 -近 -矿 -千 -周 -委 -素 -技 -备 -半 -办 -青 -省 -列 -习 -响 -约 -支 -般 -史 -感 -劳 -便 -团 -往 -酸 -历 -市 -克 -何 -除 -消 -构 -府 -称 -太 -准 -精 -值 -号 -率 -族 -维 -划 -选 -标 -写 -存 -候 -毛 -亲 -快 -效 -斯 -院 -查 -江 -型 -眼 -王 -按 -格 -养 -易 -置 -派 -层 -片 -始 -却 -专 -状 -育 -厂 -京 -识 -适 -属 -圆 -包 -火 -住 -调 -满 -县 -局 -照 -参 -红 -细 -引 -听 -该 -铁 -价 -严 -首 -底 -液 -官 -德 -随 -病 -苏 -失 -尔 -死 -讲 -配 -女 -黄 -推 -显 -谈 -罪 -神 -艺 -呢 -席 -含 -企 -望 -密 -批 -营 -项 -防 -举 -球 -英 -氧 -势 -告 -李 -台 -落 -木 -帮 -轮 -破 -亚 -师 -围 -注 -远 -字 -材 -排 -供 -河 -态 -封 -另 -施 -减 -树 -溶 -怎 -止 -案 -言 -士 -均 -武 -固 -叶 -鱼 -波 -视 -仅 -费 -紧 -爱 -左 -章 -早 -朝 -害 -续 -轻 -服 -试 -食 -充 -兵 -源 -判 -护 -司 -足 -某 -练 -差 -致 -板 -田 -降 -黑 -犯 -负 -击 -范 -继 -兴 -似 -余 -坚 -曲 -输 -修 -故 -城 -夫 -够 -送 -笔 -船 -占 -右 -财 -吃 -富 -春 -职 -觉 -汉 -画 -功 -巴 -跟 -虽 -杂 -飞 -检 -吸 -助 -升 -阳 -互 -初 -创 -抗 -考 -投 -坏 -策 -古 -径 -换 -未 -跑 -留 -钢 -曾 -端 -责 -站 -简 -述 -钱 -副 -尽 -帝 -射 -草 -冲 -承 -独 -令 -限 -阿 -宣 -环 -双 -请 -超 -微 -让 -控 -州 -良 -轴 -找 -否 -纪 -益 -依 -优 -顶 -础 -载 -倒 -房 -突 -坐 -粉 -敌 -略 -客 -袁 -冷 -胜 -绝 -析 -块 -剂 -测 -丝 -协 -诉 -念 -陈 -仍 -罗 -盐 -友 -洋 -错 -苦 -夜 -刑 -移 -频 -逐 -靠 -混 -母 -短 -皮 -终 -聚 -汽 -村 -云 -哪 -既 -距 -卫 -停 -烈 -央 -察 -烧 -迅 -境 -若 -印 -洲 -刻 -括 -激 -孔 -搞 -甚 -室 -待 -核 -校 -散 -侵 -吧 -甲 -游 -久 -菜 -味 -旧 -模 -湖 -货 -损 -预 -阻 -毫 -普 -稳 -乙 -妈 -植 -息 -扩 -银 -语 -挥 -酒 -守 -拿 -序 -纸 -医 -缺 -雨 -吗 -针 -刘 -啊 -急 -唱 -误 -训 -愿 -审 -附 -获 -茶 -鲜 -粮 -斤 -孩 -脱 -硫 -肥 -善 -龙 -演 -父 -渐 -血 -欢 -械 -掌 -歌 -沙 -刚 -攻 -谓 -盾 -讨 -晚 -粒 -乱 -燃 -矛 -乎 -杀 -药 -宁 -鲁 -贵 -钟 -煤 -读 -班 -伯 -香 -介 -迫 -句 -丰 -培 -握 -兰 -担 -弦 -蛋 -沉 -假 -穿 -执 -答 -乐 -谁 -顺 -烟 -缩 -征 -脸 -喜 -松 -脚 -困 -异 -免 -背 -星 -福 -买 -染 -井 -概 -慢 -怕 -磁 -倍 -祖 -皇 -促 -静 -补 -评 -翻 -肉 -践 -尼 -衣 -宽 -扬 -棉 -希 -伤 -操 -垂 -秋 -宜 -氢 -套 -督 -振 -架 -亮 -末 -宪 -庆 -编 -牛 -触 -映 -雷 -销 -诗 -座 -居 -抓 -裂 -胞 -呼 -娘 -景 -威 -绿 -晶 -厚 -盟 -衡 -鸡 -孙 -延 -危 -胶 -屋 -乡 -临 -陆 -顾 -掉 -呀 -灯 -岁 -措 -束 -耐 -剧 -玉 -赵 -跳 -哥 -季 -课 -凯 -胡 -额 -款 -绍 -卷 -齐 -伟 -蒸 -殖 -永 -宗 -苗 -川 -炉 -岩 -弱 -零 -杨 -奏 -沿 -露 -杆 -探 -滑 -镇 -饭 -浓 -航 -怀 -赶 -库 -夺 -伊 -灵 -税 -途 -灭 -赛 -归 -召 -鼓 -播 -盘 -裁 -险 -康 -唯 -录 -菌 -纯 -借 -糖 -盖 -横 -符 -私 -努 -堂 -域 -枪 -润 -幅 -哈 -竟 -熟 -虫 -泽 -脑 -壤 -碳 -欧 -遍 -侧 -寨 -敢 -彻 -虑 -斜 -薄 -庭 -纳 -弹 -饲 -伸 -折 -麦 -湿 -暗 -荷 -瓦 -塞 -床 -筑 -恶 -户 -访 -塔 -奇 -透 -梁 -刀 -旋 -迹 -卡 -氯 -遇 -份 -毒 -泥 -退 -洗 -摆 -灰 -彩 -卖 -耗 -夏 -择 -忙 -铜 -献 -硬 -予 -繁 -圈 -雪 -函 -亦 -抽 -篇 -阵 -阴 -丁 -尺 -追 -堆 -雄 -迎 -泛 -爸 -楼 -避 -谋 -吨 -野 -猪 -旗 -累 -偏 -典 -馆 -索 -秦 -脂 -潮 -爷 -豆 -忽 -托 -惊 -塑 -遗 -愈 -朱 -替 -纤 -粗 -倾 -尚 -痛 -楚 -谢 -奋 -购 -磨 -君 -池 -旁 -碎 -骨 -监 -捕 -弟 -暴 -割 -贯 -殊 -释 -词 -亡 -壁 -顿 -宝 -午 -尘 -闻 -揭 -炮 -残 -冬 -桥 -妇 -警 -综 -招 -吴 -付 -浮 -遭 -徐 -您 -摇 -谷 -赞 -箱 -隔 -订 -男 -吹 -园 -纷 -唐 -败 -宋 -玻 -巨 -耕 -坦 -荣 -闭 -湾 -键 -凡 -驻 -锅 -救 -恩 -剥 -凝 -碱 -齿 -截 -炼 -麻 -纺 -禁 -废 -盛 -版 -缓 -净 -睛 -昌 -婚 -涉 -筒 -嘴 -插 -岸 -朗 -庄 -街 -藏 -姑 -贸 -腐 -奴 -啦 -惯 -乘 -伙 -恢 -匀 -纱 -扎 -辩 -耳 -彪 -臣 -亿 -璃 -抵 -脉 -秀 -萨 -俄 -网 -舞 -店 -喷 -纵 -寸 -汗 -挂 -洪 -贺 -闪 -柬 -爆 -烯 -津 -稻 -墙 -软 -勇 -像 -滚 -厘 -蒙 -芳 -肯 -坡 -柱 -荡 -腿 -仪 -旅 -尾 -轧 -冰 -贡 -登 -黎 -削 -钻 -勒 -逃 -障 -氨 -郭 -峰 -币 -港 -伏 -轨 -亩 -毕 -擦 -莫 -刺 -浪 -秘 -援 -株 -健 -售 -股 -岛 -甘 -泡 -睡 -童 -铸 -汤 -阀 -休 -汇 -舍 -牧 -绕 -炸 -哲 -磷 -绩 -朋 -淡 -尖 -启 -陷 -柴 -呈 -徒 -颜 -泪 -稍 -忘 -泵 -蓝 -拖 -洞 -授 -镜 -辛 -壮 -锋 -贫 -虚 -弯 -摩 -泰 -幼 -廷 -尊 -窗 -纲 -弄 -隶 -疑 -氏 -宫 -姐 -震 -瑞 -怪 -尤 -琴 -循 -描 -膜 -违 -夹 -腰 -缘 -珠 -穷 -森 -枝 -竹 -沟 -催 -绳 -忆 -邦 -剩 -幸 -浆 -栏 -拥 -牙 -贮 -礼 -滤 -钠 -纹 -罢 -拍 -咱 -喊 -袖 -埃 -勤 -罚 -焦 -潜 -伍 -墨 -欲 -缝 -姓 -刊 -饱 -仿 -奖 -铝 -鬼 -丽 -跨 -默 -挖 -链 -扫 -喝 -袋 -炭 -污 -幕 -诸 -弧 -励 -梅 -奶 -洁 -灾 -舟 -鉴 -苯 -讼 -抱 -毁 -懂 -寒 -智 -埔 -寄 -届 -跃 -渡 -挑 -丹 -艰 -贝 -碰 -拔 -爹 -戴 -码 -梦 -芽 -熔 -赤 -渔 -哭 -敬 -颗 -奔 -铅 -仲 -虎 -稀 -妹 -乏 -珍 -申 -桌 -遵 -允 -隆 -螺 -仓 -魏 -锐 -晓 -氮 -兼 -隐 -碍 -赫 -拨 -忠 -肃 -缸 -牵 -抢 -博 -巧 -壳 -兄 -杜 -讯 -诚 -碧 -祥 -柯 -页 -巡 -矩 -悲 -灌 -龄 -伦 -票 -寻 -桂 -铺 -圣 -恐 -恰 -郑 -趣 -抬 -荒 -腾 -贴 -柔 -滴 -猛 -阔 -辆 -妻 -填 -撤 -储 -签 -闹 -扰 -紫 -砂 -递 -戏 -吊 -陶 -伐 -喂 -疗 -瓶 -婆 -抚 -臂 -摸 -忍 -虾 -蜡 -邻 -胸 -巩 -挤 -偶 -弃 -槽 -劲 -乳 -邓 -吉 -仁 -烂 -砖 -租 -乌 -舰 -伴 -瓜 -浅 -丙 -暂 -燥 -橡 -柳 -迷 -暖 -牌 -秧 -胆 -详 -簧 -踏 -瓷 -谱 -呆 -宾 -糊 -洛 -辉 -愤 -竞 -隙 -怒 -粘 -乃 -绪 -肩 -籍 -敏 -涂 -熙 -皆 -侦 -悬 -掘 -享 -纠 -醒 -狂 -锁 -淀 -恨 -牲 -霸 -爬 -赏 -逆 -玩 -陵 -祝 -秒 -浙 -貌 -役 -彼 -悉 -鸭 -趋 -凤 -晨 -畜 -辈 -秩 -卵 -署 -梯 -炎 -滩 -棋 -驱 -筛 -峡 -冒 -啥 -寿 -译 -浸 -泉 -帽 -迟 -硅 -疆 -贷 -漏 -稿 -冠 -嫩 -胁 -芯 -牢 -叛 -蚀 -奥 -鸣 -岭 -羊 -凭 -串 -塘 -绘 -酵 -融 -盆 -锡 -庙 -筹 -冻 -辅 -摄 -袭 -筋 -拒 -僚 -旱 -钾 -鸟 -漆 -沈 -眉 -疏 -添 -棒 -穗 -硝 -韩 -逼 -扭 -侨 -凉 -挺 -碗 -栽 -炒 -杯 -患 -馏 -劝 -豪 -辽 -勃 -鸿 -旦 -吏 -拜 -狗 -埋 -辊 -掩 -饮 -搬 -骂 -辞 -勾 -扣 -估 -蒋 -绒 -雾 -丈 -朵 -姆 -拟 -宇 -辑 -陕 -雕 -偿 -蓄 -崇 -剪 -倡 -厅 -咬 -驶 -薯 -刷 -斥 -番 -赋 -奉 -佛 -浇 -漫 -曼 -扇 -钙 -桃 -扶 -仔 -返 -俗 -亏 -腔 -鞋 -棱 -覆 -框 -悄 -叔 -撞 -骗 -勘 -旺 -沸 -孤 -吐 -孟 -渠 -屈 -疾 -妙 -惜 -仰 -狠 -胀 -谐 -抛 -霉 -桑 -岗 -嘛 -衰 -盗 -渗 -脏 -赖 -涌 -甜 -曹 -阅 -肌 -哩 -厉 -烃 -纬 -毅 -昨 -伪 -症 -煮 -叹 -钉 -搭 -茎 -笼 -酷 -偷 -弓 -锥 -恒 -杰 -坑 -鼻 -翼 -纶 -叙 -狱 -逮 -罐 -络 -棚 -抑 -膨 -蔬 -寺 -骤 -穆 -冶 -枯 -册 -尸 -凸 -绅 -坯 -牺 -焰 -轰 -欣 -晋 -瘦 -御 -锭 -锦 -丧 -旬 -锻 -垄 -搜 -扑 -邀 -亭 -酯 -迈 -舒 -脆 -酶 -闲 -忧 -酚 -顽 -羽 -涨 -卸 -仗 -陪 -辟 -惩 -杭 -姚 -肚 -捉 -飘 -漂 -昆 -欺 -吾 -郎 -烷 -汁 -呵 -饰 -萧 -雅 -邮 -迁 -燕 -撒 -姻 -赴 -宴 -烦 -债 -帐 -斑 -铃 -旨 -醇 -董 -饼 -雏 -姿 -拌 -傅 -腹 -妥 -揉 -贤 -拆 -歪 -葡 -胺 -丢 -浩 -徽 -昂 -垫 -挡 -览 -贪 -慰 -缴 -汪 -慌 -冯 -诺 -姜 -谊 -凶 -劣 -诬 -耀 -昏 -躺 -盈 -骑 -乔 -溪 -丛 -卢 -抹 -闷 -咨 -刮 -驾 -缆 -悟 -摘 -铒 -掷 -颇 -幻 -柄 -惠 -惨 -佳 -仇 -腊 -窝 -涤 -剑 -瞧 -堡 -泼 -葱 -罩 -霍 -捞 -胎 -苍 -滨 -俩 -捅 -湘 -砍 -霞 -邵 -萄 -疯 -淮 -遂 -熊 -粪 -烘 -宿 -档 -戈 -驳 -嫂 -裕 -徙 -箭 -捐 -肠 -撑 -晒 -辨 -殿 -莲 -摊 -搅 -酱 -屏 -疫 -哀 -蔡 -堵 -沫 -皱 -畅 -叠 -阁 -莱 -敲 -辖 -钩 -痕 -坝 -巷 -饿 -祸 -丘 -玄 -溜 -曰 -逻 -彭 -尝 -卿 -妨 -艇 -吞 -韦 -怨 -矮 -歇`.split('\n'); -//# sourceMappingURL=simplified-chinese.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js.map deleted file mode 100644 index 99ab9caf..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/simplified-chinese.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"simplified-chinese.js","sourceRoot":"","sources":["../../src/wordlists/simplified-chinese.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+/DhC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js deleted file mode 100644 index afd6c53e..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `ábaco -abdomen -abeja -abierto -abogado -abono -aborto -abrazo -abrir -abuelo -abuso -acabar -academia -acceso -acción -aceite -acelga -acento -aceptar -ácido -aclarar -acné -acoger -acoso -activo -acto -actriz -actuar -acudir -acuerdo -acusar -adicto -admitir -adoptar -adorno -aduana -adulto -aéreo -afectar -afición -afinar -afirmar -ágil -agitar -agonía -agosto -agotar -agregar -agrio -agua -agudo -águila -aguja -ahogo -ahorro -aire -aislar -ajedrez -ajeno -ajuste -alacrán -alambre -alarma -alba -álbum -alcalde -aldea -alegre -alejar -alerta -aleta -alfiler -alga -algodón -aliado -aliento -alivio -alma -almeja -almíbar -altar -alteza -altivo -alto -altura -alumno -alzar -amable -amante -amapola -amargo -amasar -ámbar -ámbito -ameno -amigo -amistad -amor -amparo -amplio -ancho -anciano -ancla -andar -andén -anemia -ángulo -anillo -ánimo -anís -anotar -antena -antiguo -antojo -anual -anular -anuncio -añadir -añejo -año -apagar -aparato -apetito -apio -aplicar -apodo -aporte -apoyo -aprender -aprobar -apuesta -apuro -arado -araña -arar -árbitro -árbol -arbusto -archivo -arco -arder -ardilla -arduo -área -árido -aries -armonía -arnés -aroma -arpa -arpón -arreglo -arroz -arruga -arte -artista -asa -asado -asalto -ascenso -asegurar -aseo -asesor -asiento -asilo -asistir -asno -asombro -áspero -astilla -astro -astuto -asumir -asunto -atajo -ataque -atar -atento -ateo -ático -atleta -átomo -atraer -atroz -atún -audaz -audio -auge -aula -aumento -ausente -autor -aval -avance -avaro -ave -avellana -avena -avestruz -avión -aviso -ayer -ayuda -ayuno -azafrán -azar -azote -azúcar -azufre -azul -baba -babor -bache -bahía -baile -bajar -balanza -balcón -balde -bambú -banco -banda -baño -barba -barco -barniz -barro -báscula -bastón -basura -batalla -batería -batir -batuta -baúl -bazar -bebé -bebida -bello -besar -beso -bestia -bicho -bien -bingo -blanco -bloque -blusa -boa -bobina -bobo -boca -bocina -boda -bodega -boina -bola -bolero -bolsa -bomba -bondad -bonito -bono -bonsái -borde -borrar -bosque -bote -botín -bóveda -bozal -bravo -brazo -brecha -breve -brillo -brinco -brisa -broca -broma -bronce -brote -bruja -brusco -bruto -buceo -bucle -bueno -buey -bufanda -bufón -búho -buitre -bulto -burbuja -burla -burro -buscar -butaca -buzón -caballo -cabeza -cabina -cabra -cacao -cadáver -cadena -caer -café -caída -caimán -caja -cajón -cal -calamar -calcio -caldo -calidad -calle -calma -calor -calvo -cama -cambio -camello -camino -campo -cáncer -candil -canela -canguro -canica -canto -caña -cañón -caoba -caos -capaz -capitán -capote -captar -capucha -cara -carbón -cárcel -careta -carga -cariño -carne -carpeta -carro -carta -casa -casco -casero -caspa -castor -catorce -catre -caudal -causa -cazo -cebolla -ceder -cedro -celda -célebre -celoso -célula -cemento -ceniza -centro -cerca -cerdo -cereza -cero -cerrar -certeza -césped -cetro -chacal -chaleco -champú -chancla -chapa -charla -chico -chiste -chivo -choque -choza -chuleta -chupar -ciclón -ciego -cielo -cien -cierto -cifra -cigarro -cima -cinco -cine -cinta -ciprés -circo -ciruela -cisne -cita -ciudad -clamor -clan -claro -clase -clave -cliente -clima -clínica -cobre -cocción -cochino -cocina -coco -código -codo -cofre -coger -cohete -cojín -cojo -cola -colcha -colegio -colgar -colina -collar -colmo -columna -combate -comer -comida -cómodo -compra -conde -conejo -conga -conocer -consejo -contar -copa -copia -corazón -corbata -corcho -cordón -corona -correr -coser -cosmos -costa -cráneo -cráter -crear -crecer -creído -crema -cría -crimen -cripta -crisis -cromo -crónica -croqueta -crudo -cruz -cuadro -cuarto -cuatro -cubo -cubrir -cuchara -cuello -cuento -cuerda -cuesta -cueva -cuidar -culebra -culpa -culto -cumbre -cumplir -cuna -cuneta -cuota -cupón -cúpula -curar -curioso -curso -curva -cutis -dama -danza -dar -dardo -dátil -deber -débil -década -decir -dedo -defensa -definir -dejar -delfín -delgado -delito -demora -denso -dental -deporte -derecho -derrota -desayuno -deseo -desfile -desnudo -destino -desvío -detalle -detener -deuda -día -diablo -diadema -diamante -diana -diario -dibujo -dictar -diente -dieta -diez -difícil -digno -dilema -diluir -dinero -directo -dirigir -disco -diseño -disfraz -diva -divino -doble -doce -dolor -domingo -don -donar -dorado -dormir -dorso -dos -dosis -dragón -droga -ducha -duda -duelo -dueño -dulce -dúo -duque -durar -dureza -duro -ébano -ebrio -echar -eco -ecuador -edad -edición -edificio -editor -educar -efecto -eficaz -eje -ejemplo -elefante -elegir -elemento -elevar -elipse -élite -elixir -elogio -eludir -embudo -emitir -emoción -empate -empeño -empleo -empresa -enano -encargo -enchufe -encía -enemigo -enero -enfado -enfermo -engaño -enigma -enlace -enorme -enredo -ensayo -enseñar -entero -entrar -envase -envío -época -equipo -erizo -escala -escena -escolar -escribir -escudo -esencia -esfera -esfuerzo -espada -espejo -espía -esposa -espuma -esquí -estar -este -estilo -estufa -etapa -eterno -ética -etnia -evadir -evaluar -evento -evitar -exacto -examen -exceso -excusa -exento -exigir -exilio -existir -éxito -experto -explicar -exponer -extremo -fábrica -fábula -fachada -fácil -factor -faena -faja -falda -fallo -falso -faltar -fama -familia -famoso -faraón -farmacia -farol -farsa -fase -fatiga -fauna -favor -fax -febrero -fecha -feliz -feo -feria -feroz -fértil -fervor -festín -fiable -fianza -fiar -fibra -ficción -ficha -fideo -fiebre -fiel -fiera -fiesta -figura -fijar -fijo -fila -filete -filial -filtro -fin -finca -fingir -finito -firma -flaco -flauta -flecha -flor -flota -fluir -flujo -flúor -fobia -foca -fogata -fogón -folio -folleto -fondo -forma -forro -fortuna -forzar -fosa -foto -fracaso -frágil -franja -frase -fraude -freír -freno -fresa -frío -frito -fruta -fuego -fuente -fuerza -fuga -fumar -función -funda -furgón -furia -fusil -fútbol -futuro -gacela -gafas -gaita -gajo -gala -galería -gallo -gamba -ganar -gancho -ganga -ganso -garaje -garza -gasolina -gastar -gato -gavilán -gemelo -gemir -gen -género -genio -gente -geranio -gerente -germen -gesto -gigante -gimnasio -girar -giro -glaciar -globo -gloria -gol -golfo -goloso -golpe -goma -gordo -gorila -gorra -gota -goteo -gozar -grada -gráfico -grano -grasa -gratis -grave -grieta -grillo -gripe -gris -grito -grosor -grúa -grueso -grumo -grupo -guante -guapo -guardia -guerra -guía -guiño -guion -guiso -guitarra -gusano -gustar -haber -hábil -hablar -hacer -hacha -hada -hallar -hamaca -harina -haz -hazaña -hebilla -hebra -hecho -helado -helio -hembra -herir -hermano -héroe -hervir -hielo -hierro -hígado -higiene -hijo -himno -historia -hocico -hogar -hoguera -hoja -hombre -hongo -honor -honra -hora -hormiga -horno -hostil -hoyo -hueco -huelga -huerta -hueso -huevo -huida -huir -humano -húmedo -humilde -humo -hundir -huracán -hurto -icono -ideal -idioma -ídolo -iglesia -iglú -igual -ilegal -ilusión -imagen -imán -imitar -impar -imperio -imponer -impulso -incapaz -índice -inerte -infiel -informe -ingenio -inicio -inmenso -inmune -innato -insecto -instante -interés -íntimo -intuir -inútil -invierno -ira -iris -ironía -isla -islote -jabalí -jabón -jamón -jarabe -jardín -jarra -jaula -jazmín -jefe -jeringa -jinete -jornada -joroba -joven -joya -juerga -jueves -juez -jugador -jugo -juguete -juicio -junco -jungla -junio -juntar -júpiter -jurar -justo -juvenil -juzgar -kilo -koala -labio -lacio -lacra -lado -ladrón -lagarto -lágrima -laguna -laico -lamer -lámina -lámpara -lana -lancha -langosta -lanza -lápiz -largo -larva -lástima -lata -látex -latir -laurel -lavar -lazo -leal -lección -leche -lector -leer -legión -legumbre -lejano -lengua -lento -leña -león -leopardo -lesión -letal -letra -leve -leyenda -libertad -libro -licor -líder -lidiar -lienzo -liga -ligero -lima -límite -limón -limpio -lince -lindo -línea -lingote -lino -linterna -líquido -liso -lista -litera -litio -litro -llaga -llama -llanto -llave -llegar -llenar -llevar -llorar -llover -lluvia -lobo -loción -loco -locura -lógica -logro -lombriz -lomo -lonja -lote -lucha -lucir -lugar -lujo -luna -lunes -lupa -lustro -luto -luz -maceta -macho -madera -madre -maduro -maestro -mafia -magia -mago -maíz -maldad -maleta -malla -malo -mamá -mambo -mamut -manco -mando -manejar -manga -maniquí -manjar -mano -manso -manta -mañana -mapa -máquina -mar -marco -marea -marfil -margen -marido -mármol -marrón -martes -marzo -masa -máscara -masivo -matar -materia -matiz -matriz -máximo -mayor -mazorca -mecha -medalla -medio -médula -mejilla -mejor -melena -melón -memoria -menor -mensaje -mente -menú -mercado -merengue -mérito -mes -mesón -meta -meter -método -metro -mezcla -miedo -miel -miembro -miga -mil -milagro -militar -millón -mimo -mina -minero -mínimo -minuto -miope -mirar -misa -miseria -misil -mismo -mitad -mito -mochila -moción -moda -modelo -moho -mojar -molde -moler -molino -momento -momia -monarca -moneda -monja -monto -moño -morada -morder -moreno -morir -morro -morsa -mortal -mosca -mostrar -motivo -mover -móvil -mozo -mucho -mudar -mueble -muela -muerte -muestra -mugre -mujer -mula -muleta -multa -mundo -muñeca -mural -muro -músculo -museo -musgo -música -muslo -nácar -nación -nadar -naipe -naranja -nariz -narrar -nasal -natal -nativo -natural -náusea -naval -nave -navidad -necio -néctar -negar -negocio -negro -neón -nervio -neto -neutro -nevar -nevera -nicho -nido -niebla -nieto -niñez -niño -nítido -nivel -nobleza -noche -nómina -noria -norma -norte -nota -noticia -novato -novela -novio -nube -nuca -núcleo -nudillo -nudo -nuera -nueve -nuez -nulo -número -nutria -oasis -obeso -obispo -objeto -obra -obrero -observar -obtener -obvio -oca -ocaso -océano -ochenta -ocho -ocio -ocre -octavo -octubre -oculto -ocupar -ocurrir -odiar -odio -odisea -oeste -ofensa -oferta -oficio -ofrecer -ogro -oído -oír -ojo -ola -oleada -olfato -olivo -olla -olmo -olor -olvido -ombligo -onda -onza -opaco -opción -ópera -opinar -oponer -optar -óptica -opuesto -oración -orador -oral -órbita -orca -orden -oreja -órgano -orgía -orgullo -oriente -origen -orilla -oro -orquesta -oruga -osadía -oscuro -osezno -oso -ostra -otoño -otro -oveja -óvulo -óxido -oxígeno -oyente -ozono -pacto -padre -paella -página -pago -país -pájaro -palabra -palco -paleta -pálido -palma -paloma -palpar -pan -panal -pánico -pantera -pañuelo -papá -papel -papilla -paquete -parar -parcela -pared -parir -paro -párpado -parque -párrafo -parte -pasar -paseo -pasión -paso -pasta -pata -patio -patria -pausa -pauta -pavo -payaso -peatón -pecado -pecera -pecho -pedal -pedir -pegar -peine -pelar -peldaño -pelea -peligro -pellejo -pelo -peluca -pena -pensar -peñón -peón -peor -pepino -pequeño -pera -percha -perder -pereza -perfil -perico -perla -permiso -perro -persona -pesa -pesca -pésimo -pestaña -pétalo -petróleo -pez -pezuña -picar -pichón -pie -piedra -pierna -pieza -pijama -pilar -piloto -pimienta -pino -pintor -pinza -piña -piojo -pipa -pirata -pisar -piscina -piso -pista -pitón -pizca -placa -plan -plata -playa -plaza -pleito -pleno -plomo -pluma -plural -pobre -poco -poder -podio -poema -poesía -poeta -polen -policía -pollo -polvo -pomada -pomelo -pomo -pompa -poner -porción -portal -posada -poseer -posible -poste -potencia -potro -pozo -prado -precoz -pregunta -premio -prensa -preso -previo -primo -príncipe -prisión -privar -proa -probar -proceso -producto -proeza -profesor -programa -prole -promesa -pronto -propio -próximo -prueba -público -puchero -pudor -pueblo -puerta -puesto -pulga -pulir -pulmón -pulpo -pulso -puma -punto -puñal -puño -pupa -pupila -puré -quedar -queja -quemar -querer -queso -quieto -química -quince -quitar -rábano -rabia -rabo -ración -radical -raíz -rama -rampa -rancho -rango -rapaz -rápido -rapto -rasgo -raspa -rato -rayo -raza -razón -reacción -realidad -rebaño -rebote -recaer -receta -rechazo -recoger -recreo -recto -recurso -red -redondo -reducir -reflejo -reforma -refrán -refugio -regalo -regir -regla -regreso -rehén -reino -reír -reja -relato -relevo -relieve -relleno -reloj -remar -remedio -remo -rencor -rendir -renta -reparto -repetir -reposo -reptil -res -rescate -resina -respeto -resto -resumen -retiro -retorno -retrato -reunir -revés -revista -rey -rezar -rico -riego -rienda -riesgo -rifa -rígido -rigor -rincón -riñón -río -riqueza -risa -ritmo -rito -rizo -roble -roce -rociar -rodar -rodeo -rodilla -roer -rojizo -rojo -romero -romper -ron -ronco -ronda -ropa -ropero -rosa -rosca -rostro -rotar -rubí -rubor -rudo -rueda -rugir -ruido -ruina -ruleta -rulo -rumbo -rumor -ruptura -ruta -rutina -sábado -saber -sabio -sable -sacar -sagaz -sagrado -sala -saldo -salero -salir -salmón -salón -salsa -salto -salud -salvar -samba -sanción -sandía -sanear -sangre -sanidad -sano -santo -sapo -saque -sardina -sartén -sastre -satán -sauna -saxofón -sección -seco -secreto -secta -sed -seguir -seis -sello -selva -semana -semilla -senda -sensor -señal -señor -separar -sepia -sequía -ser -serie -sermón -servir -sesenta -sesión -seta -setenta -severo -sexo -sexto -sidra -siesta -siete -siglo -signo -sílaba -silbar -silencio -silla -símbolo -simio -sirena -sistema -sitio -situar -sobre -socio -sodio -sol -solapa -soldado -soledad -sólido -soltar -solución -sombra -sondeo -sonido -sonoro -sonrisa -sopa -soplar -soporte -sordo -sorpresa -sorteo -sostén -sótano -suave -subir -suceso -sudor -suegra -suelo -sueño -suerte -sufrir -sujeto -sultán -sumar -superar -suplir -suponer -supremo -sur -surco -sureño -surgir -susto -sutil -tabaco -tabique -tabla -tabú -taco -tacto -tajo -talar -talco -talento -talla -talón -tamaño -tambor -tango -tanque -tapa -tapete -tapia -tapón -taquilla -tarde -tarea -tarifa -tarjeta -tarot -tarro -tarta -tatuaje -tauro -taza -tazón -teatro -techo -tecla -técnica -tejado -tejer -tejido -tela -teléfono -tema -temor -templo -tenaz -tender -tener -tenis -tenso -teoría -terapia -terco -término -ternura -terror -tesis -tesoro -testigo -tetera -texto -tez -tibio -tiburón -tiempo -tienda -tierra -tieso -tigre -tijera -tilde -timbre -tímido -timo -tinta -tío -típico -tipo -tira -tirón -titán -títere -título -tiza -toalla -tobillo -tocar -tocino -todo -toga -toldo -tomar -tono -tonto -topar -tope -toque -tórax -torero -tormenta -torneo -toro -torpedo -torre -torso -tortuga -tos -tosco -toser -tóxico -trabajo -tractor -traer -tráfico -trago -traje -tramo -trance -trato -trauma -trazar -trébol -tregua -treinta -tren -trepar -tres -tribu -trigo -tripa -triste -triunfo -trofeo -trompa -tronco -tropa -trote -trozo -truco -trueno -trufa -tubería -tubo -tuerto -tumba -tumor -túnel -túnica -turbina -turismo -turno -tutor -ubicar -úlcera -umbral -unidad -unir -universo -uno -untar -uña -urbano -urbe -urgente -urna -usar -usuario -útil -utopía -uva -vaca -vacío -vacuna -vagar -vago -vaina -vajilla -vale -válido -valle -valor -válvula -vampiro -vara -variar -varón -vaso -vecino -vector -vehículo -veinte -vejez -vela -velero -veloz -vena -vencer -venda -veneno -vengar -venir -venta -venus -ver -verano -verbo -verde -vereda -verja -verso -verter -vía -viaje -vibrar -vicio -víctima -vida -vídeo -vidrio -viejo -viernes -vigor -vil -villa -vinagre -vino -viñedo -violín -viral -virgo -virtud -visor -víspera -vista -vitamina -viudo -vivaz -vivero -vivir -vivo -volcán -volumen -volver -voraz -votar -voto -voz -vuelo -vulgar -yacer -yate -yegua -yema -yerno -yeso -yodo -yoga -yogur -zafiro -zanja -zapato -zarza -zona -zorro -zumo -zurdo`.split('\n'); -//# sourceMappingURL=spanish.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js.map deleted file mode 100644 index 46c57044..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/spanish.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"spanish.js","sourceRoot":"","sources":["../../src/wordlists/spanish.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+/D5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js deleted file mode 100644 index 82ca23c6..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js +++ /dev/null @@ -1,2049 +0,0 @@ -export const wordlist = `的 -一 -是 -在 -不 -了 -有 -和 -人 -這 -中 -大 -為 -上 -個 -國 -我 -以 -要 -他 -時 -來 -用 -們 -生 -到 -作 -地 -於 -出 -就 -分 -對 -成 -會 -可 -主 -發 -年 -動 -同 -工 -也 -能 -下 -過 -子 -說 -產 -種 -面 -而 -方 -後 -多 -定 -行 -學 -法 -所 -民 -得 -經 -十 -三 -之 -進 -著 -等 -部 -度 -家 -電 -力 -裡 -如 -水 -化 -高 -自 -二 -理 -起 -小 -物 -現 -實 -加 -量 -都 -兩 -體 -制 -機 -當 -使 -點 -從 -業 -本 -去 -把 -性 -好 -應 -開 -它 -合 -還 -因 -由 -其 -些 -然 -前 -外 -天 -政 -四 -日 -那 -社 -義 -事 -平 -形 -相 -全 -表 -間 -樣 -與 -關 -各 -重 -新 -線 -內 -數 -正 -心 -反 -你 -明 -看 -原 -又 -麼 -利 -比 -或 -但 -質 -氣 -第 -向 -道 -命 -此 -變 -條 -只 -沒 -結 -解 -問 -意 -建 -月 -公 -無 -系 -軍 -很 -情 -者 -最 -立 -代 -想 -已 -通 -並 -提 -直 -題 -黨 -程 -展 -五 -果 -料 -象 -員 -革 -位 -入 -常 -文 -總 -次 -品 -式 -活 -設 -及 -管 -特 -件 -長 -求 -老 -頭 -基 -資 -邊 -流 -路 -級 -少 -圖 -山 -統 -接 -知 -較 -將 -組 -見 -計 -別 -她 -手 -角 -期 -根 -論 -運 -農 -指 -幾 -九 -區 -強 -放 -決 -西 -被 -幹 -做 -必 -戰 -先 -回 -則 -任 -取 -據 -處 -隊 -南 -給 -色 -光 -門 -即 -保 -治 -北 -造 -百 -規 -熱 -領 -七 -海 -口 -東 -導 -器 -壓 -志 -世 -金 -增 -爭 -濟 -階 -油 -思 -術 -極 -交 -受 -聯 -什 -認 -六 -共 -權 -收 -證 -改 -清 -美 -再 -採 -轉 -更 -單 -風 -切 -打 -白 -教 -速 -花 -帶 -安 -場 -身 -車 -例 -真 -務 -具 -萬 -每 -目 -至 -達 -走 -積 -示 -議 -聲 -報 -鬥 -完 -類 -八 -離 -華 -名 -確 -才 -科 -張 -信 -馬 -節 -話 -米 -整 -空 -元 -況 -今 -集 -溫 -傳 -土 -許 -步 -群 -廣 -石 -記 -需 -段 -研 -界 -拉 -林 -律 -叫 -且 -究 -觀 -越 -織 -裝 -影 -算 -低 -持 -音 -眾 -書 -布 -复 -容 -兒 -須 -際 -商 -非 -驗 -連 -斷 -深 -難 -近 -礦 -千 -週 -委 -素 -技 -備 -半 -辦 -青 -省 -列 -習 -響 -約 -支 -般 -史 -感 -勞 -便 -團 -往 -酸 -歷 -市 -克 -何 -除 -消 -構 -府 -稱 -太 -準 -精 -值 -號 -率 -族 -維 -劃 -選 -標 -寫 -存 -候 -毛 -親 -快 -效 -斯 -院 -查 -江 -型 -眼 -王 -按 -格 -養 -易 -置 -派 -層 -片 -始 -卻 -專 -狀 -育 -廠 -京 -識 -適 -屬 -圓 -包 -火 -住 -調 -滿 -縣 -局 -照 -參 -紅 -細 -引 -聽 -該 -鐵 -價 -嚴 -首 -底 -液 -官 -德 -隨 -病 -蘇 -失 -爾 -死 -講 -配 -女 -黃 -推 -顯 -談 -罪 -神 -藝 -呢 -席 -含 -企 -望 -密 -批 -營 -項 -防 -舉 -球 -英 -氧 -勢 -告 -李 -台 -落 -木 -幫 -輪 -破 -亞 -師 -圍 -注 -遠 -字 -材 -排 -供 -河 -態 -封 -另 -施 -減 -樹 -溶 -怎 -止 -案 -言 -士 -均 -武 -固 -葉 -魚 -波 -視 -僅 -費 -緊 -愛 -左 -章 -早 -朝 -害 -續 -輕 -服 -試 -食 -充 -兵 -源 -判 -護 -司 -足 -某 -練 -差 -致 -板 -田 -降 -黑 -犯 -負 -擊 -范 -繼 -興 -似 -餘 -堅 -曲 -輸 -修 -故 -城 -夫 -夠 -送 -筆 -船 -佔 -右 -財 -吃 -富 -春 -職 -覺 -漢 -畫 -功 -巴 -跟 -雖 -雜 -飛 -檢 -吸 -助 -昇 -陽 -互 -初 -創 -抗 -考 -投 -壞 -策 -古 -徑 -換 -未 -跑 -留 -鋼 -曾 -端 -責 -站 -簡 -述 -錢 -副 -盡 -帝 -射 -草 -衝 -承 -獨 -令 -限 -阿 -宣 -環 -雙 -請 -超 -微 -讓 -控 -州 -良 -軸 -找 -否 -紀 -益 -依 -優 -頂 -礎 -載 -倒 -房 -突 -坐 -粉 -敵 -略 -客 -袁 -冷 -勝 -絕 -析 -塊 -劑 -測 -絲 -協 -訴 -念 -陳 -仍 -羅 -鹽 -友 -洋 -錯 -苦 -夜 -刑 -移 -頻 -逐 -靠 -混 -母 -短 -皮 -終 -聚 -汽 -村 -雲 -哪 -既 -距 -衛 -停 -烈 -央 -察 -燒 -迅 -境 -若 -印 -洲 -刻 -括 -激 -孔 -搞 -甚 -室 -待 -核 -校 -散 -侵 -吧 -甲 -遊 -久 -菜 -味 -舊 -模 -湖 -貨 -損 -預 -阻 -毫 -普 -穩 -乙 -媽 -植 -息 -擴 -銀 -語 -揮 -酒 -守 -拿 -序 -紙 -醫 -缺 -雨 -嗎 -針 -劉 -啊 -急 -唱 -誤 -訓 -願 -審 -附 -獲 -茶 -鮮 -糧 -斤 -孩 -脫 -硫 -肥 -善 -龍 -演 -父 -漸 -血 -歡 -械 -掌 -歌 -沙 -剛 -攻 -謂 -盾 -討 -晚 -粒 -亂 -燃 -矛 -乎 -殺 -藥 -寧 -魯 -貴 -鐘 -煤 -讀 -班 -伯 -香 -介 -迫 -句 -豐 -培 -握 -蘭 -擔 -弦 -蛋 -沉 -假 -穿 -執 -答 -樂 -誰 -順 -煙 -縮 -徵 -臉 -喜 -松 -腳 -困 -異 -免 -背 -星 -福 -買 -染 -井 -概 -慢 -怕 -磁 -倍 -祖 -皇 -促 -靜 -補 -評 -翻 -肉 -踐 -尼 -衣 -寬 -揚 -棉 -希 -傷 -操 -垂 -秋 -宜 -氫 -套 -督 -振 -架 -亮 -末 -憲 -慶 -編 -牛 -觸 -映 -雷 -銷 -詩 -座 -居 -抓 -裂 -胞 -呼 -娘 -景 -威 -綠 -晶 -厚 -盟 -衡 -雞 -孫 -延 -危 -膠 -屋 -鄉 -臨 -陸 -顧 -掉 -呀 -燈 -歲 -措 -束 -耐 -劇 -玉 -趙 -跳 -哥 -季 -課 -凱 -胡 -額 -款 -紹 -卷 -齊 -偉 -蒸 -殖 -永 -宗 -苗 -川 -爐 -岩 -弱 -零 -楊 -奏 -沿 -露 -桿 -探 -滑 -鎮 -飯 -濃 -航 -懷 -趕 -庫 -奪 -伊 -靈 -稅 -途 -滅 -賽 -歸 -召 -鼓 -播 -盤 -裁 -險 -康 -唯 -錄 -菌 -純 -借 -糖 -蓋 -橫 -符 -私 -努 -堂 -域 -槍 -潤 -幅 -哈 -竟 -熟 -蟲 -澤 -腦 -壤 -碳 -歐 -遍 -側 -寨 -敢 -徹 -慮 -斜 -薄 -庭 -納 -彈 -飼 -伸 -折 -麥 -濕 -暗 -荷 -瓦 -塞 -床 -築 -惡 -戶 -訪 -塔 -奇 -透 -梁 -刀 -旋 -跡 -卡 -氯 -遇 -份 -毒 -泥 -退 -洗 -擺 -灰 -彩 -賣 -耗 -夏 -擇 -忙 -銅 -獻 -硬 -予 -繁 -圈 -雪 -函 -亦 -抽 -篇 -陣 -陰 -丁 -尺 -追 -堆 -雄 -迎 -泛 -爸 -樓 -避 -謀 -噸 -野 -豬 -旗 -累 -偏 -典 -館 -索 -秦 -脂 -潮 -爺 -豆 -忽 -托 -驚 -塑 -遺 -愈 -朱 -替 -纖 -粗 -傾 -尚 -痛 -楚 -謝 -奮 -購 -磨 -君 -池 -旁 -碎 -骨 -監 -捕 -弟 -暴 -割 -貫 -殊 -釋 -詞 -亡 -壁 -頓 -寶 -午 -塵 -聞 -揭 -炮 -殘 -冬 -橋 -婦 -警 -綜 -招 -吳 -付 -浮 -遭 -徐 -您 -搖 -谷 -贊 -箱 -隔 -訂 -男 -吹 -園 -紛 -唐 -敗 -宋 -玻 -巨 -耕 -坦 -榮 -閉 -灣 -鍵 -凡 -駐 -鍋 -救 -恩 -剝 -凝 -鹼 -齒 -截 -煉 -麻 -紡 -禁 -廢 -盛 -版 -緩 -淨 -睛 -昌 -婚 -涉 -筒 -嘴 -插 -岸 -朗 -莊 -街 -藏 -姑 -貿 -腐 -奴 -啦 -慣 -乘 -夥 -恢 -勻 -紗 -扎 -辯 -耳 -彪 -臣 -億 -璃 -抵 -脈 -秀 -薩 -俄 -網 -舞 -店 -噴 -縱 -寸 -汗 -掛 -洪 -賀 -閃 -柬 -爆 -烯 -津 -稻 -牆 -軟 -勇 -像 -滾 -厘 -蒙 -芳 -肯 -坡 -柱 -盪 -腿 -儀 -旅 -尾 -軋 -冰 -貢 -登 -黎 -削 -鑽 -勒 -逃 -障 -氨 -郭 -峰 -幣 -港 -伏 -軌 -畝 -畢 -擦 -莫 -刺 -浪 -秘 -援 -株 -健 -售 -股 -島 -甘 -泡 -睡 -童 -鑄 -湯 -閥 -休 -匯 -舍 -牧 -繞 -炸 -哲 -磷 -績 -朋 -淡 -尖 -啟 -陷 -柴 -呈 -徒 -顏 -淚 -稍 -忘 -泵 -藍 -拖 -洞 -授 -鏡 -辛 -壯 -鋒 -貧 -虛 -彎 -摩 -泰 -幼 -廷 -尊 -窗 -綱 -弄 -隸 -疑 -氏 -宮 -姐 -震 -瑞 -怪 -尤 -琴 -循 -描 -膜 -違 -夾 -腰 -緣 -珠 -窮 -森 -枝 -竹 -溝 -催 -繩 -憶 -邦 -剩 -幸 -漿 -欄 -擁 -牙 -貯 -禮 -濾 -鈉 -紋 -罷 -拍 -咱 -喊 -袖 -埃 -勤 -罰 -焦 -潛 -伍 -墨 -欲 -縫 -姓 -刊 -飽 -仿 -獎 -鋁 -鬼 -麗 -跨 -默 -挖 -鏈 -掃 -喝 -袋 -炭 -污 -幕 -諸 -弧 -勵 -梅 -奶 -潔 -災 -舟 -鑑 -苯 -訟 -抱 -毀 -懂 -寒 -智 -埔 -寄 -屆 -躍 -渡 -挑 -丹 -艱 -貝 -碰 -拔 -爹 -戴 -碼 -夢 -芽 -熔 -赤 -漁 -哭 -敬 -顆 -奔 -鉛 -仲 -虎 -稀 -妹 -乏 -珍 -申 -桌 -遵 -允 -隆 -螺 -倉 -魏 -銳 -曉 -氮 -兼 -隱 -礙 -赫 -撥 -忠 -肅 -缸 -牽 -搶 -博 -巧 -殼 -兄 -杜 -訊 -誠 -碧 -祥 -柯 -頁 -巡 -矩 -悲 -灌 -齡 -倫 -票 -尋 -桂 -鋪 -聖 -恐 -恰 -鄭 -趣 -抬 -荒 -騰 -貼 -柔 -滴 -猛 -闊 -輛 -妻 -填 -撤 -儲 -簽 -鬧 -擾 -紫 -砂 -遞 -戲 -吊 -陶 -伐 -餵 -療 -瓶 -婆 -撫 -臂 -摸 -忍 -蝦 -蠟 -鄰 -胸 -鞏 -擠 -偶 -棄 -槽 -勁 -乳 -鄧 -吉 -仁 -爛 -磚 -租 -烏 -艦 -伴 -瓜 -淺 -丙 -暫 -燥 -橡 -柳 -迷 -暖 -牌 -秧 -膽 -詳 -簧 -踏 -瓷 -譜 -呆 -賓 -糊 -洛 -輝 -憤 -競 -隙 -怒 -粘 -乃 -緒 -肩 -籍 -敏 -塗 -熙 -皆 -偵 -懸 -掘 -享 -糾 -醒 -狂 -鎖 -淀 -恨 -牲 -霸 -爬 -賞 -逆 -玩 -陵 -祝 -秒 -浙 -貌 -役 -彼 -悉 -鴨 -趨 -鳳 -晨 -畜 -輩 -秩 -卵 -署 -梯 -炎 -灘 -棋 -驅 -篩 -峽 -冒 -啥 -壽 -譯 -浸 -泉 -帽 -遲 -矽 -疆 -貸 -漏 -稿 -冠 -嫩 -脅 -芯 -牢 -叛 -蝕 -奧 -鳴 -嶺 -羊 -憑 -串 -塘 -繪 -酵 -融 -盆 -錫 -廟 -籌 -凍 -輔 -攝 -襲 -筋 -拒 -僚 -旱 -鉀 -鳥 -漆 -沈 -眉 -疏 -添 -棒 -穗 -硝 -韓 -逼 -扭 -僑 -涼 -挺 -碗 -栽 -炒 -杯 -患 -餾 -勸 -豪 -遼 -勃 -鴻 -旦 -吏 -拜 -狗 -埋 -輥 -掩 -飲 -搬 -罵 -辭 -勾 -扣 -估 -蔣 -絨 -霧 -丈 -朵 -姆 -擬 -宇 -輯 -陝 -雕 -償 -蓄 -崇 -剪 -倡 -廳 -咬 -駛 -薯 -刷 -斥 -番 -賦 -奉 -佛 -澆 -漫 -曼 -扇 -鈣 -桃 -扶 -仔 -返 -俗 -虧 -腔 -鞋 -棱 -覆 -框 -悄 -叔 -撞 -騙 -勘 -旺 -沸 -孤 -吐 -孟 -渠 -屈 -疾 -妙 -惜 -仰 -狠 -脹 -諧 -拋 -黴 -桑 -崗 -嘛 -衰 -盜 -滲 -臟 -賴 -湧 -甜 -曹 -閱 -肌 -哩 -厲 -烴 -緯 -毅 -昨 -偽 -症 -煮 -嘆 -釘 -搭 -莖 -籠 -酷 -偷 -弓 -錐 -恆 -傑 -坑 -鼻 -翼 -綸 -敘 -獄 -逮 -罐 -絡 -棚 -抑 -膨 -蔬 -寺 -驟 -穆 -冶 -枯 -冊 -屍 -凸 -紳 -坯 -犧 -焰 -轟 -欣 -晉 -瘦 -禦 -錠 -錦 -喪 -旬 -鍛 -壟 -搜 -撲 -邀 -亭 -酯 -邁 -舒 -脆 -酶 -閒 -憂 -酚 -頑 -羽 -漲 -卸 -仗 -陪 -闢 -懲 -杭 -姚 -肚 -捉 -飄 -漂 -昆 -欺 -吾 -郎 -烷 -汁 -呵 -飾 -蕭 -雅 -郵 -遷 -燕 -撒 -姻 -赴 -宴 -煩 -債 -帳 -斑 -鈴 -旨 -醇 -董 -餅 -雛 -姿 -拌 -傅 -腹 -妥 -揉 -賢 -拆 -歪 -葡 -胺 -丟 -浩 -徽 -昂 -墊 -擋 -覽 -貪 -慰 -繳 -汪 -慌 -馮 -諾 -姜 -誼 -兇 -劣 -誣 -耀 -昏 -躺 -盈 -騎 -喬 -溪 -叢 -盧 -抹 -悶 -諮 -刮 -駕 -纜 -悟 -摘 -鉺 -擲 -頗 -幻 -柄 -惠 -慘 -佳 -仇 -臘 -窩 -滌 -劍 -瞧 -堡 -潑 -蔥 -罩 -霍 -撈 -胎 -蒼 -濱 -倆 -捅 -湘 -砍 -霞 -邵 -萄 -瘋 -淮 -遂 -熊 -糞 -烘 -宿 -檔 -戈 -駁 -嫂 -裕 -徙 -箭 -捐 -腸 -撐 -曬 -辨 -殿 -蓮 -攤 -攪 -醬 -屏 -疫 -哀 -蔡 -堵 -沫 -皺 -暢 -疊 -閣 -萊 -敲 -轄 -鉤 -痕 -壩 -巷 -餓 -禍 -丘 -玄 -溜 -曰 -邏 -彭 -嘗 -卿 -妨 -艇 -吞 -韋 -怨 -矮 -歇`.split('\n'); -//# sourceMappingURL=traditional-chinese.js.map \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js.map b/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js.map deleted file mode 100644 index efa45e0d..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/esm/wordlists/traditional-chinese.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"traditional-chinese.js","sourceRoot":"","sources":["../../src/wordlists/traditional-chinese.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+/DhC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/index.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/index.d.ts deleted file mode 100644 index 85cdb221..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Generate x random words. Uses Cryptographically-Secure Random Number Generator. - * @param wordlist imported wordlist for specific language - * @param strength mnemonic strength 128-256 bits - * @example - * generateMnemonic(wordlist, 128) - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export declare function generateMnemonic(wordlist: string[], strength?: number): string; -/** - * Reversible: Converts mnemonic string to raw entropy in form of byte array. - * @param mnemonic 12-24 words - * @param wordlist imported wordlist for specific language - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToEntropy(mnem, wordlist) - * // Produces - * new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]) - */ -export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array; -/** - * Reversible: Converts raw entropy in form of byte array to mnemonic string. - * @param entropy byte array - * @param wordlist imported wordlist for specific language - * @returns 12-24 words - * @example - * const ent = new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]); - * entropyToMnemonic(ent, wordlist); - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string; -/** - * Validates mnemonic for being 12-24 words contained in `wordlist`. - */ -export declare function validateMnemonic(mnemonic: string, wordlist: string[]): boolean; -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * await mnemonicToSeed(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise; -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToSeedSync(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/index.js b/node_modules/nostr-tools/node_modules/@scure/bip39/index.js deleted file mode 100644 index 924ae10c..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/index.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mnemonicToSeedSync = exports.mnemonicToSeed = exports.validateMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.generateMnemonic = void 0; -/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */ -const _assert_1 = require("@noble/hashes/_assert"); -const pbkdf2_1 = require("@noble/hashes/pbkdf2"); -const sha256_1 = require("@noble/hashes/sha256"); -const sha512_1 = require("@noble/hashes/sha512"); -const utils_1 = require("@noble/hashes/utils"); -const base_1 = require("@scure/base"); -// Japanese wordlist -const isJapanese = (wordlist) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093'; -// Normalization replaces equivalent sequences of characters -// so that any two texts that are equivalent will be reduced -// to the same sequence of code points, called the normal form of the original text. -function nfkd(str) { - if (typeof str !== 'string') - throw new TypeError(`Invalid mnemonic type: ${typeof str}`); - return str.normalize('NFKD'); -} -function normalize(str) { - const norm = nfkd(str); - const words = norm.split(' '); - if (![12, 15, 18, 21, 24].includes(words.length)) - throw new Error('Invalid mnemonic'); - return { nfkd: norm, words }; -} -function assertEntropy(entropy) { - _assert_1.default.bytes(entropy, 16, 20, 24, 28, 32); -} -/** - * Generate x random words. Uses Cryptographically-Secure Random Number Generator. - * @param wordlist imported wordlist for specific language - * @param strength mnemonic strength 128-256 bits - * @example - * generateMnemonic(wordlist, 128) - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -function generateMnemonic(wordlist, strength = 128) { - _assert_1.default.number(strength); - if (strength % 32 !== 0 || strength > 256) - throw new TypeError('Invalid entropy'); - return entropyToMnemonic((0, utils_1.randomBytes)(strength / 8), wordlist); -} -exports.generateMnemonic = generateMnemonic; -const calcChecksum = (entropy) => { - // Checksum is ent.length/4 bits long - const bitsLeft = 8 - entropy.length / 4; - // Zero rightmost "bitsLeft" bits in byte - // For example: bitsLeft=4 val=10111101 -> 10110000 - return new Uint8Array([((0, sha256_1.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]); -}; -function getCoder(wordlist) { - if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string') - throw new Error('Worlist: expected array of 2048 strings'); - wordlist.forEach((i) => { - if (typeof i !== 'string') - throw new Error(`Wordlist: non-string element: ${i}`); - }); - return base_1.utils.chain(base_1.utils.checksum(1, calcChecksum), base_1.utils.radix2(11, true), base_1.utils.alphabet(wordlist)); -} -/** - * Reversible: Converts mnemonic string to raw entropy in form of byte array. - * @param mnemonic 12-24 words - * @param wordlist imported wordlist for specific language - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToEntropy(mnem, wordlist) - * // Produces - * new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]) - */ -function mnemonicToEntropy(mnemonic, wordlist) { - const { words } = normalize(mnemonic); - const entropy = getCoder(wordlist).decode(words); - assertEntropy(entropy); - return entropy; -} -exports.mnemonicToEntropy = mnemonicToEntropy; -/** - * Reversible: Converts raw entropy in form of byte array to mnemonic string. - * @param entropy byte array - * @param wordlist imported wordlist for specific language - * @returns 12-24 words - * @example - * const ent = new Uint8Array([ - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f - * ]); - * entropyToMnemonic(ent, wordlist); - * // 'legal winner thank year wave sausage worth useful legal winner thank yellow' - */ -function entropyToMnemonic(entropy, wordlist) { - assertEntropy(entropy); - const words = getCoder(wordlist).encode(entropy); - return words.join(isJapanese(wordlist) ? '\u3000' : ' '); -} -exports.entropyToMnemonic = entropyToMnemonic; -/** - * Validates mnemonic for being 12-24 words contained in `wordlist`. - */ -function validateMnemonic(mnemonic, wordlist) { - try { - mnemonicToEntropy(mnemonic, wordlist); - } - catch (e) { - return false; - } - return true; -} -exports.validateMnemonic = validateMnemonic; -const salt = (passphrase) => nfkd(`mnemonic${passphrase}`); -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * await mnemonicToSeed(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -function mnemonicToSeed(mnemonic, passphrase = '') { - return (0, pbkdf2_1.pbkdf2Async)(sha512_1.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); -} -exports.mnemonicToSeed = mnemonicToSeed; -/** - * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password. - * @param mnemonic 12-24 words - * @param passphrase string that will additionally protect the key - * @returns 64 bytes of key data - * @example - * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow'; - * mnemonicToSeedSync(mnem, 'password'); - * // new Uint8Array([...64 bytes]) - */ -function mnemonicToSeedSync(mnemonic, passphrase = '') { - return (0, pbkdf2_1.pbkdf2)(sha512_1.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 }); -} -exports.mnemonicToSeedSync = mnemonicToSeedSync; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/package.json b/node_modules/nostr-tools/node_modules/@scure/bip39/package.json deleted file mode 100644 index 51102a90..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/package.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "name": "@scure/bip39", - "version": "1.2.1", - "description": "Secure, audited & minimal implementation of BIP39 mnemonic phrases", - "main": "index.js", - "files": [ - "index.js", - "index.d.ts", - "wordlists/*.js", - "wordlists/*.d.ts", - "esm" - ], - "types": "index.d.ts", - "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - }, - "devDependencies": { - "micro-should": "0.4.0", - "prettier": "2.8.4", - "typescript": "5.0.2" - }, - "author": "Paul Miller (https://paulmillr.com)", - "homepage": "https://paulmillr.com/", - "repository": { - "type": "git", - "url": "https://github.com/paulmillr/scure-bip39.git" - }, - "contributors": [ - { - "name": "Patricio Palladino", - "email": "patricio@nomiclabs.io" - }, - { - "name": "Paul Miller", - "url": "https://paulmillr.com" - } - ], - "license": "MIT", - "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", - "lint": "prettier --check 'src/**/*.ts' 'test/*.test.ts'", - "format": "prettier --write 'src/**/*.ts' 'test/*.test.ts'", - "test": "cd test && tsc && node bip39.test.js" - }, - "exports": { - ".": { - "types": "./index.d.ts", - "import": "./esm/index.js", - "default": "./index.js" - }, - "./index": { - "types": "./index.d.ts", - "import": "./esm/index.js", - "default": "./index.js" - }, - "./wordlists/czech": { - "types": "./wordlists/czech.d.ts", - "import": "./esm/wordlists/czech.js", - "default": "./wordlists/czech.js" - }, - "./wordlists/english": { - "types": "./wordlists/english.d.ts", - "import": "./esm/wordlists/english.js", - "default": "./wordlists/english.js" - }, - "./wordlists/french": { - "types": "./wordlists/french.d.ts", - "import": "./esm/wordlists/french.js", - "default": "./wordlists/french.js" - }, - "./wordlists/italian": { - "types": "./wordlists/italian.d.ts", - "import": "./esm/wordlists/italian.js", - "default": "./wordlists/italian.js" - }, - "./wordlists/japanese": { - "types": "./wordlists/japanese.d.ts", - "import": "./esm/wordlists/japanese.js", - "default": "./wordlists/japanese.js" - }, - "./wordlists/korean": { - "types": "./wordlists/korean.d.ts", - "import": "./esm/wordlists/korean.js", - "default": "./wordlists/korean.js" - }, - "./wordlists/simplified-chinese": { - "types": "./wordlists/simplified-chinese.d.ts", - "import": "./esm/wordlists/simplified-chinese.js", - "default": "./wordlists/simplified-chinese.js" - }, - "./wordlists/spanish": { - "types": "./wordlists/spanish.d.ts", - "import": "./esm/wordlists/spanish.js", - "default": "./wordlists/spanish.js" - }, - "./wordlists/traditional-chinese": { - "types": "./wordlists/traditional-chinese.d.ts", - "import": "./esm/wordlists/traditional-chinese.js", - "default": "./wordlists/traditional-chinese.js" - } - }, - "keywords": [ - "bip39", - "mnemonic", - "phrase", - "code", - "bip0039", - "bip-39", - "micro", - "scure", - "wordlist", - "noble" - ], - "funding": "https://paulmillr.com/funding/" -} diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.js deleted file mode 100644 index 0295622f..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/czech.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `abdikace -abeceda -adresa -agrese -akce -aktovka -alej -alkohol -amputace -ananas -andulka -anekdota -anketa -antika -anulovat -archa -arogance -asfalt -asistent -aspirace -astma -astronom -atlas -atletika -atol -autobus -azyl -babka -bachor -bacil -baculka -badatel -bageta -bagr -bahno -bakterie -balada -baletka -balkon -balonek -balvan -balza -bambus -bankomat -barbar -baret -barman -baroko -barva -baterka -batoh -bavlna -bazalka -bazilika -bazuka -bedna -beran -beseda -bestie -beton -bezinka -bezmoc -beztak -bicykl -bidlo -biftek -bikiny -bilance -biograf -biolog -bitva -bizon -blahobyt -blatouch -blecha -bledule -blesk -blikat -blizna -blokovat -bloudit -blud -bobek -bobr -bodlina -bodnout -bohatost -bojkot -bojovat -bokorys -bolest -borec -borovice -bota -boubel -bouchat -bouda -boule -bourat -boxer -bradavka -brambora -branka -bratr -brepta -briketa -brko -brloh -bronz -broskev -brunetka -brusinka -brzda -brzy -bublina -bubnovat -buchta -buditel -budka -budova -bufet -bujarost -bukvice -buldok -bulva -bunda -bunkr -burza -butik -buvol -buzola -bydlet -bylina -bytovka -bzukot -capart -carevna -cedr -cedule -cejch -cejn -cela -celer -celkem -celnice -cenina -cennost -cenovka -centrum -cenzor -cestopis -cetka -chalupa -chapadlo -charita -chata -chechtat -chemie -chichot -chirurg -chlad -chleba -chlubit -chmel -chmura -chobot -chochol -chodba -cholera -chomout -chopit -choroba -chov -chrapot -chrlit -chrt -chrup -chtivost -chudina -chutnat -chvat -chvilka -chvost -chyba -chystat -chytit -cibule -cigareta -cihelna -cihla -cinkot -cirkus -cisterna -citace -citrus -cizinec -cizost -clona -cokoliv -couvat -ctitel -ctnost -cudnost -cuketa -cukr -cupot -cvaknout -cval -cvik -cvrkot -cyklista -daleko -dareba -datel -datum -dcera -debata -dechovka -decibel -deficit -deflace -dekl -dekret -demokrat -deprese -derby -deska -detektiv -dikobraz -diktovat -dioda -diplom -disk -displej -divadlo -divoch -dlaha -dlouho -dluhopis -dnes -dobro -dobytek -docent -dochutit -dodnes -dohled -dohoda -dohra -dojem -dojnice -doklad -dokola -doktor -dokument -dolar -doleva -dolina -doma -dominant -domluvit -domov -donutit -dopad -dopis -doplnit -doposud -doprovod -dopustit -dorazit -dorost -dort -dosah -doslov -dostatek -dosud -dosyta -dotaz -dotek -dotknout -doufat -doutnat -dovozce -dozadu -doznat -dozorce -drahota -drak -dramatik -dravec -draze -drdol -drobnost -drogerie -drozd -drsnost -drtit -drzost -duben -duchovno -dudek -duha -duhovka -dusit -dusno -dutost -dvojice -dvorec -dynamit -ekolog -ekonomie -elektron -elipsa -email -emise -emoce -empatie -epizoda -epocha -epopej -epos -esej -esence -eskorta -eskymo -etiketa -euforie -evoluce -exekuce -exkurze -expedice -exploze -export -extrakt -facka -fajfka -fakulta -fanatik -fantazie -farmacie -favorit -fazole -federace -fejeton -fenka -fialka -figurant -filozof -filtr -finance -finta -fixace -fjord -flanel -flirt -flotila -fond -fosfor -fotbal -fotka -foton -frakce -freska -fronta -fukar -funkce -fyzika -galeje -garant -genetika -geolog -gilotina -glazura -glejt -golem -golfista -gotika -graf -gramofon -granule -grep -gril -grog -groteska -guma -hadice -hadr -hala -halenka -hanba -hanopis -harfa -harpuna -havran -hebkost -hejkal -hejno -hejtman -hektar -helma -hematom -herec -herna -heslo -hezky -historik -hladovka -hlasivky -hlava -hledat -hlen -hlodavec -hloh -hloupost -hltat -hlubina -hluchota -hmat -hmota -hmyz -hnis -hnojivo -hnout -hoblina -hoboj -hoch -hodiny -hodlat -hodnota -hodovat -hojnost -hokej -holinka -holka -holub -homole -honitba -honorace -horal -horda -horizont -horko -horlivec -hormon -hornina -horoskop -horstvo -hospoda -hostina -hotovost -houba -houf -houpat -houska -hovor -hradba -hranice -hravost -hrazda -hrbolek -hrdina -hrdlo -hrdost -hrnek -hrobka -hromada -hrot -hrouda -hrozen -hrstka -hrubost -hryzat -hubenost -hubnout -hudba -hukot -humr -husita -hustota -hvozd -hybnost -hydrant -hygiena -hymna -hysterik -idylka -ihned -ikona -iluze -imunita -infekce -inflace -inkaso -inovace -inspekce -internet -invalida -investor -inzerce -ironie -jablko -jachta -jahoda -jakmile -jakost -jalovec -jantar -jarmark -jaro -jasan -jasno -jatka -javor -jazyk -jedinec -jedle -jednatel -jehlan -jekot -jelen -jelito -jemnost -jenom -jepice -jeseter -jevit -jezdec -jezero -jinak -jindy -jinoch -jiskra -jistota -jitrnice -jizva -jmenovat -jogurt -jurta -kabaret -kabel -kabinet -kachna -kadet -kadidlo -kahan -kajak -kajuta -kakao -kaktus -kalamita -kalhoty -kalibr -kalnost -kamera -kamkoliv -kamna -kanibal -kanoe -kantor -kapalina -kapela -kapitola -kapka -kaple -kapota -kapr -kapusta -kapybara -karamel -karotka -karton -kasa -katalog -katedra -kauce -kauza -kavalec -kazajka -kazeta -kazivost -kdekoliv -kdesi -kedluben -kemp -keramika -kino -klacek -kladivo -klam -klapot -klasika -klaun -klec -klenba -klepat -klesnout -klid -klima -klisna -klobouk -klokan -klopa -kloub -klubovna -klusat -kluzkost -kmen -kmitat -kmotr -kniha -knot -koalice -koberec -kobka -kobliha -kobyla -kocour -kohout -kojenec -kokos -koktejl -kolaps -koleda -kolize -kolo -komando -kometa -komik -komnata -komora -kompas -komunita -konat -koncept -kondice -konec -konfese -kongres -konina -konkurs -kontakt -konzerva -kopanec -kopie -kopnout -koprovka -korbel -korektor -kormidlo -koroptev -korpus -koruna -koryto -korzet -kosatec -kostka -kotel -kotleta -kotoul -koukat -koupelna -kousek -kouzlo -kovboj -koza -kozoroh -krabice -krach -krajina -kralovat -krasopis -kravata -kredit -krejcar -kresba -kreveta -kriket -kritik -krize -krkavec -krmelec -krmivo -krocan -krok -kronika -kropit -kroupa -krovka -krtek -kruhadlo -krupice -krutost -krvinka -krychle -krypta -krystal -kryt -kudlanka -kufr -kujnost -kukla -kulajda -kulich -kulka -kulomet -kultura -kuna -kupodivu -kurt -kurzor -kutil -kvalita -kvasinka -kvestor -kynolog -kyselina -kytara -kytice -kytka -kytovec -kyvadlo -labrador -lachtan -ladnost -laik -lakomec -lamela -lampa -lanovka -lasice -laso -lastura -latinka -lavina -lebka -leckdy -leden -lednice -ledovka -ledvina -legenda -legie -legrace -lehce -lehkost -lehnout -lektvar -lenochod -lentilka -lepenka -lepidlo -letadlo -letec -letmo -letokruh -levhart -levitace -levobok -libra -lichotka -lidojed -lidskost -lihovina -lijavec -lilek -limetka -linie -linka -linoleum -listopad -litina -litovat -lobista -lodivod -logika -logoped -lokalita -loket -lomcovat -lopata -lopuch -lord -losos -lotr -loudal -louh -louka -louskat -lovec -lstivost -lucerna -lucifer -lump -lusk -lustrace -lvice -lyra -lyrika -lysina -madam -madlo -magistr -mahagon -majetek -majitel -majorita -makak -makovice -makrela -malba -malina -malovat -malvice -maminka -mandle -manko -marnost -masakr -maskot -masopust -matice -matrika -maturita -mazanec -mazivo -mazlit -mazurka -mdloba -mechanik -meditace -medovina -melasa -meloun -mentolka -metla -metoda -metr -mezera -migrace -mihnout -mihule -mikina -mikrofon -milenec -milimetr -milost -mimika -mincovna -minibar -minomet -minulost -miska -mistr -mixovat -mladost -mlha -mlhovina -mlok -mlsat -mluvit -mnich -mnohem -mobil -mocnost -modelka -modlitba -mohyla -mokro -molekula -momentka -monarcha -monokl -monstrum -montovat -monzun -mosaz -moskyt -most -motivace -motorka -motyka -moucha -moudrost -mozaika -mozek -mozol -mramor -mravenec -mrkev -mrtvola -mrzet -mrzutost -mstitel -mudrc -muflon -mulat -mumie -munice -muset -mutace -muzeum -muzikant -myslivec -mzda -nabourat -nachytat -nadace -nadbytek -nadhoz -nadobro -nadpis -nahlas -nahnat -nahodile -nahradit -naivita -najednou -najisto -najmout -naklonit -nakonec -nakrmit -nalevo -namazat -namluvit -nanometr -naoko -naopak -naostro -napadat -napevno -naplnit -napnout -naposled -naprosto -narodit -naruby -narychlo -nasadit -nasekat -naslepo -nastat -natolik -navenek -navrch -navzdory -nazvat -nebe -nechat -necky -nedaleko -nedbat -neduh -negace -nehet -nehoda -nejen -nejprve -neklid -nelibost -nemilost -nemoc -neochota -neonka -nepokoj -nerost -nerv -nesmysl -nesoulad -netvor -neuron -nevina -nezvykle -nicota -nijak -nikam -nikdy -nikl -nikterak -nitro -nocleh -nohavice -nominace -nora -norek -nositel -nosnost -nouze -noviny -novota -nozdra -nuda -nudle -nuget -nutit -nutnost -nutrie -nymfa -obal -obarvit -obava -obdiv -obec -obehnat -obejmout -obezita -obhajoba -obilnice -objasnit -objekt -obklopit -oblast -oblek -obliba -obloha -obluda -obnos -obohatit -obojek -obout -obrazec -obrna -obruba -obrys -obsah -obsluha -obstarat -obuv -obvaz -obvinit -obvod -obvykle -obyvatel -obzor -ocas -ocel -ocenit -ochladit -ochota -ochrana -ocitnout -odboj -odbyt -odchod -odcizit -odebrat -odeslat -odevzdat -odezva -odhadce -odhodit -odjet -odjinud -odkaz -odkoupit -odliv -odluka -odmlka -odolnost -odpad -odpis -odplout -odpor -odpustit -odpykat -odrazka -odsoudit -odstup -odsun -odtok -odtud -odvaha -odveta -odvolat -odvracet -odznak -ofina -ofsajd -ohlas -ohnisko -ohrada -ohrozit -ohryzek -okap -okenice -oklika -okno -okouzlit -okovy -okrasa -okres -okrsek -okruh -okupant -okurka -okusit -olejnina -olizovat -omak -omeleta -omezit -omladina -omlouvat -omluva -omyl -onehdy -opakovat -opasek -operace -opice -opilost -opisovat -opora -opozice -opravdu -oproti -orbital -orchestr -orgie -orlice -orloj -ortel -osada -oschnout -osika -osivo -oslava -oslepit -oslnit -oslovit -osnova -osoba -osolit -ospalec -osten -ostraha -ostuda -ostych -osvojit -oteplit -otisk -otop -otrhat -otrlost -otrok -otruby -otvor -ovanout -ovar -oves -ovlivnit -ovoce -oxid -ozdoba -pachatel -pacient -padouch -pahorek -pakt -palanda -palec -palivo -paluba -pamflet -pamlsek -panenka -panika -panna -panovat -panstvo -pantofle -paprika -parketa -parodie -parta -paruka -paryba -paseka -pasivita -pastelka -patent -patrona -pavouk -pazneht -pazourek -pecka -pedagog -pejsek -peklo -peloton -penalta -pendrek -penze -periskop -pero -pestrost -petarda -petice -petrolej -pevnina -pexeso -pianista -piha -pijavice -pikle -piknik -pilina -pilnost -pilulka -pinzeta -pipeta -pisatel -pistole -pitevna -pivnice -pivovar -placenta -plakat -plamen -planeta -plastika -platit -plavidlo -plaz -plech -plemeno -plenta -ples -pletivo -plevel -plivat -plnit -plno -plocha -plodina -plomba -plout -pluk -plyn -pobavit -pobyt -pochod -pocit -poctivec -podat -podcenit -podepsat -podhled -podivit -podklad -podmanit -podnik -podoba -podpora -podraz -podstata -podvod -podzim -poezie -pohanka -pohnutka -pohovor -pohroma -pohyb -pointa -pojistka -pojmout -pokazit -pokles -pokoj -pokrok -pokuta -pokyn -poledne -polibek -polknout -poloha -polynom -pomalu -pominout -pomlka -pomoc -pomsta -pomyslet -ponechat -ponorka -ponurost -popadat -popel -popisek -poplach -poprosit -popsat -popud -poradce -porce -porod -porucha -poryv -posadit -posed -posila -poskok -poslanec -posoudit -pospolu -postava -posudek -posyp -potah -potkan -potlesk -potomek -potrava -potupa -potvora -poukaz -pouto -pouzdro -povaha -povidla -povlak -povoz -povrch -povstat -povyk -povzdech -pozdrav -pozemek -poznatek -pozor -pozvat -pracovat -prahory -praktika -prales -praotec -praporek -prase -pravda -princip -prkno -probudit -procento -prodej -profese -prohra -projekt -prolomit -promile -pronikat -propad -prorok -prosba -proton -proutek -provaz -prskavka -prsten -prudkost -prut -prvek -prvohory -psanec -psovod -pstruh -ptactvo -puberta -puch -pudl -pukavec -puklina -pukrle -pult -pumpa -punc -pupen -pusa -pusinka -pustina -putovat -putyka -pyramida -pysk -pytel -racek -rachot -radiace -radnice -radon -raft -ragby -raketa -rakovina -rameno -rampouch -rande -rarach -rarita -rasovna -rastr -ratolest -razance -razidlo -reagovat -reakce -recept -redaktor -referent -reflex -rejnok -reklama -rekord -rekrut -rektor -reputace -revize -revma -revolver -rezerva -riskovat -riziko -robotika -rodokmen -rohovka -rokle -rokoko -romaneto -ropovod -ropucha -rorejs -rosol -rostlina -rotmistr -rotoped -rotunda -roubenka -roucho -roup -roura -rovina -rovnice -rozbor -rozchod -rozdat -rozeznat -rozhodce -rozinka -rozjezd -rozkaz -rozloha -rozmar -rozpad -rozruch -rozsah -roztok -rozum -rozvod -rubrika -ruchadlo -rukavice -rukopis -ryba -rybolov -rychlost -rydlo -rypadlo -rytina -ryzost -sadista -sahat -sako -samec -samizdat -samota -sanitka -sardinka -sasanka -satelit -sazba -sazenice -sbor -schovat -sebranka -secese -sedadlo -sediment -sedlo -sehnat -sejmout -sekera -sekta -sekunda -sekvoje -semeno -seno -servis -sesadit -seshora -seskok -seslat -sestra -sesuv -sesypat -setba -setina -setkat -setnout -setrvat -sever -seznam -shoda -shrnout -sifon -silnice -sirka -sirotek -sirup -situace -skafandr -skalisko -skanzen -skaut -skeptik -skica -skladba -sklenice -sklo -skluz -skoba -skokan -skoro -skripta -skrz -skupina -skvost -skvrna -slabika -sladidlo -slanina -slast -slavnost -sledovat -slepec -sleva -slezina -slib -slina -sliznice -slon -sloupek -slovo -sluch -sluha -slunce -slupka -slza -smaragd -smetana -smilstvo -smlouva -smog -smrad -smrk -smrtka -smutek -smysl -snad -snaha -snob -sobota -socha -sodovka -sokol -sopka -sotva -souboj -soucit -soudce -souhlas -soulad -soumrak -souprava -soused -soutok -souviset -spalovna -spasitel -spis -splav -spodek -spojenec -spolu -sponzor -spornost -spousta -sprcha -spustit -sranda -sraz -srdce -srna -srnec -srovnat -srpen -srst -srub -stanice -starosta -statika -stavba -stehno -stezka -stodola -stolek -stopa -storno -stoupat -strach -stres -strhnout -strom -struna -studna -stupnice -stvol -styk -subjekt -subtropy -suchar -sudost -sukno -sundat -sunout -surikata -surovina -svah -svalstvo -svetr -svatba -svazek -svisle -svitek -svoboda -svodidlo -svorka -svrab -sykavka -sykot -synek -synovec -sypat -sypkost -syrovost -sysel -sytost -tabletka -tabule -tahoun -tajemno -tajfun -tajga -tajit -tajnost -taktika -tamhle -tampon -tancovat -tanec -tanker -tapeta -tavenina -tazatel -technika -tehdy -tekutina -telefon -temnota -tendence -tenista -tenor -teplota -tepna -teprve -terapie -termoska -textil -ticho -tiskopis -titulek -tkadlec -tkanina -tlapka -tleskat -tlukot -tlupa -tmel -toaleta -topinka -topol -torzo -touha -toulec -tradice -traktor -tramp -trasa -traverza -trefit -trest -trezor -trhavina -trhlina -trochu -trojice -troska -trouba -trpce -trpitel -trpkost -trubec -truchlit -truhlice -trus -trvat -tudy -tuhnout -tuhost -tundra -turista -turnaj -tuzemsko -tvaroh -tvorba -tvrdost -tvrz -tygr -tykev -ubohost -uboze -ubrat -ubrousek -ubrus -ubytovna -ucho -uctivost -udivit -uhradit -ujednat -ujistit -ujmout -ukazatel -uklidnit -uklonit -ukotvit -ukrojit -ulice -ulita -ulovit -umyvadlo -unavit -uniforma -uniknout -upadnout -uplatnit -uplynout -upoutat -upravit -uran -urazit -usednout -usilovat -usmrtit -usnadnit -usnout -usoudit -ustlat -ustrnout -utahovat -utkat -utlumit -utonout -utopenec -utrousit -uvalit -uvolnit -uvozovka -uzdravit -uzel -uzenina -uzlina -uznat -vagon -valcha -valoun -vana -vandal -vanilka -varan -varhany -varovat -vcelku -vchod -vdova -vedro -vegetace -vejce -velbloud -veletrh -velitel -velmoc -velryba -venkov -veranda -verze -veselka -veskrze -vesnice -vespodu -vesta -veterina -veverka -vibrace -vichr -videohra -vidina -vidle -vila -vinice -viset -vitalita -vize -vizitka -vjezd -vklad -vkus -vlajka -vlak -vlasec -vlevo -vlhkost -vliv -vlnovka -vloupat -vnucovat -vnuk -voda -vodivost -vodoznak -vodstvo -vojensky -vojna -vojsko -volant -volba -volit -volno -voskovka -vozidlo -vozovna -vpravo -vrabec -vracet -vrah -vrata -vrba -vrcholek -vrhat -vrstva -vrtule -vsadit -vstoupit -vstup -vtip -vybavit -vybrat -vychovat -vydat -vydra -vyfotit -vyhledat -vyhnout -vyhodit -vyhradit -vyhubit -vyjasnit -vyjet -vyjmout -vyklopit -vykonat -vylekat -vymazat -vymezit -vymizet -vymyslet -vynechat -vynikat -vynutit -vypadat -vyplatit -vypravit -vypustit -vyrazit -vyrovnat -vyrvat -vyslovit -vysoko -vystavit -vysunout -vysypat -vytasit -vytesat -vytratit -vyvinout -vyvolat -vyvrhel -vyzdobit -vyznat -vzadu -vzbudit -vzchopit -vzdor -vzduch -vzdychat -vzestup -vzhledem -vzkaz -vzlykat -vznik -vzorek -vzpoura -vztah -vztek -xylofon -zabrat -zabydlet -zachovat -zadarmo -zadusit -zafoukat -zahltit -zahodit -zahrada -zahynout -zajatec -zajet -zajistit -zaklepat -zakoupit -zalepit -zamezit -zamotat -zamyslet -zanechat -zanikat -zaplatit -zapojit -zapsat -zarazit -zastavit -zasunout -zatajit -zatemnit -zatknout -zaujmout -zavalit -zavelet -zavinit -zavolat -zavrtat -zazvonit -zbavit -zbrusu -zbudovat -zbytek -zdaleka -zdarma -zdatnost -zdivo -zdobit -zdroj -zdvih -zdymadlo -zelenina -zeman -zemina -zeptat -zezadu -zezdola -zhatit -zhltnout -zhluboka -zhotovit -zhruba -zima -zimnice -zjemnit -zklamat -zkoumat -zkratka -zkumavka -zlato -zlehka -zloba -zlom -zlost -zlozvyk -zmapovat -zmar -zmatek -zmije -zmizet -zmocnit -zmodrat -zmrzlina -zmutovat -znak -znalost -znamenat -znovu -zobrazit -zotavit -zoubek -zoufale -zplodit -zpomalit -zprava -zprostit -zprudka -zprvu -zrada -zranit -zrcadlo -zrnitost -zrno -zrovna -zrychlit -zrzavost -zticha -ztratit -zubovina -zubr -zvednout -zvenku -zvesela -zvon -zvrat -zvukovod -zvyk`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.js deleted file mode 100644 index 10c9c190..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/english.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `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`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.js deleted file mode 100644 index 60105821..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/french.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `abaisser -abandon -abdiquer -abeille -abolir -aborder -aboutir -aboyer -abrasif -abreuver -abriter -abroger -abrupt -absence -absolu -absurde -abusif -abyssal -académie -acajou -acarien -accabler -accepter -acclamer -accolade -accroche -accuser -acerbe -achat -acheter -aciduler -acier -acompte -acquérir -acronyme -acteur -actif -actuel -adepte -adéquat -adhésif -adjectif -adjuger -admettre -admirer -adopter -adorer -adoucir -adresse -adroit -adulte -adverbe -aérer -aéronef -affaire -affecter -affiche -affreux -affubler -agacer -agencer -agile -agiter -agrafer -agréable -agrume -aider -aiguille -ailier -aimable -aisance -ajouter -ajuster -alarmer -alchimie -alerte -algèbre -algue -aliéner -aliment -alléger -alliage -allouer -allumer -alourdir -alpaga -altesse -alvéole -amateur -ambigu -ambre -aménager -amertume -amidon -amiral -amorcer -amour -amovible -amphibie -ampleur -amusant -analyse -anaphore -anarchie -anatomie -ancien -anéantir -angle -angoisse -anguleux -animal -annexer -annonce -annuel -anodin -anomalie -anonyme -anormal -antenne -antidote -anxieux -apaiser -apéritif -aplanir -apologie -appareil -appeler -apporter -appuyer -aquarium -aqueduc -arbitre -arbuste -ardeur -ardoise -argent -arlequin -armature -armement -armoire -armure -arpenter -arracher -arriver -arroser -arsenic -artériel -article -aspect -asphalte -aspirer -assaut -asservir -assiette -associer -assurer -asticot -astre -astuce -atelier -atome -atrium -atroce -attaque -attentif -attirer -attraper -aubaine -auberge -audace -audible -augurer -aurore -automne -autruche -avaler -avancer -avarice -avenir -averse -aveugle -aviateur -avide -avion -aviser -avoine -avouer -avril -axial -axiome -badge -bafouer -bagage -baguette -baignade -balancer -balcon -baleine -balisage -bambin -bancaire -bandage -banlieue -bannière -banquier -barbier -baril -baron -barque -barrage -bassin -bastion -bataille -bateau -batterie -baudrier -bavarder -belette -bélier -belote -bénéfice -berceau -berger -berline -bermuda -besace -besogne -bétail -beurre -biberon -bicycle -bidule -bijou -bilan -bilingue -billard -binaire -biologie -biopsie -biotype -biscuit -bison -bistouri -bitume -bizarre -blafard -blague -blanchir -blessant -blinder -blond -bloquer -blouson -bobard -bobine -boire -boiser -bolide -bonbon -bondir -bonheur -bonifier -bonus -bordure -borne -botte -boucle -boueux -bougie -boulon -bouquin -bourse -boussole -boutique -boxeur -branche -brasier -brave -brebis -brèche -breuvage -bricoler -brigade -brillant -brioche -brique -brochure -broder -bronzer -brousse -broyeur -brume -brusque -brutal -bruyant -buffle -buisson -bulletin -bureau -burin -bustier -butiner -butoir -buvable -buvette -cabanon -cabine -cachette -cadeau -cadre -caféine -caillou -caisson -calculer -calepin -calibre -calmer -calomnie -calvaire -camarade -caméra -camion -campagne -canal -caneton -canon -cantine -canular -capable -caporal -caprice -capsule -capter -capuche -carabine -carbone -caresser -caribou -carnage -carotte -carreau -carton -cascade -casier -casque -cassure -causer -caution -cavalier -caverne -caviar -cédille -ceinture -céleste -cellule -cendrier -censurer -central -cercle -cérébral -cerise -cerner -cerveau -cesser -chagrin -chaise -chaleur -chambre -chance -chapitre -charbon -chasseur -chaton -chausson -chavirer -chemise -chenille -chéquier -chercher -cheval -chien -chiffre -chignon -chimère -chiot -chlorure -chocolat -choisir -chose -chouette -chrome -chute -cigare -cigogne -cimenter -cinéma -cintrer -circuler -cirer -cirque -citerne -citoyen -citron -civil -clairon -clameur -claquer -classe -clavier -client -cligner -climat -clivage -cloche -clonage -cloporte -cobalt -cobra -cocasse -cocotier -coder -codifier -coffre -cogner -cohésion -coiffer -coincer -colère -colibri -colline -colmater -colonel -combat -comédie -commande -compact -concert -conduire -confier -congeler -connoter -consonne -contact -convexe -copain -copie -corail -corbeau -cordage -corniche -corpus -correct -cortège -cosmique -costume -coton -coude -coupure -courage -couteau -couvrir -coyote -crabe -crainte -cravate -crayon -créature -créditer -crémeux -creuser -crevette -cribler -crier -cristal -critère -croire -croquer -crotale -crucial -cruel -crypter -cubique -cueillir -cuillère -cuisine -cuivre -culminer -cultiver -cumuler -cupide -curatif -curseur -cyanure -cycle -cylindre -cynique -daigner -damier -danger -danseur -dauphin -débattre -débiter -déborder -débrider -débutant -décaler -décembre -déchirer -décider -déclarer -décorer -décrire -décupler -dédale -déductif -déesse -défensif -défiler -défrayer -dégager -dégivrer -déglutir -dégrafer -déjeuner -délice -déloger -demander -demeurer -démolir -dénicher -dénouer -dentelle -dénuder -départ -dépenser -déphaser -déplacer -déposer -déranger -dérober -désastre -descente -désert -désigner -désobéir -dessiner -destrier -détacher -détester -détourer -détresse -devancer -devenir -deviner -devoir -diable -dialogue -diamant -dicter -différer -digérer -digital -digne -diluer -dimanche -diminuer -dioxyde -directif -diriger -discuter -disposer -dissiper -distance -divertir -diviser -docile -docteur -dogme -doigt -domaine -domicile -dompter -donateur -donjon -donner -dopamine -dortoir -dorure -dosage -doseur -dossier -dotation -douanier -double -douceur -douter -doyen -dragon -draper -dresser -dribbler -droiture -duperie -duplexe -durable -durcir -dynastie -éblouir -écarter -écharpe -échelle -éclairer -éclipse -éclore -écluse -école -économie -écorce -écouter -écraser -écrémer -écrivain -écrou -écume -écureuil -édifier -éduquer -effacer -effectif -effigie -effort -effrayer -effusion -égaliser -égarer -éjecter -élaborer -élargir -électron -élégant -éléphant -élève -éligible -élitisme -éloge -élucider -éluder -emballer -embellir -embryon -émeraude -émission -emmener -émotion -émouvoir -empereur -employer -emporter -emprise -émulsion -encadrer -enchère -enclave -encoche -endiguer -endosser -endroit -enduire -énergie -enfance -enfermer -enfouir -engager -engin -englober -énigme -enjamber -enjeu -enlever -ennemi -ennuyeux -enrichir -enrobage -enseigne -entasser -entendre -entier -entourer -entraver -énumérer -envahir -enviable -envoyer -enzyme -éolien -épaissir -épargne -épatant -épaule -épicerie -épidémie -épier -épilogue -épine -épisode -épitaphe -époque -épreuve -éprouver -épuisant -équerre -équipe -ériger -érosion -erreur -éruption -escalier -espadon -espèce -espiègle -espoir -esprit -esquiver -essayer -essence -essieu -essorer -estime -estomac -estrade -étagère -étaler -étanche -étatique -éteindre -étendoir -éternel -éthanol -éthique -ethnie -étirer -étoffer -étoile -étonnant -étourdir -étrange -étroit -étude -euphorie -évaluer -évasion -éventail -évidence -éviter -évolutif -évoquer -exact -exagérer -exaucer -exceller -excitant -exclusif -excuse -exécuter -exemple -exercer -exhaler -exhorter -exigence -exiler -exister -exotique -expédier -explorer -exposer -exprimer -exquis -extensif -extraire -exulter -fable -fabuleux -facette -facile -facture -faiblir -falaise -fameux -famille -farceur -farfelu -farine -farouche -fasciner -fatal -fatigue -faucon -fautif -faveur -favori -fébrile -féconder -fédérer -félin -femme -fémur -fendoir -féodal -fermer -féroce -ferveur -festival -feuille -feutre -février -fiasco -ficeler -fictif -fidèle -figure -filature -filetage -filière -filleul -filmer -filou -filtrer -financer -finir -fiole -firme -fissure -fixer -flairer -flamme -flasque -flatteur -fléau -flèche -fleur -flexion -flocon -flore -fluctuer -fluide -fluvial -folie -fonderie -fongible -fontaine -forcer -forgeron -formuler -fortune -fossile -foudre -fougère -fouiller -foulure -fourmi -fragile -fraise -franchir -frapper -frayeur -frégate -freiner -frelon -frémir -frénésie -frère -friable -friction -frisson -frivole -froid -fromage -frontal -frotter -fruit -fugitif -fuite -fureur -furieux -furtif -fusion -futur -gagner -galaxie -galerie -gambader -garantir -gardien -garnir -garrigue -gazelle -gazon -géant -gélatine -gélule -gendarme -général -génie -genou -gentil -géologie -géomètre -géranium -germe -gestuel -geyser -gibier -gicler -girafe -givre -glace -glaive -glisser -globe -gloire -glorieux -golfeur -gomme -gonfler -gorge -gorille -goudron -gouffre -goulot -goupille -gourmand -goutte -graduel -graffiti -graine -grand -grappin -gratuit -gravir -grenat -griffure -griller -grimper -grogner -gronder -grotte -groupe -gruger -grutier -gruyère -guépard -guerrier -guide -guimauve -guitare -gustatif -gymnaste -gyrostat -habitude -hachoir -halte -hameau -hangar -hanneton -haricot -harmonie -harpon -hasard -hélium -hématome -herbe -hérisson -hermine -héron -hésiter -heureux -hiberner -hibou -hilarant -histoire -hiver -homard -hommage -homogène -honneur -honorer -honteux -horde -horizon -horloge -hormone -horrible -houleux -housse -hublot -huileux -humain -humble -humide -humour -hurler -hydromel -hygiène -hymne -hypnose -idylle -ignorer -iguane -illicite -illusion -image -imbiber -imiter -immense -immobile -immuable -impact -impérial -implorer -imposer -imprimer -imputer -incarner -incendie -incident -incliner -incolore -indexer -indice -inductif -inédit -ineptie -inexact -infini -infliger -informer -infusion -ingérer -inhaler -inhiber -injecter -injure -innocent -inoculer -inonder -inscrire -insecte -insigne -insolite -inspirer -instinct -insulter -intact -intense -intime -intrigue -intuitif -inutile -invasion -inventer -inviter -invoquer -ironique -irradier -irréel -irriter -isoler -ivoire -ivresse -jaguar -jaillir -jambe -janvier -jardin -jauger -jaune -javelot -jetable -jeton -jeudi -jeunesse -joindre -joncher -jongler -joueur -jouissif -journal -jovial -joyau -joyeux -jubiler -jugement -junior -jupon -juriste -justice -juteux -juvénile -kayak -kimono -kiosque -label -labial -labourer -lacérer -lactose -lagune -laine -laisser -laitier -lambeau -lamelle -lampe -lanceur -langage -lanterne -lapin -largeur -larme -laurier -lavabo -lavoir -lecture -légal -léger -légume -lessive -lettre -levier -lexique -lézard -liasse -libérer -libre -licence -licorne -liège -lièvre -ligature -ligoter -ligue -limer -limite -limonade -limpide -linéaire -lingot -lionceau -liquide -lisière -lister -lithium -litige -littoral -livreur -logique -lointain -loisir -lombric -loterie -louer -lourd -loutre -louve -loyal -lubie -lucide -lucratif -lueur -lugubre -luisant -lumière -lunaire -lundi -luron -lutter -luxueux -machine -magasin -magenta -magique -maigre -maillon -maintien -mairie -maison -majorer -malaxer -maléfice -malheur -malice -mallette -mammouth -mandater -maniable -manquant -manteau -manuel -marathon -marbre -marchand -mardi -maritime -marqueur -marron -marteler -mascotte -massif -matériel -matière -matraque -maudire -maussade -mauve -maximal -méchant -méconnu -médaille -médecin -méditer -méduse -meilleur -mélange -mélodie -membre -mémoire -menacer -mener -menhir -mensonge -mentor -mercredi -mérite -merle -messager -mesure -métal -météore -méthode -métier -meuble -miauler -microbe -miette -mignon -migrer -milieu -million -mimique -mince -minéral -minimal -minorer -minute -miracle -miroiter -missile -mixte -mobile -moderne -moelleux -mondial -moniteur -monnaie -monotone -monstre -montagne -monument -moqueur -morceau -morsure -mortier -moteur -motif -mouche -moufle -moulin -mousson -mouton -mouvant -multiple -munition -muraille -murène -murmure -muscle -muséum -musicien -mutation -muter -mutuel -myriade -myrtille -mystère -mythique -nageur -nappe -narquois -narrer -natation -nation -nature -naufrage -nautique -navire -nébuleux -nectar -néfaste -négation -négliger -négocier -neige -nerveux -nettoyer -neurone -neutron -neveu -niche -nickel -nitrate -niveau -noble -nocif -nocturne -noirceur -noisette -nomade -nombreux -nommer -normatif -notable -notifier -notoire -nourrir -nouveau -novateur -novembre -novice -nuage -nuancer -nuire -nuisible -numéro -nuptial -nuque -nutritif -obéir -objectif -obliger -obscur -observer -obstacle -obtenir -obturer -occasion -occuper -océan -octobre -octroyer -octupler -oculaire -odeur -odorant -offenser -officier -offrir -ogive -oiseau -oisillon -olfactif -olivier -ombrage -omettre -onctueux -onduler -onéreux -onirique -opale -opaque -opérer -opinion -opportun -opprimer -opter -optique -orageux -orange -orbite -ordonner -oreille -organe -orgueil -orifice -ornement -orque -ortie -osciller -osmose -ossature -otarie -ouragan -ourson -outil -outrager -ouvrage -ovation -oxyde -oxygène -ozone -paisible -palace -palmarès -palourde -palper -panache -panda -pangolin -paniquer -panneau -panorama -pantalon -papaye -papier -papoter -papyrus -paradoxe -parcelle -paresse -parfumer -parler -parole -parrain -parsemer -partager -parure -parvenir -passion -pastèque -paternel -patience -patron -pavillon -pavoiser -payer -paysage -peigne -peintre -pelage -pélican -pelle -pelouse -peluche -pendule -pénétrer -pénible -pensif -pénurie -pépite -péplum -perdrix -perforer -période -permuter -perplexe -persil -perte -peser -pétale -petit -pétrir -peuple -pharaon -phobie -phoque -photon -phrase -physique -piano -pictural -pièce -pierre -pieuvre -pilote -pinceau -pipette -piquer -pirogue -piscine -piston -pivoter -pixel -pizza -placard -plafond -plaisir -planer -plaque -plastron -plateau -pleurer -plexus -pliage -plomb -plonger -pluie -plumage -pochette -poésie -poète -pointe -poirier -poisson -poivre -polaire -policier -pollen -polygone -pommade -pompier -ponctuel -pondérer -poney -portique -position -posséder -posture -potager -poteau -potion -pouce -poulain -poumon -pourpre -poussin -pouvoir -prairie -pratique -précieux -prédire -préfixe -prélude -prénom -présence -prétexte -prévoir -primitif -prince -prison -priver -problème -procéder -prodige -profond -progrès -proie -projeter -prologue -promener -propre -prospère -protéger -prouesse -proverbe -prudence -pruneau -psychose -public -puceron -puiser -pulpe -pulsar -punaise -punitif -pupitre -purifier -puzzle -pyramide -quasar -querelle -question -quiétude -quitter -quotient -racine -raconter -radieux -ragondin -raideur -raisin -ralentir -rallonge -ramasser -rapide -rasage -ratisser -ravager -ravin -rayonner -réactif -réagir -réaliser -réanimer -recevoir -réciter -réclamer -récolter -recruter -reculer -recycler -rédiger -redouter -refaire -réflexe -réformer -refrain -refuge -régalien -région -réglage -régulier -réitérer -rejeter -rejouer -relatif -relever -relief -remarque -remède -remise -remonter -remplir -remuer -renard -renfort -renifler -renoncer -rentrer -renvoi -replier -reporter -reprise -reptile -requin -réserve -résineux -résoudre -respect -rester -résultat -rétablir -retenir -réticule -retomber -retracer -réunion -réussir -revanche -revivre -révolte -révulsif -richesse -rideau -rieur -rigide -rigoler -rincer -riposter -risible -risque -rituel -rival -rivière -rocheux -romance -rompre -ronce -rondin -roseau -rosier -rotatif -rotor -rotule -rouge -rouille -rouleau -routine -royaume -ruban -rubis -ruche -ruelle -rugueux -ruiner -ruisseau -ruser -rustique -rythme -sabler -saboter -sabre -sacoche -safari -sagesse -saisir -salade -salive -salon -saluer -samedi -sanction -sanglier -sarcasme -sardine -saturer -saugrenu -saumon -sauter -sauvage -savant -savonner -scalpel -scandale -scélérat -scénario -sceptre -schéma -science -scinder -score -scrutin -sculpter -séance -sécable -sécher -secouer -sécréter -sédatif -séduire -seigneur -séjour -sélectif -semaine -sembler -semence -séminal -sénateur -sensible -sentence -séparer -séquence -serein -sergent -sérieux -serrure -sérum -service -sésame -sévir -sevrage -sextuple -sidéral -siècle -siéger -siffler -sigle -signal -silence -silicium -simple -sincère -sinistre -siphon -sirop -sismique -situer -skier -social -socle -sodium -soigneux -soldat -soleil -solitude -soluble -sombre -sommeil -somnoler -sonde -songeur -sonnette -sonore -sorcier -sortir -sosie -sottise -soucieux -soudure -souffle -soulever -soupape -source -soutirer -souvenir -spacieux -spatial -spécial -sphère -spiral -stable -station -sternum -stimulus -stipuler -strict -studieux -stupeur -styliste -sublime -substrat -subtil -subvenir -succès -sucre -suffixe -suggérer -suiveur -sulfate -superbe -supplier -surface -suricate -surmener -surprise -sursaut -survie -suspect -syllabe -symbole -symétrie -synapse -syntaxe -système -tabac -tablier -tactile -tailler -talent -talisman -talonner -tambour -tamiser -tangible -tapis -taquiner -tarder -tarif -tartine -tasse -tatami -tatouage -taupe -taureau -taxer -témoin -temporel -tenaille -tendre -teneur -tenir -tension -terminer -terne -terrible -tétine -texte -thème -théorie -thérapie -thorax -tibia -tiède -timide -tirelire -tiroir -tissu -titane -titre -tituber -toboggan -tolérant -tomate -tonique -tonneau -toponyme -torche -tordre -tornade -torpille -torrent -torse -tortue -totem -toucher -tournage -tousser -toxine -traction -trafic -tragique -trahir -train -trancher -travail -trèfle -tremper -trésor -treuil -triage -tribunal -tricoter -trilogie -triomphe -tripler -triturer -trivial -trombone -tronc -tropical -troupeau -tuile -tulipe -tumulte -tunnel -turbine -tuteur -tutoyer -tuyau -tympan -typhon -typique -tyran -ubuesque -ultime -ultrason -unanime -unifier -union -unique -unitaire -univers -uranium -urbain -urticant -usage -usine -usuel -usure -utile -utopie -vacarme -vaccin -vagabond -vague -vaillant -vaincre -vaisseau -valable -valise -vallon -valve -vampire -vanille -vapeur -varier -vaseux -vassal -vaste -vecteur -vedette -végétal -véhicule -veinard -véloce -vendredi -vénérer -venger -venimeux -ventouse -verdure -vérin -vernir -verrou -verser -vertu -veston -vétéran -vétuste -vexant -vexer -viaduc -viande -victoire -vidange -vidéo -vignette -vigueur -vilain -village -vinaigre -violon -vipère -virement -virtuose -virus -visage -viseur -vision -visqueux -visuel -vital -vitesse -viticole -vitrine -vivace -vivipare -vocation -voguer -voile -voisin -voiture -volaille -volcan -voltiger -volume -vorace -vortex -voter -vouloir -voyage -voyelle -wagon -xénon -yacht -zèbre -zénith -zeste -zoologie`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.js deleted file mode 100644 index 7eabb0e4..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/italian.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `abaco -abbaglio -abbinato -abete -abisso -abolire -abrasivo -abrogato -accadere -accenno -accusato -acetone -achille -acido -acqua -acre -acrilico -acrobata -acuto -adagio -addebito -addome -adeguato -aderire -adipe -adottare -adulare -affabile -affetto -affisso -affranto -aforisma -afoso -africano -agave -agente -agevole -aggancio -agire -agitare -agonismo -agricolo -agrumeto -aguzzo -alabarda -alato -albatro -alberato -albo -albume -alce -alcolico -alettone -alfa -algebra -aliante -alibi -alimento -allagato -allegro -allievo -allodola -allusivo -almeno -alogeno -alpaca -alpestre -altalena -alterno -alticcio -altrove -alunno -alveolo -alzare -amalgama -amanita -amarena -ambito -ambrato -ameba -america -ametista -amico -ammasso -ammenda -ammirare -ammonito -amore -ampio -ampliare -amuleto -anacardo -anagrafe -analista -anarchia -anatra -anca -ancella -ancora -andare -andrea -anello -angelo -angolare -angusto -anima -annegare -annidato -anno -annuncio -anonimo -anticipo -anzi -apatico -apertura -apode -apparire -appetito -appoggio -approdo -appunto -aprile -arabica -arachide -aragosta -araldica -arancio -aratura -arazzo -arbitro -archivio -ardito -arenile -argento -argine -arguto -aria -armonia -arnese -arredato -arringa -arrosto -arsenico -arso -artefice -arzillo -asciutto -ascolto -asepsi -asettico -asfalto -asino -asola -aspirato -aspro -assaggio -asse -assoluto -assurdo -asta -astenuto -astice -astratto -atavico -ateismo -atomico -atono -attesa -attivare -attorno -attrito -attuale -ausilio -austria -autista -autonomo -autunno -avanzato -avere -avvenire -avviso -avvolgere -azione -azoto -azzimo -azzurro -babele -baccano -bacino -baco -badessa -badilata -bagnato -baita -balcone -baldo -balena -ballata -balzano -bambino -bandire -baraonda -barbaro -barca -baritono -barlume -barocco -basilico -basso -batosta -battuto -baule -bava -bavosa -becco -beffa -belgio -belva -benda -benevole -benigno -benzina -bere -berlina -beta -bibita -bici -bidone -bifido -biga -bilancia -bimbo -binocolo -biologo -bipede -bipolare -birbante -birra -biscotto -bisesto -bisnonno -bisonte -bisturi -bizzarro -blando -blatta -bollito -bonifico -bordo -bosco -botanico -bottino -bozzolo -braccio -bradipo -brama -branca -bravura -bretella -brevetto -brezza -briglia -brillante -brindare -broccolo -brodo -bronzina -brullo -bruno -bubbone -buca -budino -buffone -buio -bulbo -buono -burlone -burrasca -bussola -busta -cadetto -caduco -calamaro -calcolo -calesse -calibro -calmo -caloria -cambusa -camerata -camicia -cammino -camola -campale -canapa -candela -cane -canino -canotto -cantina -capace -capello -capitolo -capogiro -cappero -capra -capsula -carapace -carcassa -cardo -carisma -carovana -carretto -cartolina -casaccio -cascata -caserma -caso -cassone -castello -casuale -catasta -catena -catrame -cauto -cavillo -cedibile -cedrata -cefalo -celebre -cellulare -cena -cenone -centesimo -ceramica -cercare -certo -cerume -cervello -cesoia -cespo -ceto -chela -chiaro -chicca -chiedere -chimera -china -chirurgo -chitarra -ciao -ciclismo -cifrare -cigno -cilindro -ciottolo -circa -cirrosi -citrico -cittadino -ciuffo -civetta -civile -classico -clinica -cloro -cocco -codardo -codice -coerente -cognome -collare -colmato -colore -colposo -coltivato -colza -coma -cometa -commando -comodo -computer -comune -conciso -condurre -conferma -congelare -coniuge -connesso -conoscere -consumo -continuo -convegno -coperto -copione -coppia -copricapo -corazza -cordata -coricato -cornice -corolla -corpo -corredo -corsia -cortese -cosmico -costante -cottura -covato -cratere -cravatta -creato -credere -cremoso -crescita -creta -criceto -crinale -crisi -critico -croce -cronaca -crostata -cruciale -crusca -cucire -cuculo -cugino -cullato -cupola -curatore -cursore -curvo -cuscino -custode -dado -daino -dalmata -damerino -daniela -dannoso -danzare -datato -davanti -davvero -debutto -decennio -deciso -declino -decollo -decreto -dedicato -definito -deforme -degno -delegare -delfino -delirio -delta -demenza -denotato -dentro -deposito -derapata -derivare -deroga -descritto -deserto -desiderio -desumere -detersivo -devoto -diametro -dicembre -diedro -difeso -diffuso -digerire -digitale -diluvio -dinamico -dinnanzi -dipinto -diploma -dipolo -diradare -dire -dirotto -dirupo -disagio -discreto -disfare -disgelo -disposto -distanza -disumano -dito -divano -divelto -dividere -divorato -doblone -docente -doganale -dogma -dolce -domato -domenica -dominare -dondolo -dono -dormire -dote -dottore -dovuto -dozzina -drago -druido -dubbio -dubitare -ducale -duna -duomo -duplice -duraturo -ebano -eccesso -ecco -eclissi -economia -edera -edicola -edile -editoria -educare -egemonia -egli -egoismo -egregio -elaborato -elargire -elegante -elencato -eletto -elevare -elfico -elica -elmo -elsa -eluso -emanato -emblema -emesso -emiro -emotivo -emozione -empirico -emulo -endemico -enduro -energia -enfasi -enoteca -entrare -enzima -epatite -epilogo -episodio -epocale -eppure -equatore -erario -erba -erboso -erede -eremita -erigere -ermetico -eroe -erosivo -errante -esagono -esame -esanime -esaudire -esca -esempio -esercito -esibito -esigente -esistere -esito -esofago -esortato -esoso -espanso -espresso -essenza -esso -esteso -estimare -estonia -estroso -esultare -etilico -etnico -etrusco -etto -euclideo -europa -evaso -evidenza -evitato -evoluto -evviva -fabbrica -faccenda -fachiro -falco -famiglia -fanale -fanfara -fango -fantasma -fare -farfalla -farinoso -farmaco -fascia -fastoso -fasullo -faticare -fato -favoloso -febbre -fecola -fede -fegato -felpa -feltro -femmina -fendere -fenomeno -fermento -ferro -fertile -fessura -festivo -fetta -feudo -fiaba -fiducia -fifa -figurato -filo -finanza -finestra -finire -fiore -fiscale -fisico -fiume -flacone -flamenco -flebo -flemma -florido -fluente -fluoro -fobico -focaccia -focoso -foderato -foglio -folata -folclore -folgore -fondente -fonetico -fonia -fontana -forbito -forchetta -foresta -formica -fornaio -foro -fortezza -forzare -fosfato -fosso -fracasso -frana -frassino -fratello -freccetta -frenata -fresco -frigo -frollino -fronde -frugale -frutta -fucilata -fucsia -fuggente -fulmine -fulvo -fumante -fumetto -fumoso -fune -funzione -fuoco -furbo -furgone -furore -fuso -futile -gabbiano -gaffe -galateo -gallina -galoppo -gambero -gamma -garanzia -garbo -garofano -garzone -gasdotto -gasolio -gastrico -gatto -gaudio -gazebo -gazzella -geco -gelatina -gelso -gemello -gemmato -gene -genitore -gennaio -genotipo -gergo -ghepardo -ghiaccio -ghisa -giallo -gilda -ginepro -giocare -gioiello -giorno -giove -girato -girone -gittata -giudizio -giurato -giusto -globulo -glutine -gnomo -gobba -golf -gomito -gommone -gonfio -gonna -governo -gracile -grado -grafico -grammo -grande -grattare -gravoso -grazia -greca -gregge -grifone -grigio -grinza -grotta -gruppo -guadagno -guaio -guanto -guardare -gufo -guidare -ibernato -icona -identico -idillio -idolo -idra -idrico -idrogeno -igiene -ignaro -ignorato -ilare -illeso -illogico -illudere -imballo -imbevuto -imbocco -imbuto -immane -immerso -immolato -impacco -impeto -impiego -importo -impronta -inalare -inarcare -inattivo -incanto -incendio -inchino -incisivo -incluso -incontro -incrocio -incubo -indagine -india -indole -inedito -infatti -infilare -inflitto -ingaggio -ingegno -inglese -ingordo -ingrosso -innesco -inodore -inoltrare -inondato -insano -insetto -insieme -insonnia -insulina -intasato -intero -intonaco -intuito -inumidire -invalido -invece -invito -iperbole -ipnotico -ipotesi -ippica -iride -irlanda -ironico -irrigato -irrorare -isolato -isotopo -isterico -istituto -istrice -italia -iterare -labbro -labirinto -lacca -lacerato -lacrima -lacuna -laddove -lago -lampo -lancetta -lanterna -lardoso -larga -laringe -lastra -latenza -latino -lattuga -lavagna -lavoro -legale -leggero -lembo -lentezza -lenza -leone -lepre -lesivo -lessato -lesto -letterale -leva -levigato -libero -lido -lievito -lilla -limatura -limitare -limpido -lineare -lingua -liquido -lira -lirica -lisca -lite -litigio -livrea -locanda -lode -logica -lombare -londra -longevo -loquace -lorenzo -loto -lotteria -luce -lucidato -lumaca -luminoso -lungo -lupo -luppolo -lusinga -lusso -lutto -macabro -macchina -macero -macinato -madama -magico -maglia -magnete -magro -maiolica -malafede -malgrado -malinteso -malsano -malto -malumore -mana -mancia -mandorla -mangiare -manifesto -mannaro -manovra -mansarda -mantide -manubrio -mappa -maratona -marcire -maretta -marmo -marsupio -maschera -massaia -mastino -materasso -matricola -mattone -maturo -mazurca -meandro -meccanico -mecenate -medesimo -meditare -mega -melassa -melis -melodia -meninge -meno -mensola -mercurio -merenda -merlo -meschino -mese -messere -mestolo -metallo -metodo -mettere -miagolare -mica -micelio -michele -microbo -midollo -miele -migliore -milano -milite -mimosa -minerale -mini -minore -mirino -mirtillo -miscela -missiva -misto -misurare -mitezza -mitigare -mitra -mittente -mnemonico -modello -modifica -modulo -mogano -mogio -mole -molosso -monastero -monco -mondina -monetario -monile -monotono -monsone -montato -monviso -mora -mordere -morsicato -mostro -motivato -motosega -motto -movenza -movimento -mozzo -mucca -mucosa -muffa -mughetto -mugnaio -mulatto -mulinello -multiplo -mummia -munto -muovere -murale -musa -muscolo -musica -mutevole -muto -nababbo -nafta -nanometro -narciso -narice -narrato -nascere -nastrare -naturale -nautica -naviglio -nebulosa -necrosi -negativo -negozio -nemmeno -neofita -neretto -nervo -nessuno -nettuno -neutrale -neve -nevrotico -nicchia -ninfa -nitido -nobile -nocivo -nodo -nome -nomina -nordico -normale -norvegese -nostrano -notare -notizia -notturno -novella -nucleo -nulla -numero -nuovo -nutrire -nuvola -nuziale -oasi -obbedire -obbligo -obelisco -oblio -obolo -obsoleto -occasione -occhio -occidente -occorrere -occultare -ocra -oculato -odierno -odorare -offerta -offrire -offuscato -oggetto -oggi -ognuno -olandese -olfatto -oliato -oliva -ologramma -oltre -omaggio -ombelico -ombra -omega -omissione -ondoso -onere -onice -onnivoro -onorevole -onta -operato -opinione -opposto -oracolo -orafo -ordine -orecchino -orefice -orfano -organico -origine -orizzonte -orma -ormeggio -ornativo -orologio -orrendo -orribile -ortensia -ortica -orzata -orzo -osare -oscurare -osmosi -ospedale -ospite -ossa -ossidare -ostacolo -oste -otite -otre -ottagono -ottimo -ottobre -ovale -ovest -ovino -oviparo -ovocito -ovunque -ovviare -ozio -pacchetto -pace -pacifico -padella -padrone -paese -paga -pagina -palazzina -palesare -pallido -palo -palude -pandoro -pannello -paolo -paonazzo -paprica -parabola -parcella -parere -pargolo -pari -parlato -parola -partire -parvenza -parziale -passivo -pasticca -patacca -patologia -pattume -pavone -peccato -pedalare -pedonale -peggio -peloso -penare -pendice -penisola -pennuto -penombra -pensare -pentola -pepe -pepita -perbene -percorso -perdonato -perforare -pergamena -periodo -permesso -perno -perplesso -persuaso -pertugio -pervaso -pesatore -pesista -peso -pestifero -petalo -pettine -petulante -pezzo -piacere -pianta -piattino -piccino -picozza -piega -pietra -piffero -pigiama -pigolio -pigro -pila -pilifero -pillola -pilota -pimpante -pineta -pinna -pinolo -pioggia -piombo -piramide -piretico -pirite -pirolisi -pitone -pizzico -placebo -planare -plasma -platano -plenario -pochezza -poderoso -podismo -poesia -poggiare -polenta -poligono -pollice -polmonite -polpetta -polso -poltrona -polvere -pomice -pomodoro -ponte -popoloso -porfido -poroso -porpora -porre -portata -posa -positivo -possesso -postulato -potassio -potere -pranzo -prassi -pratica -precluso -predica -prefisso -pregiato -prelievo -premere -prenotare -preparato -presenza -pretesto -prevalso -prima -principe -privato -problema -procura -produrre -profumo -progetto -prolunga -promessa -pronome -proposta -proroga -proteso -prova -prudente -prugna -prurito -psiche -pubblico -pudica -pugilato -pugno -pulce -pulito -pulsante -puntare -pupazzo -pupilla -puro -quadro -qualcosa -quasi -querela -quota -raccolto -raddoppio -radicale -radunato -raffica -ragazzo -ragione -ragno -ramarro -ramingo -ramo -randagio -rantolare -rapato -rapina -rappreso -rasatura -raschiato -rasente -rassegna -rastrello -rata -ravveduto -reale -recepire -recinto -recluta -recondito -recupero -reddito -redimere -regalato -registro -regola -regresso -relazione -remare -remoto -renna -replica -reprimere -reputare -resa -residente -responso -restauro -rete -retina -retorica -rettifica -revocato -riassunto -ribadire -ribelle -ribrezzo -ricarica -ricco -ricevere -riciclato -ricordo -ricreduto -ridicolo -ridurre -rifasare -riflesso -riforma -rifugio -rigare -rigettato -righello -rilassato -rilevato -rimanere -rimbalzo -rimedio -rimorchio -rinascita -rincaro -rinforzo -rinnovo -rinomato -rinsavito -rintocco -rinuncia -rinvenire -riparato -ripetuto -ripieno -riportare -ripresa -ripulire -risata -rischio -riserva -risibile -riso -rispetto -ristoro -risultato -risvolto -ritardo -ritegno -ritmico -ritrovo -riunione -riva -riverso -rivincita -rivolto -rizoma -roba -robotico -robusto -roccia -roco -rodaggio -rodere -roditore -rogito -rollio -romantico -rompere -ronzio -rosolare -rospo -rotante -rotondo -rotula -rovescio -rubizzo -rubrica -ruga -rullino -rumine -rumoroso -ruolo -rupe -russare -rustico -sabato -sabbiare -sabotato -sagoma -salasso -saldatura -salgemma -salivare -salmone -salone -saltare -saluto -salvo -sapere -sapido -saporito -saraceno -sarcasmo -sarto -sassoso -satellite -satira -satollo -saturno -savana -savio -saziato -sbadiglio -sbalzo -sbancato -sbarra -sbattere -sbavare -sbendare -sbirciare -sbloccato -sbocciato -sbrinare -sbruffone -sbuffare -scabroso -scadenza -scala -scambiare -scandalo -scapola -scarso -scatenare -scavato -scelto -scenico -scettro -scheda -schiena -sciarpa -scienza -scindere -scippo -sciroppo -scivolo -sclerare -scodella -scolpito -scomparto -sconforto -scoprire -scorta -scossone -scozzese -scriba -scrollare -scrutinio -scuderia -scultore -scuola -scuro -scusare -sdebitare -sdoganare -seccatura -secondo -sedano -seggiola -segnalato -segregato -seguito -selciato -selettivo -sella -selvaggio -semaforo -sembrare -seme -seminato -sempre -senso -sentire -sepolto -sequenza -serata -serbato -sereno -serio -serpente -serraglio -servire -sestina -setola -settimana -sfacelo -sfaldare -sfamato -sfarzoso -sfaticato -sfera -sfida -sfilato -sfinge -sfocato -sfoderare -sfogo -sfoltire -sforzato -sfratto -sfruttato -sfuggito -sfumare -sfuso -sgabello -sgarbato -sgonfiare -sgorbio -sgrassato -sguardo -sibilo -siccome -sierra -sigla -signore -silenzio -sillaba -simbolo -simpatico -simulato -sinfonia -singolo -sinistro -sino -sintesi -sinusoide -sipario -sisma -sistole -situato -slitta -slogatura -sloveno -smarrito -smemorato -smentito -smeraldo -smilzo -smontare -smottato -smussato -snellire -snervato -snodo -sobbalzo -sobrio -soccorso -sociale -sodale -soffitto -sogno -soldato -solenne -solido -sollazzo -solo -solubile -solvente -somatico -somma -sonda -sonetto -sonnifero -sopire -soppeso -sopra -sorgere -sorpasso -sorriso -sorso -sorteggio -sorvolato -sospiro -sosta -sottile -spada -spalla -spargere -spatola -spavento -spazzola -specie -spedire -spegnere -spelatura -speranza -spessore -spettrale -spezzato -spia -spigoloso -spillato -spinoso -spirale -splendido -sportivo -sposo -spranga -sprecare -spronato -spruzzo -spuntino -squillo -sradicare -srotolato -stabile -stacco -staffa -stagnare -stampato -stantio -starnuto -stasera -statuto -stelo -steppa -sterzo -stiletto -stima -stirpe -stivale -stizzoso -stonato -storico -strappo -stregato -stridulo -strozzare -strutto -stuccare -stufo -stupendo -subentro -succoso -sudore -suggerito -sugo -sultano -suonare -superbo -supporto -surgelato -surrogato -sussurro -sutura -svagare -svedese -sveglio -svelare -svenuto -svezia -sviluppo -svista -svizzera -svolta -svuotare -tabacco -tabulato -tacciare -taciturno -tale -talismano -tampone -tannino -tara -tardivo -targato -tariffa -tarpare -tartaruga -tasto -tattico -taverna -tavolata -tazza -teca -tecnico -telefono -temerario -tempo -temuto -tendone -tenero -tensione -tentacolo -teorema -terme -terrazzo -terzetto -tesi -tesserato -testato -tetro -tettoia -tifare -tigella -timbro -tinto -tipico -tipografo -tiraggio -tiro -titanio -titolo -titubante -tizio -tizzone -toccare -tollerare -tolto -tombola -tomo -tonfo -tonsilla -topazio -topologia -toppa -torba -tornare -torrone -tortora -toscano -tossire -tostatura -totano -trabocco -trachea -trafila -tragedia -tralcio -tramonto -transito -trapano -trarre -trasloco -trattato -trave -treccia -tremolio -trespolo -tributo -tricheco -trifoglio -trillo -trincea -trio -tristezza -triturato -trivella -tromba -trono -troppo -trottola -trovare -truccato -tubatura -tuffato -tulipano -tumulto -tunisia -turbare -turchino -tuta -tutela -ubicato -uccello -uccisore -udire -uditivo -uffa -ufficio -uguale -ulisse -ultimato -umano -umile -umorismo -uncinetto -ungere -ungherese -unicorno -unificato -unisono -unitario -unte -uovo -upupa -uragano -urgenza -urlo -usanza -usato -uscito -usignolo -usuraio -utensile -utilizzo -utopia -vacante -vaccinato -vagabondo -vagliato -valanga -valgo -valico -valletta -valoroso -valutare -valvola -vampata -vangare -vanitoso -vano -vantaggio -vanvera -vapore -varano -varcato -variante -vasca -vedetta -vedova -veduto -vegetale -veicolo -velcro -velina -velluto -veloce -venato -vendemmia -vento -verace -verbale -vergogna -verifica -vero -verruca -verticale -vescica -vessillo -vestale -veterano -vetrina -vetusto -viandante -vibrante -vicenda -vichingo -vicinanza -vidimare -vigilia -vigneto -vigore -vile -villano -vimini -vincitore -viola -vipera -virgola -virologo -virulento -viscoso -visione -vispo -vissuto -visura -vita -vitello -vittima -vivanda -vivido -viziare -voce -voga -volatile -volere -volpe -voragine -vulcano -zampogna -zanna -zappato -zattera -zavorra -zefiro -zelante -zelo -zenzero -zerbino -zibetto -zinco -zircone -zitto -zolla -zotico -zucchero -zufolo -zulu -zuppa`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.js deleted file mode 100644 index 82eda6be..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/japanese.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `あいこくしん -あいさつ -あいだ -あおぞら -あかちゃん -あきる -あけがた -あける -あこがれる -あさい -あさひ -あしあと -あじわう -あずかる -あずき -あそぶ -あたえる -あたためる -あたりまえ -あたる -あつい -あつかう -あっしゅく -あつまり -あつめる -あてな -あてはまる -あひる -あぶら -あぶる -あふれる -あまい -あまど -あまやかす -あまり -あみもの -あめりか -あやまる -あゆむ -あらいぐま -あらし -あらすじ -あらためる -あらゆる -あらわす -ありがとう -あわせる -あわてる -あんい -あんがい -あんこ -あんぜん -あんてい -あんない -あんまり -いいだす -いおん -いがい -いがく -いきおい -いきなり -いきもの -いきる -いくじ -いくぶん -いけばな -いけん -いこう -いこく -いこつ -いさましい -いさん -いしき -いじゅう -いじょう -いじわる -いずみ -いずれ -いせい -いせえび -いせかい -いせき -いぜん -いそうろう -いそがしい -いだい -いだく -いたずら -いたみ -いたりあ -いちおう -いちじ -いちど -いちば -いちぶ -いちりゅう -いつか -いっしゅん -いっせい -いっそう -いったん -いっち -いってい -いっぽう -いてざ -いてん -いどう -いとこ -いない -いなか -いねむり -いのち -いのる -いはつ -いばる -いはん -いびき -いひん -いふく -いへん -いほう -いみん -いもうと -いもたれ -いもり -いやがる -いやす -いよかん -いよく -いらい -いらすと -いりぐち -いりょう -いれい -いれもの -いれる -いろえんぴつ -いわい -いわう -いわかん -いわば -いわゆる -いんげんまめ -いんさつ -いんしょう -いんよう -うえき -うえる -うおざ -うがい -うかぶ -うかべる -うきわ -うくらいな -うくれれ -うけたまわる -うけつけ -うけとる -うけもつ -うける -うごかす -うごく -うこん -うさぎ -うしなう -うしろがみ -うすい -うすぎ -うすぐらい -うすめる -うせつ -うちあわせ -うちがわ -うちき -うちゅう -うっかり -うつくしい -うったえる -うつる -うどん -うなぎ -うなじ -うなずく -うなる -うねる -うのう -うぶげ -うぶごえ -うまれる -うめる -うもう -うやまう -うよく -うらがえす -うらぐち -うらない -うりあげ -うりきれ -うるさい -うれしい -うれゆき -うれる -うろこ -うわき -うわさ -うんこう -うんちん -うんてん -うんどう -えいえん -えいが -えいきょう -えいご -えいせい -えいぶん -えいよう -えいわ -えおり -えがお -えがく -えきたい -えくせる -えしゃく -えすて -えつらん -えのぐ -えほうまき -えほん -えまき -えもじ -えもの -えらい -えらぶ -えりあ -えんえん -えんかい -えんぎ -えんげき -えんしゅう -えんぜつ -えんそく -えんちょう -えんとつ -おいかける -おいこす -おいしい -おいつく -おうえん -おうさま -おうじ -おうせつ -おうたい -おうふく -おうべい -おうよう -おえる -おおい -おおう -おおどおり -おおや -おおよそ -おかえり -おかず -おがむ -おかわり -おぎなう -おきる -おくさま -おくじょう -おくりがな -おくる -おくれる -おこす -おこなう -おこる -おさえる -おさない -おさめる -おしいれ -おしえる -おじぎ -おじさん -おしゃれ -おそらく -おそわる -おたがい -おたく -おだやか -おちつく -おっと -おつり -おでかけ -おとしもの -おとなしい -おどり -おどろかす -おばさん -おまいり -おめでとう -おもいで -おもう -おもたい -おもちゃ -おやつ -おやゆび -およぼす -おらんだ -おろす -おんがく -おんけい -おんしゃ -おんせん -おんだん -おんちゅう -おんどけい -かあつ -かいが -がいき -がいけん -がいこう -かいさつ -かいしゃ -かいすいよく -かいぜん -かいぞうど -かいつう -かいてん -かいとう -かいふく -がいへき -かいほう -かいよう -がいらい -かいわ -かえる -かおり -かかえる -かがく -かがし -かがみ -かくご -かくとく -かざる -がぞう -かたい -かたち -がちょう -がっきゅう -がっこう -がっさん -がっしょう -かなざわし -かのう -がはく -かぶか -かほう -かほご -かまう -かまぼこ -かめれおん -かゆい -かようび -からい -かるい -かろう -かわく -かわら -がんか -かんけい -かんこう -かんしゃ -かんそう -かんたん -かんち -がんばる -きあい -きあつ -きいろ -ぎいん -きうい -きうん -きえる -きおう -きおく -きおち -きおん -きかい -きかく -きかんしゃ -ききて -きくばり -きくらげ -きけんせい -きこう -きこえる -きこく -きさい -きさく -きさま -きさらぎ -ぎじかがく -ぎしき -ぎじたいけん -ぎじにってい -ぎじゅつしゃ -きすう -きせい -きせき -きせつ -きそう -きぞく -きぞん -きたえる -きちょう -きつえん -ぎっちり -きつつき -きつね -きてい -きどう -きどく -きない -きなが -きなこ -きぬごし -きねん -きのう -きのした -きはく -きびしい -きひん -きふく -きぶん -きぼう -きほん -きまる -きみつ -きむずかしい -きめる -きもだめし -きもち -きもの -きゃく -きやく -ぎゅうにく -きよう -きょうりゅう -きらい -きらく -きりん -きれい -きれつ -きろく -ぎろん -きわめる -ぎんいろ -きんかくじ -きんじょ -きんようび -ぐあい -くいず -くうかん -くうき -くうぐん -くうこう -ぐうせい -くうそう -ぐうたら -くうふく -くうぼ -くかん -くきょう -くげん -ぐこう -くさい -くさき -くさばな -くさる -くしゃみ -くしょう -くすのき -くすりゆび -くせげ -くせん -ぐたいてき -くださる -くたびれる -くちこみ -くちさき -くつした -ぐっすり -くつろぐ -くとうてん -くどく -くなん -くねくね -くのう -くふう -くみあわせ -くみたてる -くめる -くやくしょ -くらす -くらべる -くるま -くれる -くろう -くわしい -ぐんかん -ぐんしょく -ぐんたい -ぐんて -けあな -けいかく -けいけん -けいこ -けいさつ -げいじゅつ -けいたい -げいのうじん -けいれき -けいろ -けおとす -けおりもの -げきか -げきげん -げきだん -げきちん -げきとつ -げきは -げきやく -げこう -げこくじょう -げざい -けさき -げざん -けしき -けしごむ -けしょう -げすと -けたば -けちゃっぷ -けちらす -けつあつ -けつい -けつえき -けっこん -けつじょ -けっせき -けってい -けつまつ -げつようび -げつれい -けつろん -げどく -けとばす -けとる -けなげ -けなす -けなみ -けぬき -げねつ -けねん -けはい -げひん -けぶかい -げぼく -けまり -けみかる -けむし -けむり -けもの -けらい -けろけろ -けわしい -けんい -けんえつ -けんお -けんか -げんき -けんげん -けんこう -けんさく -けんしゅう -けんすう -げんそう -けんちく -けんてい -けんとう -けんない -けんにん -げんぶつ -けんま -けんみん -けんめい -けんらん -けんり -こあくま -こいぬ -こいびと -ごうい -こうえん -こうおん -こうかん -ごうきゅう -ごうけい -こうこう -こうさい -こうじ -こうすい -ごうせい -こうそく -こうたい -こうちゃ -こうつう -こうてい -こうどう -こうない -こうはい -ごうほう -ごうまん -こうもく -こうりつ -こえる -こおり -ごかい -ごがつ -ごかん -こくご -こくさい -こくとう -こくない -こくはく -こぐま -こけい -こける -ここのか -こころ -こさめ -こしつ -こすう -こせい -こせき -こぜん -こそだて -こたい -こたえる -こたつ -こちょう -こっか -こつこつ -こつばん -こつぶ -こてい -こてん -ことがら -ことし -ことば -ことり -こなごな -こねこね -このまま -このみ -このよ -ごはん -こひつじ -こふう -こふん -こぼれる -ごまあぶら -こまかい -ごますり -こまつな -こまる -こむぎこ -こもじ -こもち -こもの -こもん -こやく -こやま -こゆう -こゆび -こよい -こよう -こりる -これくしょん -ころっけ -こわもて -こわれる -こんいん -こんかい -こんき -こんしゅう -こんすい -こんだて -こんとん -こんなん -こんびに -こんぽん -こんまけ -こんや -こんれい -こんわく -ざいえき -さいかい -さいきん -ざいげん -ざいこ -さいしょ -さいせい -ざいたく -ざいちゅう -さいてき -ざいりょう -さうな -さかいし -さがす -さかな -さかみち -さがる -さぎょう -さくし -さくひん -さくら -さこく -さこつ -さずかる -ざせき -さたん -さつえい -ざつおん -ざっか -ざつがく -さっきょく -ざっし -さつじん -ざっそう -さつたば -さつまいも -さてい -さといも -さとう -さとおや -さとし -さとる -さのう -さばく -さびしい -さべつ -さほう -さほど -さます -さみしい -さみだれ -さむけ -さめる -さやえんどう -さゆう -さよう -さよく -さらだ -ざるそば -さわやか -さわる -さんいん -さんか -さんきゃく -さんこう -さんさい -ざんしょ -さんすう -さんせい -さんそ -さんち -さんま -さんみ -さんらん -しあい -しあげ -しあさって -しあわせ -しいく -しいん -しうち -しえい -しおけ -しかい -しかく -じかん -しごと -しすう -じだい -したうけ -したぎ -したて -したみ -しちょう -しちりん -しっかり -しつじ -しつもん -してい -してき -してつ -じてん -じどう -しなぎれ -しなもの -しなん -しねま -しねん -しのぐ -しのぶ -しはい -しばかり -しはつ -しはらい -しはん -しひょう -しふく -じぶん -しへい -しほう -しほん -しまう -しまる -しみん -しむける -じむしょ -しめい -しめる -しもん -しゃいん -しゃうん -しゃおん -じゃがいも -しやくしょ -しゃくほう -しゃけん -しゃこ -しゃざい -しゃしん -しゃせん -しゃそう -しゃたい -しゃちょう -しゃっきん -じゃま -しゃりん -しゃれい -じゆう -じゅうしょ -しゅくはく -じゅしん -しゅっせき -しゅみ -しゅらば -じゅんばん -しょうかい -しょくたく -しょっけん -しょどう -しょもつ -しらせる -しらべる -しんか -しんこう -じんじゃ -しんせいじ -しんちく -しんりん -すあげ -すあし -すあな -ずあん -すいえい -すいか -すいとう -ずいぶん -すいようび -すうがく -すうじつ -すうせん -すおどり -すきま -すくう -すくない -すける -すごい -すこし -ずさん -すずしい -すすむ -すすめる -すっかり -ずっしり -ずっと -すてき -すてる -すねる -すのこ -すはだ -すばらしい -ずひょう -ずぶぬれ -すぶり -すふれ -すべて -すべる -ずほう -すぼん -すまい -すめし -すもう -すやき -すらすら -するめ -すれちがう -すろっと -すわる -すんぜん -すんぽう -せあぶら -せいかつ -せいげん -せいじ -せいよう -せおう -せかいかん -せきにん -せきむ -せきゆ -せきらんうん -せけん -せこう -せすじ -せたい -せたけ -せっかく -せっきゃく -ぜっく -せっけん -せっこつ -せっさたくま -せつぞく -せつだん -せつでん -せっぱん -せつび -せつぶん -せつめい -せつりつ -せなか -せのび -せはば -せびろ -せぼね -せまい -せまる -せめる -せもたれ -せりふ -ぜんあく -せんい -せんえい -せんか -せんきょ -せんく -せんげん -ぜんご -せんさい -せんしゅ -せんすい -せんせい -せんぞ -せんたく -せんちょう -せんてい -せんとう -せんぬき -せんねん -せんぱい -ぜんぶ -ぜんぽう -せんむ -せんめんじょ -せんもん -せんやく -せんゆう -せんよう -ぜんら -ぜんりゃく -せんれい -せんろ -そあく -そいとげる -そいね -そうがんきょう -そうき -そうご -そうしん -そうだん -そうなん -そうび -そうめん -そうり -そえもの -そえん -そがい -そげき -そこう -そこそこ -そざい -そしな -そせい -そせん -そそぐ -そだてる -そつう -そつえん -そっかん -そつぎょう -そっけつ -そっこう -そっせん -そっと -そとがわ -そとづら -そなえる -そなた -そふぼ -そぼく -そぼろ -そまつ -そまる -そむく -そむりえ -そめる -そもそも -そよかぜ -そらまめ -そろう -そんかい -そんけい -そんざい -そんしつ -そんぞく -そんちょう -ぞんび -ぞんぶん -そんみん -たあい -たいいん -たいうん -たいえき -たいおう -だいがく -たいき -たいぐう -たいけん -たいこ -たいざい -だいじょうぶ -だいすき -たいせつ -たいそう -だいたい -たいちょう -たいてい -だいどころ -たいない -たいねつ -たいのう -たいはん -だいひょう -たいふう -たいへん -たいほ -たいまつばな -たいみんぐ -たいむ -たいめん -たいやき -たいよう -たいら -たいりょく -たいる -たいわん -たうえ -たえる -たおす -たおる -たおれる -たかい -たかね -たきび -たくさん -たこく -たこやき -たさい -たしざん -だじゃれ -たすける -たずさわる -たそがれ -たたかう -たたく -ただしい -たたみ -たちばな -だっかい -だっきゃく -だっこ -だっしゅつ -だったい -たてる -たとえる -たなばた -たにん -たぬき -たのしみ -たはつ -たぶん -たべる -たぼう -たまご -たまる -だむる -ためいき -ためす -ためる -たもつ -たやすい -たよる -たらす -たりきほんがん -たりょう -たりる -たると -たれる -たれんと -たろっと -たわむれる -だんあつ -たんい -たんおん -たんか -たんき -たんけん -たんご -たんさん -たんじょうび -だんせい -たんそく -たんたい -だんち -たんてい -たんとう -だんな -たんにん -だんねつ -たんのう -たんぴん -だんぼう -たんまつ -たんめい -だんれつ -だんろ -だんわ -ちあい -ちあん -ちいき -ちいさい -ちえん -ちかい -ちから -ちきゅう -ちきん -ちけいず -ちけん -ちこく -ちさい -ちしき -ちしりょう -ちせい -ちそう -ちたい -ちたん -ちちおや -ちつじょ -ちてき -ちてん -ちぬき -ちぬり -ちのう -ちひょう -ちへいせん -ちほう -ちまた -ちみつ -ちみどろ -ちめいど -ちゃんこなべ -ちゅうい -ちゆりょく -ちょうし -ちょさくけん -ちらし -ちらみ -ちりがみ -ちりょう -ちるど -ちわわ -ちんたい -ちんもく -ついか -ついたち -つうか -つうじょう -つうはん -つうわ -つかう -つかれる -つくね -つくる -つけね -つける -つごう -つたえる -つづく -つつじ -つつむ -つとめる -つながる -つなみ -つねづね -つのる -つぶす -つまらない -つまる -つみき -つめたい -つもり -つもる -つよい -つるぼ -つるみく -つわもの -つわり -てあし -てあて -てあみ -ていおん -ていか -ていき -ていけい -ていこく -ていさつ -ていし -ていせい -ていたい -ていど -ていねい -ていひょう -ていへん -ていぼう -てうち -ておくれ -てきとう -てくび -でこぼこ -てさぎょう -てさげ -てすり -てそう -てちがい -てちょう -てつがく -てつづき -でっぱ -てつぼう -てつや -でぬかえ -てぬき -てぬぐい -てのひら -てはい -てぶくろ -てふだ -てほどき -てほん -てまえ -てまきずし -てみじか -てみやげ -てらす -てれび -てわけ -てわたし -でんあつ -てんいん -てんかい -てんき -てんぐ -てんけん -てんごく -てんさい -てんし -てんすう -でんち -てんてき -てんとう -てんない -てんぷら -てんぼうだい -てんめつ -てんらんかい -でんりょく -でんわ -どあい -といれ -どうかん -とうきゅう -どうぐ -とうし -とうむぎ -とおい -とおか -とおく -とおす -とおる -とかい -とかす -ときおり -ときどき -とくい -とくしゅう -とくてん -とくに -とくべつ -とけい -とける -とこや -とさか -としょかん -とそう -とたん -とちゅう -とっきゅう -とっくん -とつぜん -とつにゅう -とどける -ととのえる -とない -となえる -となり -とのさま -とばす -どぶがわ -とほう -とまる -とめる -ともだち -ともる -どようび -とらえる -とんかつ -どんぶり -ないかく -ないこう -ないしょ -ないす -ないせん -ないそう -なおす -ながい -なくす -なげる -なこうど -なさけ -なたでここ -なっとう -なつやすみ -ななおし -なにごと -なにもの -なにわ -なのか -なふだ -なまいき -なまえ -なまみ -なみだ -なめらか -なめる -なやむ -ならう -ならび -ならぶ -なれる -なわとび -なわばり -にあう -にいがた -にうけ -におい -にかい -にがて -にきび -にくしみ -にくまん -にげる -にさんかたんそ -にしき -にせもの -にちじょう -にちようび -にっか -にっき -にっけい -にっこう -にっさん -にっしょく -にっすう -にっせき -にってい -になう -にほん -にまめ -にもつ -にやり -にゅういん -にりんしゃ -にわとり -にんい -にんか -にんき -にんげん -にんしき -にんずう -にんそう -にんたい -にんち -にんてい -にんにく -にんぷ -にんまり -にんむ -にんめい -にんよう -ぬいくぎ -ぬかす -ぬぐいとる -ぬぐう -ぬくもり -ぬすむ -ぬまえび -ぬめり -ぬらす -ぬんちゃく -ねあげ -ねいき -ねいる -ねいろ -ねぐせ -ねくたい -ねくら -ねこぜ -ねこむ -ねさげ -ねすごす -ねそべる -ねだん -ねつい -ねっしん -ねつぞう -ねったいぎょ -ねぶそく -ねふだ -ねぼう -ねほりはほり -ねまき -ねまわし -ねみみ -ねむい -ねむたい -ねもと -ねらう -ねわざ -ねんいり -ねんおし -ねんかん -ねんきん -ねんぐ -ねんざ -ねんし -ねんちゃく -ねんど -ねんぴ -ねんぶつ -ねんまつ -ねんりょう -ねんれい -のいず -のおづま -のがす -のきなみ -のこぎり -のこす -のこる -のせる -のぞく -のぞむ -のたまう -のちほど -のっく -のばす -のはら -のべる -のぼる -のみもの -のやま -のらいぬ -のらねこ -のりもの -のりゆき -のれん -のんき -ばあい -はあく -ばあさん -ばいか -ばいく -はいけん -はいご -はいしん -はいすい -はいせん -はいそう -はいち -ばいばい -はいれつ -はえる -はおる -はかい -ばかり -はかる -はくしゅ -はけん -はこぶ -はさみ -はさん -はしご -ばしょ -はしる -はせる -ぱそこん -はそん -はたん -はちみつ -はつおん -はっかく -はづき -はっきり -はっくつ -はっけん -はっこう -はっさん -はっしん -はったつ -はっちゅう -はってん -はっぴょう -はっぽう -はなす -はなび -はにかむ -はぶらし -はみがき -はむかう -はめつ -はやい -はやし -はらう -はろうぃん -はわい -はんい -はんえい -はんおん -はんかく -はんきょう -ばんぐみ -はんこ -はんしゃ -はんすう -はんだん -ぱんち -ぱんつ -はんてい -はんとし -はんのう -はんぱ -はんぶん -はんぺん -はんぼうき -はんめい -はんらん -はんろん -ひいき -ひうん -ひえる -ひかく -ひかり -ひかる -ひかん -ひくい -ひけつ -ひこうき -ひこく -ひさい -ひさしぶり -ひさん -びじゅつかん -ひしょ -ひそか -ひそむ -ひたむき -ひだり -ひたる -ひつぎ -ひっこし -ひっし -ひつじゅひん -ひっす -ひつぜん -ぴったり -ぴっちり -ひつよう -ひてい -ひとごみ -ひなまつり -ひなん -ひねる -ひはん -ひびく -ひひょう -ひほう -ひまわり -ひまん -ひみつ -ひめい -ひめじし -ひやけ -ひやす -ひよう -びょうき -ひらがな -ひらく -ひりつ -ひりょう -ひるま -ひるやすみ -ひれい -ひろい -ひろう -ひろき -ひろゆき -ひんかく -ひんけつ -ひんこん -ひんしゅ -ひんそう -ぴんち -ひんぱん -びんぼう -ふあん -ふいうち -ふうけい -ふうせん -ぷうたろう -ふうとう -ふうふ -ふえる -ふおん -ふかい -ふきん -ふくざつ -ふくぶくろ -ふこう -ふさい -ふしぎ -ふじみ -ふすま -ふせい -ふせぐ -ふそく -ぶたにく -ふたん -ふちょう -ふつう -ふつか -ふっかつ -ふっき -ふっこく -ぶどう -ふとる -ふとん -ふのう -ふはい -ふひょう -ふへん -ふまん -ふみん -ふめつ -ふめん -ふよう -ふりこ -ふりる -ふるい -ふんいき -ぶんがく -ぶんぐ -ふんしつ -ぶんせき -ふんそう -ぶんぽう -へいあん -へいおん -へいがい -へいき -へいげん -へいこう -へいさ -へいしゃ -へいせつ -へいそ -へいたく -へいてん -へいねつ -へいわ -へきが -へこむ -べにいろ -べにしょうが -へらす -へんかん -べんきょう -べんごし -へんさい -へんたい -べんり -ほあん -ほいく -ぼうぎょ -ほうこく -ほうそう -ほうほう -ほうもん -ほうりつ -ほえる -ほおん -ほかん -ほきょう -ぼきん -ほくろ -ほけつ -ほけん -ほこう -ほこる -ほしい -ほしつ -ほしゅ -ほしょう -ほせい -ほそい -ほそく -ほたて -ほたる -ぽちぶくろ -ほっきょく -ほっさ -ほったん -ほとんど -ほめる -ほんい -ほんき -ほんけ -ほんしつ -ほんやく -まいにち -まかい -まかせる -まがる -まける -まこと -まさつ -まじめ -ますく -まぜる -まつり -まとめ -まなぶ -まぬけ -まねく -まほう -まもる -まゆげ -まよう -まろやか -まわす -まわり -まわる -まんが -まんきつ -まんぞく -まんなか -みいら -みうち -みえる -みがく -みかた -みかん -みけん -みこん -みじかい -みすい -みすえる -みせる -みっか -みつかる -みつける -みてい -みとめる -みなと -みなみかさい -みねらる -みのう -みのがす -みほん -みもと -みやげ -みらい -みりょく -みわく -みんか -みんぞく -むいか -むえき -むえん -むかい -むかう -むかえ -むかし -むぎちゃ -むける -むげん -むさぼる -むしあつい -むしば -むじゅん -むしろ -むすう -むすこ -むすぶ -むすめ -むせる -むせん -むちゅう -むなしい -むのう -むやみ -むよう -むらさき -むりょう -むろん -めいあん -めいうん -めいえん -めいかく -めいきょく -めいさい -めいし -めいそう -めいぶつ -めいれい -めいわく -めぐまれる -めざす -めした -めずらしい -めだつ -めまい -めやす -めんきょ -めんせき -めんどう -もうしあげる -もうどうけん -もえる -もくし -もくてき -もくようび -もちろん -もどる -もらう -もんく -もんだい -やおや -やける -やさい -やさしい -やすい -やすたろう -やすみ -やせる -やそう -やたい -やちん -やっと -やっぱり -やぶる -やめる -ややこしい -やよい -やわらかい -ゆうき -ゆうびんきょく -ゆうべ -ゆうめい -ゆけつ -ゆしゅつ -ゆせん -ゆそう -ゆたか -ゆちゃく -ゆでる -ゆにゅう -ゆびわ -ゆらい -ゆれる -ようい -ようか -ようきゅう -ようじ -ようす -ようちえん -よかぜ -よかん -よきん -よくせい -よくぼう -よけい -よごれる -よさん -よしゅう -よそう -よそく -よっか -よてい -よどがわく -よねつ -よやく -よゆう -よろこぶ -よろしい -らいう -らくがき -らくご -らくさつ -らくだ -らしんばん -らせん -らぞく -らたい -らっか -られつ -りえき -りかい -りきさく -りきせつ -りくぐん -りくつ -りけん -りこう -りせい -りそう -りそく -りてん -りねん -りゆう -りゅうがく -りよう -りょうり -りょかん -りょくちゃ -りょこう -りりく -りれき -りろん -りんご -るいけい -るいさい -るいじ -るいせき -るすばん -るりがわら -れいかん -れいぎ -れいせい -れいぞうこ -れいとう -れいぼう -れきし -れきだい -れんあい -れんけい -れんこん -れんさい -れんしゅう -れんぞく -れんらく -ろうか -ろうご -ろうじん -ろうそく -ろくが -ろこつ -ろじうら -ろしゅつ -ろせん -ろてん -ろめん -ろれつ -ろんぎ -ろんぱ -ろんぶん -ろんり -わかす -わかめ -わかやま -わかれる -わしつ -わじまし -わすれもの -わらう -われる`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.js deleted file mode 100644 index 15ba4425..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/korean.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `가격 -가끔 -가난 -가능 -가득 -가르침 -가뭄 -가방 -가상 -가슴 -가운데 -가을 -가이드 -가입 -가장 -가정 -가족 -가죽 -각오 -각자 -간격 -간부 -간섭 -간장 -간접 -간판 -갈등 -갈비 -갈색 -갈증 -감각 -감기 -감소 -감수성 -감자 -감정 -갑자기 -강남 -강당 -강도 -강력히 -강변 -강북 -강사 -강수량 -강아지 -강원도 -강의 -강제 -강조 -같이 -개구리 -개나리 -개방 -개별 -개선 -개성 -개인 -객관적 -거실 -거액 -거울 -거짓 -거품 -걱정 -건강 -건물 -건설 -건조 -건축 -걸음 -검사 -검토 -게시판 -게임 -겨울 -견해 -결과 -결국 -결론 -결석 -결승 -결심 -결정 -결혼 -경계 -경고 -경기 -경력 -경복궁 -경비 -경상도 -경영 -경우 -경쟁 -경제 -경주 -경찰 -경치 -경향 -경험 -계곡 -계단 -계란 -계산 -계속 -계약 -계절 -계층 -계획 -고객 -고구려 -고궁 -고급 -고등학생 -고무신 -고민 -고양이 -고장 -고전 -고집 -고춧가루 -고통 -고향 -곡식 -골목 -골짜기 -골프 -공간 -공개 -공격 -공군 -공급 -공기 -공동 -공무원 -공부 -공사 -공식 -공업 -공연 -공원 -공장 -공짜 -공책 -공통 -공포 -공항 -공휴일 -과목 -과일 -과장 -과정 -과학 -관객 -관계 -관광 -관념 -관람 -관련 -관리 -관습 -관심 -관점 -관찰 -광경 -광고 -광장 -광주 -괴로움 -굉장히 -교과서 -교문 -교복 -교실 -교양 -교육 -교장 -교직 -교통 -교환 -교훈 -구경 -구름 -구멍 -구별 -구분 -구석 -구성 -구속 -구역 -구입 -구청 -구체적 -국가 -국기 -국내 -국립 -국물 -국민 -국수 -국어 -국왕 -국적 -국제 -국회 -군대 -군사 -군인 -궁극적 -권리 -권위 -권투 -귀국 -귀신 -규정 -규칙 -균형 -그날 -그냥 -그늘 -그러나 -그룹 -그릇 -그림 -그제서야 -그토록 -극복 -극히 -근거 -근교 -근래 -근로 -근무 -근본 -근원 -근육 -근처 -글씨 -글자 -금강산 -금고 -금년 -금메달 -금액 -금연 -금요일 -금지 -긍정적 -기간 -기관 -기념 -기능 -기독교 -기둥 -기록 -기름 -기법 -기본 -기분 -기쁨 -기숙사 -기술 -기억 -기업 -기온 -기운 -기원 -기적 -기준 -기침 -기혼 -기획 -긴급 -긴장 -길이 -김밥 -김치 -김포공항 -깍두기 -깜빡 -깨달음 -깨소금 -껍질 -꼭대기 -꽃잎 -나들이 -나란히 -나머지 -나물 -나침반 -나흘 -낙엽 -난방 -날개 -날씨 -날짜 -남녀 -남대문 -남매 -남산 -남자 -남편 -남학생 -낭비 -낱말 -내년 -내용 -내일 -냄비 -냄새 -냇물 -냉동 -냉면 -냉방 -냉장고 -넥타이 -넷째 -노동 -노란색 -노력 -노인 -녹음 -녹차 -녹화 -논리 -논문 -논쟁 -놀이 -농구 -농담 -농민 -농부 -농업 -농장 -농촌 -높이 -눈동자 -눈물 -눈썹 -뉴욕 -느낌 -늑대 -능동적 -능력 -다방 -다양성 -다음 -다이어트 -다행 -단계 -단골 -단독 -단맛 -단순 -단어 -단위 -단점 -단체 -단추 -단편 -단풍 -달걀 -달러 -달력 -달리 -닭고기 -담당 -담배 -담요 -담임 -답변 -답장 -당근 -당분간 -당연히 -당장 -대규모 -대낮 -대단히 -대답 -대도시 -대략 -대량 -대륙 -대문 -대부분 -대신 -대응 -대장 -대전 -대접 -대중 -대책 -대출 -대충 -대통령 -대학 -대한민국 -대합실 -대형 -덩어리 -데이트 -도대체 -도덕 -도둑 -도망 -도서관 -도심 -도움 -도입 -도자기 -도저히 -도전 -도중 -도착 -독감 -독립 -독서 -독일 -독창적 -동화책 -뒷모습 -뒷산 -딸아이 -마누라 -마늘 -마당 -마라톤 -마련 -마무리 -마사지 -마약 -마요네즈 -마을 -마음 -마이크 -마중 -마지막 -마찬가지 -마찰 -마흔 -막걸리 -막내 -막상 -만남 -만두 -만세 -만약 -만일 -만점 -만족 -만화 -많이 -말기 -말씀 -말투 -맘대로 -망원경 -매년 -매달 -매력 -매번 -매스컴 -매일 -매장 -맥주 -먹이 -먼저 -먼지 -멀리 -메일 -며느리 -며칠 -면담 -멸치 -명단 -명령 -명예 -명의 -명절 -명칭 -명함 -모금 -모니터 -모델 -모든 -모범 -모습 -모양 -모임 -모조리 -모집 -모퉁이 -목걸이 -목록 -목사 -목소리 -목숨 -목적 -목표 -몰래 -몸매 -몸무게 -몸살 -몸속 -몸짓 -몸통 -몹시 -무관심 -무궁화 -무더위 -무덤 -무릎 -무슨 -무엇 -무역 -무용 -무조건 -무지개 -무척 -문구 -문득 -문법 -문서 -문제 -문학 -문화 -물가 -물건 -물결 -물고기 -물론 -물리학 -물음 -물질 -물체 -미국 -미디어 -미사일 -미술 -미역 -미용실 -미움 -미인 -미팅 -미혼 -민간 -민족 -민주 -믿음 -밀가루 -밀리미터 -밑바닥 -바가지 -바구니 -바나나 -바늘 -바닥 -바닷가 -바람 -바이러스 -바탕 -박물관 -박사 -박수 -반대 -반드시 -반말 -반발 -반성 -반응 -반장 -반죽 -반지 -반찬 -받침 -발가락 -발걸음 -발견 -발달 -발레 -발목 -발바닥 -발생 -발음 -발자국 -발전 -발톱 -발표 -밤하늘 -밥그릇 -밥맛 -밥상 -밥솥 -방금 -방면 -방문 -방바닥 -방법 -방송 -방식 -방안 -방울 -방지 -방학 -방해 -방향 -배경 -배꼽 -배달 -배드민턴 -백두산 -백색 -백성 -백인 -백제 -백화점 -버릇 -버섯 -버튼 -번개 -번역 -번지 -번호 -벌금 -벌레 -벌써 -범위 -범인 -범죄 -법률 -법원 -법적 -법칙 -베이징 -벨트 -변경 -변동 -변명 -변신 -변호사 -변화 -별도 -별명 -별일 -병실 -병아리 -병원 -보관 -보너스 -보라색 -보람 -보름 -보상 -보안 -보자기 -보장 -보전 -보존 -보통 -보편적 -보험 -복도 -복사 -복숭아 -복습 -볶음 -본격적 -본래 -본부 -본사 -본성 -본인 -본질 -볼펜 -봉사 -봉지 -봉투 -부근 -부끄러움 -부담 -부동산 -부문 -부분 -부산 -부상 -부엌 -부인 -부작용 -부장 -부정 -부족 -부지런히 -부친 -부탁 -부품 -부회장 -북부 -북한 -분노 -분량 -분리 -분명 -분석 -분야 -분위기 -분필 -분홍색 -불고기 -불과 -불교 -불꽃 -불만 -불법 -불빛 -불안 -불이익 -불행 -브랜드 -비극 -비난 -비닐 -비둘기 -비디오 -비로소 -비만 -비명 -비밀 -비바람 -비빔밥 -비상 -비용 -비율 -비중 -비타민 -비판 -빌딩 -빗물 -빗방울 -빗줄기 -빛깔 -빨간색 -빨래 -빨리 -사건 -사계절 -사나이 -사냥 -사람 -사랑 -사립 -사모님 -사물 -사방 -사상 -사생활 -사설 -사슴 -사실 -사업 -사용 -사월 -사장 -사전 -사진 -사촌 -사춘기 -사탕 -사투리 -사흘 -산길 -산부인과 -산업 -산책 -살림 -살인 -살짝 -삼계탕 -삼국 -삼십 -삼월 -삼촌 -상관 -상금 -상대 -상류 -상반기 -상상 -상식 -상업 -상인 -상자 -상점 -상처 -상추 -상태 -상표 -상품 -상황 -새벽 -색깔 -색연필 -생각 -생명 -생물 -생방송 -생산 -생선 -생신 -생일 -생활 -서랍 -서른 -서명 -서민 -서비스 -서양 -서울 -서적 -서점 -서쪽 -서클 -석사 -석유 -선거 -선물 -선배 -선생 -선수 -선원 -선장 -선전 -선택 -선풍기 -설거지 -설날 -설렁탕 -설명 -설문 -설사 -설악산 -설치 -설탕 -섭씨 -성공 -성당 -성명 -성별 -성인 -성장 -성적 -성질 -성함 -세금 -세미나 -세상 -세월 -세종대왕 -세탁 -센터 -센티미터 -셋째 -소규모 -소극적 -소금 -소나기 -소년 -소득 -소망 -소문 -소설 -소속 -소아과 -소용 -소원 -소음 -소중히 -소지품 -소질 -소풍 -소형 -속담 -속도 -속옷 -손가락 -손길 -손녀 -손님 -손등 -손목 -손뼉 -손실 -손질 -손톱 -손해 -솔직히 -솜씨 -송아지 -송이 -송편 -쇠고기 -쇼핑 -수건 -수년 -수단 -수돗물 -수동적 -수면 -수명 -수박 -수상 -수석 -수술 -수시로 -수업 -수염 -수영 -수입 -수준 -수집 -수출 -수컷 -수필 -수학 -수험생 -수화기 -숙녀 -숙소 -숙제 -순간 -순서 -순수 -순식간 -순위 -숟가락 -술병 -술집 -숫자 -스님 -스물 -스스로 -스승 -스웨터 -스위치 -스케이트 -스튜디오 -스트레스 -스포츠 -슬쩍 -슬픔 -습관 -습기 -승객 -승리 -승부 -승용차 -승진 -시각 -시간 -시골 -시금치 -시나리오 -시댁 -시리즈 -시멘트 -시민 -시부모 -시선 -시설 -시스템 -시아버지 -시어머니 -시월 -시인 -시일 -시작 -시장 -시절 -시점 -시중 -시즌 -시집 -시청 -시합 -시험 -식구 -식기 -식당 -식량 -식료품 -식물 -식빵 -식사 -식생활 -식초 -식탁 -식품 -신고 -신규 -신념 -신문 -신발 -신비 -신사 -신세 -신용 -신제품 -신청 -신체 -신화 -실감 -실내 -실력 -실례 -실망 -실수 -실습 -실시 -실장 -실정 -실질적 -실천 -실체 -실컷 -실태 -실패 -실험 -실현 -심리 -심부름 -심사 -심장 -심정 -심판 -쌍둥이 -씨름 -씨앗 -아가씨 -아나운서 -아드님 -아들 -아쉬움 -아스팔트 -아시아 -아울러 -아저씨 -아줌마 -아직 -아침 -아파트 -아프리카 -아픔 -아홉 -아흔 -악기 -악몽 -악수 -안개 -안경 -안과 -안내 -안녕 -안동 -안방 -안부 -안주 -알루미늄 -알코올 -암시 -암컷 -압력 -앞날 -앞문 -애인 -애정 -액수 -앨범 -야간 -야단 -야옹 -약간 -약국 -약속 -약수 -약점 -약품 -약혼녀 -양념 -양력 -양말 -양배추 -양주 -양파 -어둠 -어려움 -어른 -어젯밤 -어쨌든 -어쩌다가 -어쩐지 -언니 -언덕 -언론 -언어 -얼굴 -얼른 -얼음 -얼핏 -엄마 -업무 -업종 -업체 -엉덩이 -엉망 -엉터리 -엊그제 -에너지 -에어컨 -엔진 -여건 -여고생 -여관 -여군 -여권 -여대생 -여덟 -여동생 -여든 -여론 -여름 -여섯 -여성 -여왕 -여인 -여전히 -여직원 -여학생 -여행 -역사 -역시 -역할 -연결 -연구 -연극 -연기 -연락 -연설 -연세 -연속 -연습 -연애 -연예인 -연인 -연장 -연주 -연출 -연필 -연합 -연휴 -열기 -열매 -열쇠 -열심히 -열정 -열차 -열흘 -염려 -엽서 -영국 -영남 -영상 -영양 -영역 -영웅 -영원히 -영하 -영향 -영혼 -영화 -옆구리 -옆방 -옆집 -예감 -예금 -예방 -예산 -예상 -예선 -예술 -예습 -예식장 -예약 -예전 -예절 -예정 -예컨대 -옛날 -오늘 -오락 -오랫동안 -오렌지 -오로지 -오른발 -오븐 -오십 -오염 -오월 -오전 -오직 -오징어 -오페라 -오피스텔 -오히려 -옥상 -옥수수 -온갖 -온라인 -온몸 -온종일 -온통 -올가을 -올림픽 -올해 -옷차림 -와이셔츠 -와인 -완성 -완전 -왕비 -왕자 -왜냐하면 -왠지 -외갓집 -외국 -외로움 -외삼촌 -외출 -외침 -외할머니 -왼발 -왼손 -왼쪽 -요금 -요일 -요즘 -요청 -용기 -용서 -용어 -우산 -우선 -우승 -우연히 -우정 -우체국 -우편 -운동 -운명 -운반 -운전 -운행 -울산 -울음 -움직임 -웃어른 -웃음 -워낙 -원고 -원래 -원서 -원숭이 -원인 -원장 -원피스 -월급 -월드컵 -월세 -월요일 -웨이터 -위반 -위법 -위성 -위원 -위험 -위협 -윗사람 -유난히 -유럽 -유명 -유물 -유산 -유적 -유치원 -유학 -유행 -유형 -육군 -육상 -육십 -육체 -은행 -음력 -음료 -음반 -음성 -음식 -음악 -음주 -의견 -의논 -의문 -의복 -의식 -의심 -의외로 -의욕 -의원 -의학 -이것 -이곳 -이념 -이놈 -이달 -이대로 -이동 -이렇게 -이력서 -이론적 -이름 -이민 -이발소 -이별 -이불 -이빨 -이상 -이성 -이슬 -이야기 -이용 -이웃 -이월 -이윽고 -이익 -이전 -이중 -이튿날 -이틀 -이혼 -인간 -인격 -인공 -인구 -인근 -인기 -인도 -인류 -인물 -인생 -인쇄 -인연 -인원 -인재 -인종 -인천 -인체 -인터넷 -인하 -인형 -일곱 -일기 -일단 -일대 -일등 -일반 -일본 -일부 -일상 -일생 -일손 -일요일 -일월 -일정 -일종 -일주일 -일찍 -일체 -일치 -일행 -일회용 -임금 -임무 -입대 -입력 -입맛 -입사 -입술 -입시 -입원 -입장 -입학 -자가용 -자격 -자극 -자동 -자랑 -자부심 -자식 -자신 -자연 -자원 -자율 -자전거 -자정 -자존심 -자판 -작가 -작년 -작성 -작업 -작용 -작은딸 -작품 -잔디 -잔뜩 -잔치 -잘못 -잠깐 -잠수함 -잠시 -잠옷 -잠자리 -잡지 -장관 -장군 -장기간 -장래 -장례 -장르 -장마 -장면 -장모 -장미 -장비 -장사 -장소 -장식 -장애인 -장인 -장점 -장차 -장학금 -재능 -재빨리 -재산 -재생 -재작년 -재정 -재채기 -재판 -재학 -재활용 -저것 -저고리 -저곳 -저녁 -저런 -저렇게 -저번 -저울 -저절로 -저축 -적극 -적당히 -적성 -적용 -적응 -전개 -전공 -전기 -전달 -전라도 -전망 -전문 -전반 -전부 -전세 -전시 -전용 -전자 -전쟁 -전주 -전철 -전체 -전통 -전혀 -전후 -절대 -절망 -절반 -절약 -절차 -점검 -점수 -점심 -점원 -점점 -점차 -접근 -접시 -접촉 -젓가락 -정거장 -정도 -정류장 -정리 -정말 -정면 -정문 -정반대 -정보 -정부 -정비 -정상 -정성 -정오 -정원 -정장 -정지 -정치 -정확히 -제공 -제과점 -제대로 -제목 -제발 -제법 -제삿날 -제안 -제일 -제작 -제주도 -제출 -제품 -제한 -조각 -조건 -조금 -조깅 -조명 -조미료 -조상 -조선 -조용히 -조절 -조정 -조직 -존댓말 -존재 -졸업 -졸음 -종교 -종로 -종류 -종소리 -종업원 -종종 -종합 -좌석 -죄인 -주관적 -주름 -주말 -주머니 -주먹 -주문 -주민 -주방 -주변 -주식 -주인 -주일 -주장 -주전자 -주택 -준비 -줄거리 -줄기 -줄무늬 -중간 -중계방송 -중국 -중년 -중단 -중독 -중반 -중부 -중세 -중소기업 -중순 -중앙 -중요 -중학교 -즉석 -즉시 -즐거움 -증가 -증거 -증권 -증상 -증세 -지각 -지갑 -지경 -지극히 -지금 -지급 -지능 -지름길 -지리산 -지방 -지붕 -지식 -지역 -지우개 -지원 -지적 -지점 -지진 -지출 -직선 -직업 -직원 -직장 -진급 -진동 -진로 -진료 -진리 -진짜 -진찰 -진출 -진통 -진행 -질문 -질병 -질서 -짐작 -집단 -집안 -집중 -짜증 -찌꺼기 -차남 -차라리 -차량 -차림 -차별 -차선 -차츰 -착각 -찬물 -찬성 -참가 -참기름 -참새 -참석 -참여 -참외 -참조 -찻잔 -창가 -창고 -창구 -창문 -창밖 -창작 -창조 -채널 -채점 -책가방 -책방 -책상 -책임 -챔피언 -처벌 -처음 -천국 -천둥 -천장 -천재 -천천히 -철도 -철저히 -철학 -첫날 -첫째 -청년 -청바지 -청소 -청춘 -체계 -체력 -체온 -체육 -체중 -체험 -초등학생 -초반 -초밥 -초상화 -초순 -초여름 -초원 -초저녁 -초점 -초청 -초콜릿 -촛불 -총각 -총리 -총장 -촬영 -최근 -최상 -최선 -최신 -최악 -최종 -추석 -추억 -추진 -추천 -추측 -축구 -축소 -축제 -축하 -출근 -출발 -출산 -출신 -출연 -출입 -출장 -출판 -충격 -충고 -충돌 -충분히 -충청도 -취업 -취직 -취향 -치약 -친구 -친척 -칠십 -칠월 -칠판 -침대 -침묵 -침실 -칫솔 -칭찬 -카메라 -카운터 -칼국수 -캐릭터 -캠퍼스 -캠페인 -커튼 -컨디션 -컬러 -컴퓨터 -코끼리 -코미디 -콘서트 -콜라 -콤플렉스 -콩나물 -쾌감 -쿠데타 -크림 -큰길 -큰딸 -큰소리 -큰아들 -큰어머니 -큰일 -큰절 -클래식 -클럽 -킬로 -타입 -타자기 -탁구 -탁자 -탄생 -태권도 -태양 -태풍 -택시 -탤런트 -터널 -터미널 -테니스 -테스트 -테이블 -텔레비전 -토론 -토마토 -토요일 -통계 -통과 -통로 -통신 -통역 -통일 -통장 -통제 -통증 -통합 -통화 -퇴근 -퇴원 -퇴직금 -튀김 -트럭 -특급 -특별 -특성 -특수 -특징 -특히 -튼튼히 -티셔츠 -파란색 -파일 -파출소 -판결 -판단 -판매 -판사 -팔십 -팔월 -팝송 -패션 -팩스 -팩시밀리 -팬티 -퍼센트 -페인트 -편견 -편의 -편지 -편히 -평가 -평균 -평생 -평소 -평양 -평일 -평화 -포스터 -포인트 -포장 -포함 -표면 -표정 -표준 -표현 -품목 -품질 -풍경 -풍속 -풍습 -프랑스 -프린터 -플라스틱 -피곤 -피망 -피아노 -필름 -필수 -필요 -필자 -필통 -핑계 -하느님 -하늘 -하드웨어 -하룻밤 -하반기 -하숙집 -하순 -하여튼 -하지만 -하천 -하품 -하필 -학과 -학교 -학급 -학기 -학년 -학력 -학번 -학부모 -학비 -학생 -학술 -학습 -학용품 -학원 -학위 -학자 -학점 -한계 -한글 -한꺼번에 -한낮 -한눈 -한동안 -한때 -한라산 -한마디 -한문 -한번 -한복 -한식 -한여름 -한쪽 -할머니 -할아버지 -할인 -함께 -함부로 -합격 -합리적 -항공 -항구 -항상 -항의 -해결 -해군 -해답 -해당 -해물 -해석 -해설 -해수욕장 -해안 -핵심 -핸드백 -햄버거 -햇볕 -햇살 -행동 -행복 -행사 -행운 -행위 -향기 -향상 -향수 -허락 -허용 -헬기 -현관 -현금 -현대 -현상 -현실 -현장 -현재 -현지 -혈액 -협력 -형부 -형사 -형수 -형식 -형제 -형태 -형편 -혜택 -호기심 -호남 -호랑이 -호박 -호텔 -호흡 -혹시 -홀로 -홈페이지 -홍보 -홍수 -홍차 -화면 -화분 -화살 -화요일 -화장 -화학 -확보 -확인 -확장 -확정 -환갑 -환경 -환영 -환율 -환자 -활기 -활동 -활발히 -활용 -활짝 -회견 -회관 -회복 -회색 -회원 -회장 -회전 -횟수 -횡단보도 -효율적 -후반 -후춧가루 -훈련 -훨씬 -휴식 -휴일 -흉내 -흐름 -흑백 -흑인 -흔적 -흔히 -흥미 -흥분 -희곡 -희망 -희생 -흰색 -힘껏`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.js deleted file mode 100644 index 43ac9d2c..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/simplified-chinese.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `的 -一 -是 -在 -不 -了 -有 -和 -人 -这 -中 -大 -为 -上 -个 -国 -我 -以 -要 -他 -时 -来 -用 -们 -生 -到 -作 -地 -于 -出 -就 -分 -对 -成 -会 -可 -主 -发 -年 -动 -同 -工 -也 -能 -下 -过 -子 -说 -产 -种 -面 -而 -方 -后 -多 -定 -行 -学 -法 -所 -民 -得 -经 -十 -三 -之 -进 -着 -等 -部 -度 -家 -电 -力 -里 -如 -水 -化 -高 -自 -二 -理 -起 -小 -物 -现 -实 -加 -量 -都 -两 -体 -制 -机 -当 -使 -点 -从 -业 -本 -去 -把 -性 -好 -应 -开 -它 -合 -还 -因 -由 -其 -些 -然 -前 -外 -天 -政 -四 -日 -那 -社 -义 -事 -平 -形 -相 -全 -表 -间 -样 -与 -关 -各 -重 -新 -线 -内 -数 -正 -心 -反 -你 -明 -看 -原 -又 -么 -利 -比 -或 -但 -质 -气 -第 -向 -道 -命 -此 -变 -条 -只 -没 -结 -解 -问 -意 -建 -月 -公 -无 -系 -军 -很 -情 -者 -最 -立 -代 -想 -已 -通 -并 -提 -直 -题 -党 -程 -展 -五 -果 -料 -象 -员 -革 -位 -入 -常 -文 -总 -次 -品 -式 -活 -设 -及 -管 -特 -件 -长 -求 -老 -头 -基 -资 -边 -流 -路 -级 -少 -图 -山 -统 -接 -知 -较 -将 -组 -见 -计 -别 -她 -手 -角 -期 -根 -论 -运 -农 -指 -几 -九 -区 -强 -放 -决 -西 -被 -干 -做 -必 -战 -先 -回 -则 -任 -取 -据 -处 -队 -南 -给 -色 -光 -门 -即 -保 -治 -北 -造 -百 -规 -热 -领 -七 -海 -口 -东 -导 -器 -压 -志 -世 -金 -增 -争 -济 -阶 -油 -思 -术 -极 -交 -受 -联 -什 -认 -六 -共 -权 -收 -证 -改 -清 -美 -再 -采 -转 -更 -单 -风 -切 -打 -白 -教 -速 -花 -带 -安 -场 -身 -车 -例 -真 -务 -具 -万 -每 -目 -至 -达 -走 -积 -示 -议 -声 -报 -斗 -完 -类 -八 -离 -华 -名 -确 -才 -科 -张 -信 -马 -节 -话 -米 -整 -空 -元 -况 -今 -集 -温 -传 -土 -许 -步 -群 -广 -石 -记 -需 -段 -研 -界 -拉 -林 -律 -叫 -且 -究 -观 -越 -织 -装 -影 -算 -低 -持 -音 -众 -书 -布 -复 -容 -儿 -须 -际 -商 -非 -验 -连 -断 -深 -难 -近 -矿 -千 -周 -委 -素 -技 -备 -半 -办 -青 -省 -列 -习 -响 -约 -支 -般 -史 -感 -劳 -便 -团 -往 -酸 -历 -市 -克 -何 -除 -消 -构 -府 -称 -太 -准 -精 -值 -号 -率 -族 -维 -划 -选 -标 -写 -存 -候 -毛 -亲 -快 -效 -斯 -院 -查 -江 -型 -眼 -王 -按 -格 -养 -易 -置 -派 -层 -片 -始 -却 -专 -状 -育 -厂 -京 -识 -适 -属 -圆 -包 -火 -住 -调 -满 -县 -局 -照 -参 -红 -细 -引 -听 -该 -铁 -价 -严 -首 -底 -液 -官 -德 -随 -病 -苏 -失 -尔 -死 -讲 -配 -女 -黄 -推 -显 -谈 -罪 -神 -艺 -呢 -席 -含 -企 -望 -密 -批 -营 -项 -防 -举 -球 -英 -氧 -势 -告 -李 -台 -落 -木 -帮 -轮 -破 -亚 -师 -围 -注 -远 -字 -材 -排 -供 -河 -态 -封 -另 -施 -减 -树 -溶 -怎 -止 -案 -言 -士 -均 -武 -固 -叶 -鱼 -波 -视 -仅 -费 -紧 -爱 -左 -章 -早 -朝 -害 -续 -轻 -服 -试 -食 -充 -兵 -源 -判 -护 -司 -足 -某 -练 -差 -致 -板 -田 -降 -黑 -犯 -负 -击 -范 -继 -兴 -似 -余 -坚 -曲 -输 -修 -故 -城 -夫 -够 -送 -笔 -船 -占 -右 -财 -吃 -富 -春 -职 -觉 -汉 -画 -功 -巴 -跟 -虽 -杂 -飞 -检 -吸 -助 -升 -阳 -互 -初 -创 -抗 -考 -投 -坏 -策 -古 -径 -换 -未 -跑 -留 -钢 -曾 -端 -责 -站 -简 -述 -钱 -副 -尽 -帝 -射 -草 -冲 -承 -独 -令 -限 -阿 -宣 -环 -双 -请 -超 -微 -让 -控 -州 -良 -轴 -找 -否 -纪 -益 -依 -优 -顶 -础 -载 -倒 -房 -突 -坐 -粉 -敌 -略 -客 -袁 -冷 -胜 -绝 -析 -块 -剂 -测 -丝 -协 -诉 -念 -陈 -仍 -罗 -盐 -友 -洋 -错 -苦 -夜 -刑 -移 -频 -逐 -靠 -混 -母 -短 -皮 -终 -聚 -汽 -村 -云 -哪 -既 -距 -卫 -停 -烈 -央 -察 -烧 -迅 -境 -若 -印 -洲 -刻 -括 -激 -孔 -搞 -甚 -室 -待 -核 -校 -散 -侵 -吧 -甲 -游 -久 -菜 -味 -旧 -模 -湖 -货 -损 -预 -阻 -毫 -普 -稳 -乙 -妈 -植 -息 -扩 -银 -语 -挥 -酒 -守 -拿 -序 -纸 -医 -缺 -雨 -吗 -针 -刘 -啊 -急 -唱 -误 -训 -愿 -审 -附 -获 -茶 -鲜 -粮 -斤 -孩 -脱 -硫 -肥 -善 -龙 -演 -父 -渐 -血 -欢 -械 -掌 -歌 -沙 -刚 -攻 -谓 -盾 -讨 -晚 -粒 -乱 -燃 -矛 -乎 -杀 -药 -宁 -鲁 -贵 -钟 -煤 -读 -班 -伯 -香 -介 -迫 -句 -丰 -培 -握 -兰 -担 -弦 -蛋 -沉 -假 -穿 -执 -答 -乐 -谁 -顺 -烟 -缩 -征 -脸 -喜 -松 -脚 -困 -异 -免 -背 -星 -福 -买 -染 -井 -概 -慢 -怕 -磁 -倍 -祖 -皇 -促 -静 -补 -评 -翻 -肉 -践 -尼 -衣 -宽 -扬 -棉 -希 -伤 -操 -垂 -秋 -宜 -氢 -套 -督 -振 -架 -亮 -末 -宪 -庆 -编 -牛 -触 -映 -雷 -销 -诗 -座 -居 -抓 -裂 -胞 -呼 -娘 -景 -威 -绿 -晶 -厚 -盟 -衡 -鸡 -孙 -延 -危 -胶 -屋 -乡 -临 -陆 -顾 -掉 -呀 -灯 -岁 -措 -束 -耐 -剧 -玉 -赵 -跳 -哥 -季 -课 -凯 -胡 -额 -款 -绍 -卷 -齐 -伟 -蒸 -殖 -永 -宗 -苗 -川 -炉 -岩 -弱 -零 -杨 -奏 -沿 -露 -杆 -探 -滑 -镇 -饭 -浓 -航 -怀 -赶 -库 -夺 -伊 -灵 -税 -途 -灭 -赛 -归 -召 -鼓 -播 -盘 -裁 -险 -康 -唯 -录 -菌 -纯 -借 -糖 -盖 -横 -符 -私 -努 -堂 -域 -枪 -润 -幅 -哈 -竟 -熟 -虫 -泽 -脑 -壤 -碳 -欧 -遍 -侧 -寨 -敢 -彻 -虑 -斜 -薄 -庭 -纳 -弹 -饲 -伸 -折 -麦 -湿 -暗 -荷 -瓦 -塞 -床 -筑 -恶 -户 -访 -塔 -奇 -透 -梁 -刀 -旋 -迹 -卡 -氯 -遇 -份 -毒 -泥 -退 -洗 -摆 -灰 -彩 -卖 -耗 -夏 -择 -忙 -铜 -献 -硬 -予 -繁 -圈 -雪 -函 -亦 -抽 -篇 -阵 -阴 -丁 -尺 -追 -堆 -雄 -迎 -泛 -爸 -楼 -避 -谋 -吨 -野 -猪 -旗 -累 -偏 -典 -馆 -索 -秦 -脂 -潮 -爷 -豆 -忽 -托 -惊 -塑 -遗 -愈 -朱 -替 -纤 -粗 -倾 -尚 -痛 -楚 -谢 -奋 -购 -磨 -君 -池 -旁 -碎 -骨 -监 -捕 -弟 -暴 -割 -贯 -殊 -释 -词 -亡 -壁 -顿 -宝 -午 -尘 -闻 -揭 -炮 -残 -冬 -桥 -妇 -警 -综 -招 -吴 -付 -浮 -遭 -徐 -您 -摇 -谷 -赞 -箱 -隔 -订 -男 -吹 -园 -纷 -唐 -败 -宋 -玻 -巨 -耕 -坦 -荣 -闭 -湾 -键 -凡 -驻 -锅 -救 -恩 -剥 -凝 -碱 -齿 -截 -炼 -麻 -纺 -禁 -废 -盛 -版 -缓 -净 -睛 -昌 -婚 -涉 -筒 -嘴 -插 -岸 -朗 -庄 -街 -藏 -姑 -贸 -腐 -奴 -啦 -惯 -乘 -伙 -恢 -匀 -纱 -扎 -辩 -耳 -彪 -臣 -亿 -璃 -抵 -脉 -秀 -萨 -俄 -网 -舞 -店 -喷 -纵 -寸 -汗 -挂 -洪 -贺 -闪 -柬 -爆 -烯 -津 -稻 -墙 -软 -勇 -像 -滚 -厘 -蒙 -芳 -肯 -坡 -柱 -荡 -腿 -仪 -旅 -尾 -轧 -冰 -贡 -登 -黎 -削 -钻 -勒 -逃 -障 -氨 -郭 -峰 -币 -港 -伏 -轨 -亩 -毕 -擦 -莫 -刺 -浪 -秘 -援 -株 -健 -售 -股 -岛 -甘 -泡 -睡 -童 -铸 -汤 -阀 -休 -汇 -舍 -牧 -绕 -炸 -哲 -磷 -绩 -朋 -淡 -尖 -启 -陷 -柴 -呈 -徒 -颜 -泪 -稍 -忘 -泵 -蓝 -拖 -洞 -授 -镜 -辛 -壮 -锋 -贫 -虚 -弯 -摩 -泰 -幼 -廷 -尊 -窗 -纲 -弄 -隶 -疑 -氏 -宫 -姐 -震 -瑞 -怪 -尤 -琴 -循 -描 -膜 -违 -夹 -腰 -缘 -珠 -穷 -森 -枝 -竹 -沟 -催 -绳 -忆 -邦 -剩 -幸 -浆 -栏 -拥 -牙 -贮 -礼 -滤 -钠 -纹 -罢 -拍 -咱 -喊 -袖 -埃 -勤 -罚 -焦 -潜 -伍 -墨 -欲 -缝 -姓 -刊 -饱 -仿 -奖 -铝 -鬼 -丽 -跨 -默 -挖 -链 -扫 -喝 -袋 -炭 -污 -幕 -诸 -弧 -励 -梅 -奶 -洁 -灾 -舟 -鉴 -苯 -讼 -抱 -毁 -懂 -寒 -智 -埔 -寄 -届 -跃 -渡 -挑 -丹 -艰 -贝 -碰 -拔 -爹 -戴 -码 -梦 -芽 -熔 -赤 -渔 -哭 -敬 -颗 -奔 -铅 -仲 -虎 -稀 -妹 -乏 -珍 -申 -桌 -遵 -允 -隆 -螺 -仓 -魏 -锐 -晓 -氮 -兼 -隐 -碍 -赫 -拨 -忠 -肃 -缸 -牵 -抢 -博 -巧 -壳 -兄 -杜 -讯 -诚 -碧 -祥 -柯 -页 -巡 -矩 -悲 -灌 -龄 -伦 -票 -寻 -桂 -铺 -圣 -恐 -恰 -郑 -趣 -抬 -荒 -腾 -贴 -柔 -滴 -猛 -阔 -辆 -妻 -填 -撤 -储 -签 -闹 -扰 -紫 -砂 -递 -戏 -吊 -陶 -伐 -喂 -疗 -瓶 -婆 -抚 -臂 -摸 -忍 -虾 -蜡 -邻 -胸 -巩 -挤 -偶 -弃 -槽 -劲 -乳 -邓 -吉 -仁 -烂 -砖 -租 -乌 -舰 -伴 -瓜 -浅 -丙 -暂 -燥 -橡 -柳 -迷 -暖 -牌 -秧 -胆 -详 -簧 -踏 -瓷 -谱 -呆 -宾 -糊 -洛 -辉 -愤 -竞 -隙 -怒 -粘 -乃 -绪 -肩 -籍 -敏 -涂 -熙 -皆 -侦 -悬 -掘 -享 -纠 -醒 -狂 -锁 -淀 -恨 -牲 -霸 -爬 -赏 -逆 -玩 -陵 -祝 -秒 -浙 -貌 -役 -彼 -悉 -鸭 -趋 -凤 -晨 -畜 -辈 -秩 -卵 -署 -梯 -炎 -滩 -棋 -驱 -筛 -峡 -冒 -啥 -寿 -译 -浸 -泉 -帽 -迟 -硅 -疆 -贷 -漏 -稿 -冠 -嫩 -胁 -芯 -牢 -叛 -蚀 -奥 -鸣 -岭 -羊 -凭 -串 -塘 -绘 -酵 -融 -盆 -锡 -庙 -筹 -冻 -辅 -摄 -袭 -筋 -拒 -僚 -旱 -钾 -鸟 -漆 -沈 -眉 -疏 -添 -棒 -穗 -硝 -韩 -逼 -扭 -侨 -凉 -挺 -碗 -栽 -炒 -杯 -患 -馏 -劝 -豪 -辽 -勃 -鸿 -旦 -吏 -拜 -狗 -埋 -辊 -掩 -饮 -搬 -骂 -辞 -勾 -扣 -估 -蒋 -绒 -雾 -丈 -朵 -姆 -拟 -宇 -辑 -陕 -雕 -偿 -蓄 -崇 -剪 -倡 -厅 -咬 -驶 -薯 -刷 -斥 -番 -赋 -奉 -佛 -浇 -漫 -曼 -扇 -钙 -桃 -扶 -仔 -返 -俗 -亏 -腔 -鞋 -棱 -覆 -框 -悄 -叔 -撞 -骗 -勘 -旺 -沸 -孤 -吐 -孟 -渠 -屈 -疾 -妙 -惜 -仰 -狠 -胀 -谐 -抛 -霉 -桑 -岗 -嘛 -衰 -盗 -渗 -脏 -赖 -涌 -甜 -曹 -阅 -肌 -哩 -厉 -烃 -纬 -毅 -昨 -伪 -症 -煮 -叹 -钉 -搭 -茎 -笼 -酷 -偷 -弓 -锥 -恒 -杰 -坑 -鼻 -翼 -纶 -叙 -狱 -逮 -罐 -络 -棚 -抑 -膨 -蔬 -寺 -骤 -穆 -冶 -枯 -册 -尸 -凸 -绅 -坯 -牺 -焰 -轰 -欣 -晋 -瘦 -御 -锭 -锦 -丧 -旬 -锻 -垄 -搜 -扑 -邀 -亭 -酯 -迈 -舒 -脆 -酶 -闲 -忧 -酚 -顽 -羽 -涨 -卸 -仗 -陪 -辟 -惩 -杭 -姚 -肚 -捉 -飘 -漂 -昆 -欺 -吾 -郎 -烷 -汁 -呵 -饰 -萧 -雅 -邮 -迁 -燕 -撒 -姻 -赴 -宴 -烦 -债 -帐 -斑 -铃 -旨 -醇 -董 -饼 -雏 -姿 -拌 -傅 -腹 -妥 -揉 -贤 -拆 -歪 -葡 -胺 -丢 -浩 -徽 -昂 -垫 -挡 -览 -贪 -慰 -缴 -汪 -慌 -冯 -诺 -姜 -谊 -凶 -劣 -诬 -耀 -昏 -躺 -盈 -骑 -乔 -溪 -丛 -卢 -抹 -闷 -咨 -刮 -驾 -缆 -悟 -摘 -铒 -掷 -颇 -幻 -柄 -惠 -惨 -佳 -仇 -腊 -窝 -涤 -剑 -瞧 -堡 -泼 -葱 -罩 -霍 -捞 -胎 -苍 -滨 -俩 -捅 -湘 -砍 -霞 -邵 -萄 -疯 -淮 -遂 -熊 -粪 -烘 -宿 -档 -戈 -驳 -嫂 -裕 -徙 -箭 -捐 -肠 -撑 -晒 -辨 -殿 -莲 -摊 -搅 -酱 -屏 -疫 -哀 -蔡 -堵 -沫 -皱 -畅 -叠 -阁 -莱 -敲 -辖 -钩 -痕 -坝 -巷 -饿 -祸 -丘 -玄 -溜 -曰 -逻 -彭 -尝 -卿 -妨 -艇 -吞 -韦 -怨 -矮 -歇`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.js deleted file mode 100644 index 0a8328a1..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/spanish.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `ábaco -abdomen -abeja -abierto -abogado -abono -aborto -abrazo -abrir -abuelo -abuso -acabar -academia -acceso -acción -aceite -acelga -acento -aceptar -ácido -aclarar -acné -acoger -acoso -activo -acto -actriz -actuar -acudir -acuerdo -acusar -adicto -admitir -adoptar -adorno -aduana -adulto -aéreo -afectar -afición -afinar -afirmar -ágil -agitar -agonía -agosto -agotar -agregar -agrio -agua -agudo -águila -aguja -ahogo -ahorro -aire -aislar -ajedrez -ajeno -ajuste -alacrán -alambre -alarma -alba -álbum -alcalde -aldea -alegre -alejar -alerta -aleta -alfiler -alga -algodón -aliado -aliento -alivio -alma -almeja -almíbar -altar -alteza -altivo -alto -altura -alumno -alzar -amable -amante -amapola -amargo -amasar -ámbar -ámbito -ameno -amigo -amistad -amor -amparo -amplio -ancho -anciano -ancla -andar -andén -anemia -ángulo -anillo -ánimo -anís -anotar -antena -antiguo -antojo -anual -anular -anuncio -añadir -añejo -año -apagar -aparato -apetito -apio -aplicar -apodo -aporte -apoyo -aprender -aprobar -apuesta -apuro -arado -araña -arar -árbitro -árbol -arbusto -archivo -arco -arder -ardilla -arduo -área -árido -aries -armonía -arnés -aroma -arpa -arpón -arreglo -arroz -arruga -arte -artista -asa -asado -asalto -ascenso -asegurar -aseo -asesor -asiento -asilo -asistir -asno -asombro -áspero -astilla -astro -astuto -asumir -asunto -atajo -ataque -atar -atento -ateo -ático -atleta -átomo -atraer -atroz -atún -audaz -audio -auge -aula -aumento -ausente -autor -aval -avance -avaro -ave -avellana -avena -avestruz -avión -aviso -ayer -ayuda -ayuno -azafrán -azar -azote -azúcar -azufre -azul -baba -babor -bache -bahía -baile -bajar -balanza -balcón -balde -bambú -banco -banda -baño -barba -barco -barniz -barro -báscula -bastón -basura -batalla -batería -batir -batuta -baúl -bazar -bebé -bebida -bello -besar -beso -bestia -bicho -bien -bingo -blanco -bloque -blusa -boa -bobina -bobo -boca -bocina -boda -bodega -boina -bola -bolero -bolsa -bomba -bondad -bonito -bono -bonsái -borde -borrar -bosque -bote -botín -bóveda -bozal -bravo -brazo -brecha -breve -brillo -brinco -brisa -broca -broma -bronce -brote -bruja -brusco -bruto -buceo -bucle -bueno -buey -bufanda -bufón -búho -buitre -bulto -burbuja -burla -burro -buscar -butaca -buzón -caballo -cabeza -cabina -cabra -cacao -cadáver -cadena -caer -café -caída -caimán -caja -cajón -cal -calamar -calcio -caldo -calidad -calle -calma -calor -calvo -cama -cambio -camello -camino -campo -cáncer -candil -canela -canguro -canica -canto -caña -cañón -caoba -caos -capaz -capitán -capote -captar -capucha -cara -carbón -cárcel -careta -carga -cariño -carne -carpeta -carro -carta -casa -casco -casero -caspa -castor -catorce -catre -caudal -causa -cazo -cebolla -ceder -cedro -celda -célebre -celoso -célula -cemento -ceniza -centro -cerca -cerdo -cereza -cero -cerrar -certeza -césped -cetro -chacal -chaleco -champú -chancla -chapa -charla -chico -chiste -chivo -choque -choza -chuleta -chupar -ciclón -ciego -cielo -cien -cierto -cifra -cigarro -cima -cinco -cine -cinta -ciprés -circo -ciruela -cisne -cita -ciudad -clamor -clan -claro -clase -clave -cliente -clima -clínica -cobre -cocción -cochino -cocina -coco -código -codo -cofre -coger -cohete -cojín -cojo -cola -colcha -colegio -colgar -colina -collar -colmo -columna -combate -comer -comida -cómodo -compra -conde -conejo -conga -conocer -consejo -contar -copa -copia -corazón -corbata -corcho -cordón -corona -correr -coser -cosmos -costa -cráneo -cráter -crear -crecer -creído -crema -cría -crimen -cripta -crisis -cromo -crónica -croqueta -crudo -cruz -cuadro -cuarto -cuatro -cubo -cubrir -cuchara -cuello -cuento -cuerda -cuesta -cueva -cuidar -culebra -culpa -culto -cumbre -cumplir -cuna -cuneta -cuota -cupón -cúpula -curar -curioso -curso -curva -cutis -dama -danza -dar -dardo -dátil -deber -débil -década -decir -dedo -defensa -definir -dejar -delfín -delgado -delito -demora -denso -dental -deporte -derecho -derrota -desayuno -deseo -desfile -desnudo -destino -desvío -detalle -detener -deuda -día -diablo -diadema -diamante -diana -diario -dibujo -dictar -diente -dieta -diez -difícil -digno -dilema -diluir -dinero -directo -dirigir -disco -diseño -disfraz -diva -divino -doble -doce -dolor -domingo -don -donar -dorado -dormir -dorso -dos -dosis -dragón -droga -ducha -duda -duelo -dueño -dulce -dúo -duque -durar -dureza -duro -ébano -ebrio -echar -eco -ecuador -edad -edición -edificio -editor -educar -efecto -eficaz -eje -ejemplo -elefante -elegir -elemento -elevar -elipse -élite -elixir -elogio -eludir -embudo -emitir -emoción -empate -empeño -empleo -empresa -enano -encargo -enchufe -encía -enemigo -enero -enfado -enfermo -engaño -enigma -enlace -enorme -enredo -ensayo -enseñar -entero -entrar -envase -envío -época -equipo -erizo -escala -escena -escolar -escribir -escudo -esencia -esfera -esfuerzo -espada -espejo -espía -esposa -espuma -esquí -estar -este -estilo -estufa -etapa -eterno -ética -etnia -evadir -evaluar -evento -evitar -exacto -examen -exceso -excusa -exento -exigir -exilio -existir -éxito -experto -explicar -exponer -extremo -fábrica -fábula -fachada -fácil -factor -faena -faja -falda -fallo -falso -faltar -fama -familia -famoso -faraón -farmacia -farol -farsa -fase -fatiga -fauna -favor -fax -febrero -fecha -feliz -feo -feria -feroz -fértil -fervor -festín -fiable -fianza -fiar -fibra -ficción -ficha -fideo -fiebre -fiel -fiera -fiesta -figura -fijar -fijo -fila -filete -filial -filtro -fin -finca -fingir -finito -firma -flaco -flauta -flecha -flor -flota -fluir -flujo -flúor -fobia -foca -fogata -fogón -folio -folleto -fondo -forma -forro -fortuna -forzar -fosa -foto -fracaso -frágil -franja -frase -fraude -freír -freno -fresa -frío -frito -fruta -fuego -fuente -fuerza -fuga -fumar -función -funda -furgón -furia -fusil -fútbol -futuro -gacela -gafas -gaita -gajo -gala -galería -gallo -gamba -ganar -gancho -ganga -ganso -garaje -garza -gasolina -gastar -gato -gavilán -gemelo -gemir -gen -género -genio -gente -geranio -gerente -germen -gesto -gigante -gimnasio -girar -giro -glaciar -globo -gloria -gol -golfo -goloso -golpe -goma -gordo -gorila -gorra -gota -goteo -gozar -grada -gráfico -grano -grasa -gratis -grave -grieta -grillo -gripe -gris -grito -grosor -grúa -grueso -grumo -grupo -guante -guapo -guardia -guerra -guía -guiño -guion -guiso -guitarra -gusano -gustar -haber -hábil -hablar -hacer -hacha -hada -hallar -hamaca -harina -haz -hazaña -hebilla -hebra -hecho -helado -helio -hembra -herir -hermano -héroe -hervir -hielo -hierro -hígado -higiene -hijo -himno -historia -hocico -hogar -hoguera -hoja -hombre -hongo -honor -honra -hora -hormiga -horno -hostil -hoyo -hueco -huelga -huerta -hueso -huevo -huida -huir -humano -húmedo -humilde -humo -hundir -huracán -hurto -icono -ideal -idioma -ídolo -iglesia -iglú -igual -ilegal -ilusión -imagen -imán -imitar -impar -imperio -imponer -impulso -incapaz -índice -inerte -infiel -informe -ingenio -inicio -inmenso -inmune -innato -insecto -instante -interés -íntimo -intuir -inútil -invierno -ira -iris -ironía -isla -islote -jabalí -jabón -jamón -jarabe -jardín -jarra -jaula -jazmín -jefe -jeringa -jinete -jornada -joroba -joven -joya -juerga -jueves -juez -jugador -jugo -juguete -juicio -junco -jungla -junio -juntar -júpiter -jurar -justo -juvenil -juzgar -kilo -koala -labio -lacio -lacra -lado -ladrón -lagarto -lágrima -laguna -laico -lamer -lámina -lámpara -lana -lancha -langosta -lanza -lápiz -largo -larva -lástima -lata -látex -latir -laurel -lavar -lazo -leal -lección -leche -lector -leer -legión -legumbre -lejano -lengua -lento -leña -león -leopardo -lesión -letal -letra -leve -leyenda -libertad -libro -licor -líder -lidiar -lienzo -liga -ligero -lima -límite -limón -limpio -lince -lindo -línea -lingote -lino -linterna -líquido -liso -lista -litera -litio -litro -llaga -llama -llanto -llave -llegar -llenar -llevar -llorar -llover -lluvia -lobo -loción -loco -locura -lógica -logro -lombriz -lomo -lonja -lote -lucha -lucir -lugar -lujo -luna -lunes -lupa -lustro -luto -luz -maceta -macho -madera -madre -maduro -maestro -mafia -magia -mago -maíz -maldad -maleta -malla -malo -mamá -mambo -mamut -manco -mando -manejar -manga -maniquí -manjar -mano -manso -manta -mañana -mapa -máquina -mar -marco -marea -marfil -margen -marido -mármol -marrón -martes -marzo -masa -máscara -masivo -matar -materia -matiz -matriz -máximo -mayor -mazorca -mecha -medalla -medio -médula -mejilla -mejor -melena -melón -memoria -menor -mensaje -mente -menú -mercado -merengue -mérito -mes -mesón -meta -meter -método -metro -mezcla -miedo -miel -miembro -miga -mil -milagro -militar -millón -mimo -mina -minero -mínimo -minuto -miope -mirar -misa -miseria -misil -mismo -mitad -mito -mochila -moción -moda -modelo -moho -mojar -molde -moler -molino -momento -momia -monarca -moneda -monja -monto -moño -morada -morder -moreno -morir -morro -morsa -mortal -mosca -mostrar -motivo -mover -móvil -mozo -mucho -mudar -mueble -muela -muerte -muestra -mugre -mujer -mula -muleta -multa -mundo -muñeca -mural -muro -músculo -museo -musgo -música -muslo -nácar -nación -nadar -naipe -naranja -nariz -narrar -nasal -natal -nativo -natural -náusea -naval -nave -navidad -necio -néctar -negar -negocio -negro -neón -nervio -neto -neutro -nevar -nevera -nicho -nido -niebla -nieto -niñez -niño -nítido -nivel -nobleza -noche -nómina -noria -norma -norte -nota -noticia -novato -novela -novio -nube -nuca -núcleo -nudillo -nudo -nuera -nueve -nuez -nulo -número -nutria -oasis -obeso -obispo -objeto -obra -obrero -observar -obtener -obvio -oca -ocaso -océano -ochenta -ocho -ocio -ocre -octavo -octubre -oculto -ocupar -ocurrir -odiar -odio -odisea -oeste -ofensa -oferta -oficio -ofrecer -ogro -oído -oír -ojo -ola -oleada -olfato -olivo -olla -olmo -olor -olvido -ombligo -onda -onza -opaco -opción -ópera -opinar -oponer -optar -óptica -opuesto -oración -orador -oral -órbita -orca -orden -oreja -órgano -orgía -orgullo -oriente -origen -orilla -oro -orquesta -oruga -osadía -oscuro -osezno -oso -ostra -otoño -otro -oveja -óvulo -óxido -oxígeno -oyente -ozono -pacto -padre -paella -página -pago -país -pájaro -palabra -palco -paleta -pálido -palma -paloma -palpar -pan -panal -pánico -pantera -pañuelo -papá -papel -papilla -paquete -parar -parcela -pared -parir -paro -párpado -parque -párrafo -parte -pasar -paseo -pasión -paso -pasta -pata -patio -patria -pausa -pauta -pavo -payaso -peatón -pecado -pecera -pecho -pedal -pedir -pegar -peine -pelar -peldaño -pelea -peligro -pellejo -pelo -peluca -pena -pensar -peñón -peón -peor -pepino -pequeño -pera -percha -perder -pereza -perfil -perico -perla -permiso -perro -persona -pesa -pesca -pésimo -pestaña -pétalo -petróleo -pez -pezuña -picar -pichón -pie -piedra -pierna -pieza -pijama -pilar -piloto -pimienta -pino -pintor -pinza -piña -piojo -pipa -pirata -pisar -piscina -piso -pista -pitón -pizca -placa -plan -plata -playa -plaza -pleito -pleno -plomo -pluma -plural -pobre -poco -poder -podio -poema -poesía -poeta -polen -policía -pollo -polvo -pomada -pomelo -pomo -pompa -poner -porción -portal -posada -poseer -posible -poste -potencia -potro -pozo -prado -precoz -pregunta -premio -prensa -preso -previo -primo -príncipe -prisión -privar -proa -probar -proceso -producto -proeza -profesor -programa -prole -promesa -pronto -propio -próximo -prueba -público -puchero -pudor -pueblo -puerta -puesto -pulga -pulir -pulmón -pulpo -pulso -puma -punto -puñal -puño -pupa -pupila -puré -quedar -queja -quemar -querer -queso -quieto -química -quince -quitar -rábano -rabia -rabo -ración -radical -raíz -rama -rampa -rancho -rango -rapaz -rápido -rapto -rasgo -raspa -rato -rayo -raza -razón -reacción -realidad -rebaño -rebote -recaer -receta -rechazo -recoger -recreo -recto -recurso -red -redondo -reducir -reflejo -reforma -refrán -refugio -regalo -regir -regla -regreso -rehén -reino -reír -reja -relato -relevo -relieve -relleno -reloj -remar -remedio -remo -rencor -rendir -renta -reparto -repetir -reposo -reptil -res -rescate -resina -respeto -resto -resumen -retiro -retorno -retrato -reunir -revés -revista -rey -rezar -rico -riego -rienda -riesgo -rifa -rígido -rigor -rincón -riñón -río -riqueza -risa -ritmo -rito -rizo -roble -roce -rociar -rodar -rodeo -rodilla -roer -rojizo -rojo -romero -romper -ron -ronco -ronda -ropa -ropero -rosa -rosca -rostro -rotar -rubí -rubor -rudo -rueda -rugir -ruido -ruina -ruleta -rulo -rumbo -rumor -ruptura -ruta -rutina -sábado -saber -sabio -sable -sacar -sagaz -sagrado -sala -saldo -salero -salir -salmón -salón -salsa -salto -salud -salvar -samba -sanción -sandía -sanear -sangre -sanidad -sano -santo -sapo -saque -sardina -sartén -sastre -satán -sauna -saxofón -sección -seco -secreto -secta -sed -seguir -seis -sello -selva -semana -semilla -senda -sensor -señal -señor -separar -sepia -sequía -ser -serie -sermón -servir -sesenta -sesión -seta -setenta -severo -sexo -sexto -sidra -siesta -siete -siglo -signo -sílaba -silbar -silencio -silla -símbolo -simio -sirena -sistema -sitio -situar -sobre -socio -sodio -sol -solapa -soldado -soledad -sólido -soltar -solución -sombra -sondeo -sonido -sonoro -sonrisa -sopa -soplar -soporte -sordo -sorpresa -sorteo -sostén -sótano -suave -subir -suceso -sudor -suegra -suelo -sueño -suerte -sufrir -sujeto -sultán -sumar -superar -suplir -suponer -supremo -sur -surco -sureño -surgir -susto -sutil -tabaco -tabique -tabla -tabú -taco -tacto -tajo -talar -talco -talento -talla -talón -tamaño -tambor -tango -tanque -tapa -tapete -tapia -tapón -taquilla -tarde -tarea -tarifa -tarjeta -tarot -tarro -tarta -tatuaje -tauro -taza -tazón -teatro -techo -tecla -técnica -tejado -tejer -tejido -tela -teléfono -tema -temor -templo -tenaz -tender -tener -tenis -tenso -teoría -terapia -terco -término -ternura -terror -tesis -tesoro -testigo -tetera -texto -tez -tibio -tiburón -tiempo -tienda -tierra -tieso -tigre -tijera -tilde -timbre -tímido -timo -tinta -tío -típico -tipo -tira -tirón -titán -títere -título -tiza -toalla -tobillo -tocar -tocino -todo -toga -toldo -tomar -tono -tonto -topar -tope -toque -tórax -torero -tormenta -torneo -toro -torpedo -torre -torso -tortuga -tos -tosco -toser -tóxico -trabajo -tractor -traer -tráfico -trago -traje -tramo -trance -trato -trauma -trazar -trébol -tregua -treinta -tren -trepar -tres -tribu -trigo -tripa -triste -triunfo -trofeo -trompa -tronco -tropa -trote -trozo -truco -trueno -trufa -tubería -tubo -tuerto -tumba -tumor -túnel -túnica -turbina -turismo -turno -tutor -ubicar -úlcera -umbral -unidad -unir -universo -uno -untar -uña -urbano -urbe -urgente -urna -usar -usuario -útil -utopía -uva -vaca -vacío -vacuna -vagar -vago -vaina -vajilla -vale -válido -valle -valor -válvula -vampiro -vara -variar -varón -vaso -vecino -vector -vehículo -veinte -vejez -vela -velero -veloz -vena -vencer -venda -veneno -vengar -venir -venta -venus -ver -verano -verbo -verde -vereda -verja -verso -verter -vía -viaje -vibrar -vicio -víctima -vida -vídeo -vidrio -viejo -viernes -vigor -vil -villa -vinagre -vino -viñedo -violín -viral -virgo -virtud -visor -víspera -vista -vitamina -viudo -vivaz -vivero -vivir -vivo -volcán -volumen -volver -voraz -votar -voto -voz -vuelo -vulgar -yacer -yate -yegua -yema -yerno -yeso -yodo -yoga -yogur -zafiro -zanja -zapato -zarza -zona -zorro -zumo -zurdo`.split('\n'); diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts deleted file mode 100644 index b566a1db..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const wordlist: string[]; diff --git a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.js b/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.js deleted file mode 100644 index 789a0bc7..00000000 --- a/node_modules/nostr-tools/node_modules/@scure/bip39/wordlists/traditional-chinese.js +++ /dev/null @@ -1,2051 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wordlist = void 0; -exports.wordlist = `的 -一 -是 -在 -不 -了 -有 -和 -人 -這 -中 -大 -為 -上 -個 -國 -我 -以 -要 -他 -時 -來 -用 -們 -生 -到 -作 -地 -於 -出 -就 -分 -對 -成 -會 -可 -主 -發 -年 -動 -同 -工 -也 -能 -下 -過 -子 -說 -產 -種 -面 -而 -方 -後 -多 -定 -行 -學 -法 -所 -民 -得 -經 -十 -三 -之 -進 -著 -等 -部 -度 -家 -電 -力 -裡 -如 -水 -化 -高 -自 -二 -理 -起 -小 -物 -現 -實 -加 -量 -都 -兩 -體 -制 -機 -當 -使 -點 -從 -業 -本 -去 -把 -性 -好 -應 -開 -它 -合 -還 -因 -由 -其 -些 -然 -前 -外 -天 -政 -四 -日 -那 -社 -義 -事 -平 -形 -相 -全 -表 -間 -樣 -與 -關 -各 -重 -新 -線 -內 -數 -正 -心 -反 -你 -明 -看 -原 -又 -麼 -利 -比 -或 -但 -質 -氣 -第 -向 -道 -命 -此 -變 -條 -只 -沒 -結 -解 -問 -意 -建 -月 -公 -無 -系 -軍 -很 -情 -者 -最 -立 -代 -想 -已 -通 -並 -提 -直 -題 -黨 -程 -展 -五 -果 -料 -象 -員 -革 -位 -入 -常 -文 -總 -次 -品 -式 -活 -設 -及 -管 -特 -件 -長 -求 -老 -頭 -基 -資 -邊 -流 -路 -級 -少 -圖 -山 -統 -接 -知 -較 -將 -組 -見 -計 -別 -她 -手 -角 -期 -根 -論 -運 -農 -指 -幾 -九 -區 -強 -放 -決 -西 -被 -幹 -做 -必 -戰 -先 -回 -則 -任 -取 -據 -處 -隊 -南 -給 -色 -光 -門 -即 -保 -治 -北 -造 -百 -規 -熱 -領 -七 -海 -口 -東 -導 -器 -壓 -志 -世 -金 -增 -爭 -濟 -階 -油 -思 -術 -極 -交 -受 -聯 -什 -認 -六 -共 -權 -收 -證 -改 -清 -美 -再 -採 -轉 -更 -單 -風 -切 -打 -白 -教 -速 -花 -帶 -安 -場 -身 -車 -例 -真 -務 -具 -萬 -每 -目 -至 -達 -走 -積 -示 -議 -聲 -報 -鬥 -完 -類 -八 -離 -華 -名 -確 -才 -科 -張 -信 -馬 -節 -話 -米 -整 -空 -元 -況 -今 -集 -溫 -傳 -土 -許 -步 -群 -廣 -石 -記 -需 -段 -研 -界 -拉 -林 -律 -叫 -且 -究 -觀 -越 -織 -裝 -影 -算 -低 -持 -音 -眾 -書 -布 -复 -容 -兒 -須 -際 -商 -非 -驗 -連 -斷 -深 -難 -近 -礦 -千 -週 -委 -素 -技 -備 -半 -辦 -青 -省 -列 -習 -響 -約 -支 -般 -史 -感 -勞 -便 -團 -往 -酸 -歷 -市 -克 -何 -除 -消 -構 -府 -稱 -太 -準 -精 -值 -號 -率 -族 -維 -劃 -選 -標 -寫 -存 -候 -毛 -親 -快 -效 -斯 -院 -查 -江 -型 -眼 -王 -按 -格 -養 -易 -置 -派 -層 -片 -始 -卻 -專 -狀 -育 -廠 -京 -識 -適 -屬 -圓 -包 -火 -住 -調 -滿 -縣 -局 -照 -參 -紅 -細 -引 -聽 -該 -鐵 -價 -嚴 -首 -底 -液 -官 -德 -隨 -病 -蘇 -失 -爾 -死 -講 -配 -女 -黃 -推 -顯 -談 -罪 -神 -藝 -呢 -席 -含 -企 -望 -密 -批 -營 -項 -防 -舉 -球 -英 -氧 -勢 -告 -李 -台 -落 -木 -幫 -輪 -破 -亞 -師 -圍 -注 -遠 -字 -材 -排 -供 -河 -態 -封 -另 -施 -減 -樹 -溶 -怎 -止 -案 -言 -士 -均 -武 -固 -葉 -魚 -波 -視 -僅 -費 -緊 -愛 -左 -章 -早 -朝 -害 -續 -輕 -服 -試 -食 -充 -兵 -源 -判 -護 -司 -足 -某 -練 -差 -致 -板 -田 -降 -黑 -犯 -負 -擊 -范 -繼 -興 -似 -餘 -堅 -曲 -輸 -修 -故 -城 -夫 -夠 -送 -筆 -船 -佔 -右 -財 -吃 -富 -春 -職 -覺 -漢 -畫 -功 -巴 -跟 -雖 -雜 -飛 -檢 -吸 -助 -昇 -陽 -互 -初 -創 -抗 -考 -投 -壞 -策 -古 -徑 -換 -未 -跑 -留 -鋼 -曾 -端 -責 -站 -簡 -述 -錢 -副 -盡 -帝 -射 -草 -衝 -承 -獨 -令 -限 -阿 -宣 -環 -雙 -請 -超 -微 -讓 -控 -州 -良 -軸 -找 -否 -紀 -益 -依 -優 -頂 -礎 -載 -倒 -房 -突 -坐 -粉 -敵 -略 -客 -袁 -冷 -勝 -絕 -析 -塊 -劑 -測 -絲 -協 -訴 -念 -陳 -仍 -羅 -鹽 -友 -洋 -錯 -苦 -夜 -刑 -移 -頻 -逐 -靠 -混 -母 -短 -皮 -終 -聚 -汽 -村 -雲 -哪 -既 -距 -衛 -停 -烈 -央 -察 -燒 -迅 -境 -若 -印 -洲 -刻 -括 -激 -孔 -搞 -甚 -室 -待 -核 -校 -散 -侵 -吧 -甲 -遊 -久 -菜 -味 -舊 -模 -湖 -貨 -損 -預 -阻 -毫 -普 -穩 -乙 -媽 -植 -息 -擴 -銀 -語 -揮 -酒 -守 -拿 -序 -紙 -醫 -缺 -雨 -嗎 -針 -劉 -啊 -急 -唱 -誤 -訓 -願 -審 -附 -獲 -茶 -鮮 -糧 -斤 -孩 -脫 -硫 -肥 -善 -龍 -演 -父 -漸 -血 -歡 -械 -掌 -歌 -沙 -剛 -攻 -謂 -盾 -討 -晚 -粒 -亂 -燃 -矛 -乎 -殺 -藥 -寧 -魯 -貴 -鐘 -煤 -讀 -班 -伯 -香 -介 -迫 -句 -豐 -培 -握 -蘭 -擔 -弦 -蛋 -沉 -假 -穿 -執 -答 -樂 -誰 -順 -煙 -縮 -徵 -臉 -喜 -松 -腳 -困 -異 -免 -背 -星 -福 -買 -染 -井 -概 -慢 -怕 -磁 -倍 -祖 -皇 -促 -靜 -補 -評 -翻 -肉 -踐 -尼 -衣 -寬 -揚 -棉 -希 -傷 -操 -垂 -秋 -宜 -氫 -套 -督 -振 -架 -亮 -末 -憲 -慶 -編 -牛 -觸 -映 -雷 -銷 -詩 -座 -居 -抓 -裂 -胞 -呼 -娘 -景 -威 -綠 -晶 -厚 -盟 -衡 -雞 -孫 -延 -危 -膠 -屋 -鄉 -臨 -陸 -顧 -掉 -呀 -燈 -歲 -措 -束 -耐 -劇 -玉 -趙 -跳 -哥 -季 -課 -凱 -胡 -額 -款 -紹 -卷 -齊 -偉 -蒸 -殖 -永 -宗 -苗 -川 -爐 -岩 -弱 -零 -楊 -奏 -沿 -露 -桿 -探 -滑 -鎮 -飯 -濃 -航 -懷 -趕 -庫 -奪 -伊 -靈 -稅 -途 -滅 -賽 -歸 -召 -鼓 -播 -盤 -裁 -險 -康 -唯 -錄 -菌 -純 -借 -糖 -蓋 -橫 -符 -私 -努 -堂 -域 -槍 -潤 -幅 -哈 -竟 -熟 -蟲 -澤 -腦 -壤 -碳 -歐 -遍 -側 -寨 -敢 -徹 -慮 -斜 -薄 -庭 -納 -彈 -飼 -伸 -折 -麥 -濕 -暗 -荷 -瓦 -塞 -床 -築 -惡 -戶 -訪 -塔 -奇 -透 -梁 -刀 -旋 -跡 -卡 -氯 -遇 -份 -毒 -泥 -退 -洗 -擺 -灰 -彩 -賣 -耗 -夏 -擇 -忙 -銅 -獻 -硬 -予 -繁 -圈 -雪 -函 -亦 -抽 -篇 -陣 -陰 -丁 -尺 -追 -堆 -雄 -迎 -泛 -爸 -樓 -避 -謀 -噸 -野 -豬 -旗 -累 -偏 -典 -館 -索 -秦 -脂 -潮 -爺 -豆 -忽 -托 -驚 -塑 -遺 -愈 -朱 -替 -纖 -粗 -傾 -尚 -痛 -楚 -謝 -奮 -購 -磨 -君 -池 -旁 -碎 -骨 -監 -捕 -弟 -暴 -割 -貫 -殊 -釋 -詞 -亡 -壁 -頓 -寶 -午 -塵 -聞 -揭 -炮 -殘 -冬 -橋 -婦 -警 -綜 -招 -吳 -付 -浮 -遭 -徐 -您 -搖 -谷 -贊 -箱 -隔 -訂 -男 -吹 -園 -紛 -唐 -敗 -宋 -玻 -巨 -耕 -坦 -榮 -閉 -灣 -鍵 -凡 -駐 -鍋 -救 -恩 -剝 -凝 -鹼 -齒 -截 -煉 -麻 -紡 -禁 -廢 -盛 -版 -緩 -淨 -睛 -昌 -婚 -涉 -筒 -嘴 -插 -岸 -朗 -莊 -街 -藏 -姑 -貿 -腐 -奴 -啦 -慣 -乘 -夥 -恢 -勻 -紗 -扎 -辯 -耳 -彪 -臣 -億 -璃 -抵 -脈 -秀 -薩 -俄 -網 -舞 -店 -噴 -縱 -寸 -汗 -掛 -洪 -賀 -閃 -柬 -爆 -烯 -津 -稻 -牆 -軟 -勇 -像 -滾 -厘 -蒙 -芳 -肯 -坡 -柱 -盪 -腿 -儀 -旅 -尾 -軋 -冰 -貢 -登 -黎 -削 -鑽 -勒 -逃 -障 -氨 -郭 -峰 -幣 -港 -伏 -軌 -畝 -畢 -擦 -莫 -刺 -浪 -秘 -援 -株 -健 -售 -股 -島 -甘 -泡 -睡 -童 -鑄 -湯 -閥 -休 -匯 -舍 -牧 -繞 -炸 -哲 -磷 -績 -朋 -淡 -尖 -啟 -陷 -柴 -呈 -徒 -顏 -淚 -稍 -忘 -泵 -藍 -拖 -洞 -授 -鏡 -辛 -壯 -鋒 -貧 -虛 -彎 -摩 -泰 -幼 -廷 -尊 -窗 -綱 -弄 -隸 -疑 -氏 -宮 -姐 -震 -瑞 -怪 -尤 -琴 -循 -描 -膜 -違 -夾 -腰 -緣 -珠 -窮 -森 -枝 -竹 -溝 -催 -繩 -憶 -邦 -剩 -幸 -漿 -欄 -擁 -牙 -貯 -禮 -濾 -鈉 -紋 -罷 -拍 -咱 -喊 -袖 -埃 -勤 -罰 -焦 -潛 -伍 -墨 -欲 -縫 -姓 -刊 -飽 -仿 -獎 -鋁 -鬼 -麗 -跨 -默 -挖 -鏈 -掃 -喝 -袋 -炭 -污 -幕 -諸 -弧 -勵 -梅 -奶 -潔 -災 -舟 -鑑 -苯 -訟 -抱 -毀 -懂 -寒 -智 -埔 -寄 -屆 -躍 -渡 -挑 -丹 -艱 -貝 -碰 -拔 -爹 -戴 -碼 -夢 -芽 -熔 -赤 -漁 -哭 -敬 -顆 -奔 -鉛 -仲 -虎 -稀 -妹 -乏 -珍 -申 -桌 -遵 -允 -隆 -螺 -倉 -魏 -銳 -曉 -氮 -兼 -隱 -礙 -赫 -撥 -忠 -肅 -缸 -牽 -搶 -博 -巧 -殼 -兄 -杜 -訊 -誠 -碧 -祥 -柯 -頁 -巡 -矩 -悲 -灌 -齡 -倫 -票 -尋 -桂 -鋪 -聖 -恐 -恰 -鄭 -趣 -抬 -荒 -騰 -貼 -柔 -滴 -猛 -闊 -輛 -妻 -填 -撤 -儲 -簽 -鬧 -擾 -紫 -砂 -遞 -戲 -吊 -陶 -伐 -餵 -療 -瓶 -婆 -撫 -臂 -摸 -忍 -蝦 -蠟 -鄰 -胸 -鞏 -擠 -偶 -棄 -槽 -勁 -乳 -鄧 -吉 -仁 -爛 -磚 -租 -烏 -艦 -伴 -瓜 -淺 -丙 -暫 -燥 -橡 -柳 -迷 -暖 -牌 -秧 -膽 -詳 -簧 -踏 -瓷 -譜 -呆 -賓 -糊 -洛 -輝 -憤 -競 -隙 -怒 -粘 -乃 -緒 -肩 -籍 -敏 -塗 -熙 -皆 -偵 -懸 -掘 -享 -糾 -醒 -狂 -鎖 -淀 -恨 -牲 -霸 -爬 -賞 -逆 -玩 -陵 -祝 -秒 -浙 -貌 -役 -彼 -悉 -鴨 -趨 -鳳 -晨 -畜 -輩 -秩 -卵 -署 -梯 -炎 -灘 -棋 -驅 -篩 -峽 -冒 -啥 -壽 -譯 -浸 -泉 -帽 -遲 -矽 -疆 -貸 -漏 -稿 -冠 -嫩 -脅 -芯 -牢 -叛 -蝕 -奧 -鳴 -嶺 -羊 -憑 -串 -塘 -繪 -酵 -融 -盆 -錫 -廟 -籌 -凍 -輔 -攝 -襲 -筋 -拒 -僚 -旱 -鉀 -鳥 -漆 -沈 -眉 -疏 -添 -棒 -穗 -硝 -韓 -逼 -扭 -僑 -涼 -挺 -碗 -栽 -炒 -杯 -患 -餾 -勸 -豪 -遼 -勃 -鴻 -旦 -吏 -拜 -狗 -埋 -輥 -掩 -飲 -搬 -罵 -辭 -勾 -扣 -估 -蔣 -絨 -霧 -丈 -朵 -姆 -擬 -宇 -輯 -陝 -雕 -償 -蓄 -崇 -剪 -倡 -廳 -咬 -駛 -薯 -刷 -斥 -番 -賦 -奉 -佛 -澆 -漫 -曼 -扇 -鈣 -桃 -扶 -仔 -返 -俗 -虧 -腔 -鞋 -棱 -覆 -框 -悄 -叔 -撞 -騙 -勘 -旺 -沸 -孤 -吐 -孟 -渠 -屈 -疾 -妙 -惜 -仰 -狠 -脹 -諧 -拋 -黴 -桑 -崗 -嘛 -衰 -盜 -滲 -臟 -賴 -湧 -甜 -曹 -閱 -肌 -哩 -厲 -烴 -緯 -毅 -昨 -偽 -症 -煮 -嘆 -釘 -搭 -莖 -籠 -酷 -偷 -弓 -錐 -恆 -傑 -坑 -鼻 -翼 -綸 -敘 -獄 -逮 -罐 -絡 -棚 -抑 -膨 -蔬 -寺 -驟 -穆 -冶 -枯 -冊 -屍 -凸 -紳 -坯 -犧 -焰 -轟 -欣 -晉 -瘦 -禦 -錠 -錦 -喪 -旬 -鍛 -壟 -搜 -撲 -邀 -亭 -酯 -邁 -舒 -脆 -酶 -閒 -憂 -酚 -頑 -羽 -漲 -卸 -仗 -陪 -闢 -懲 -杭 -姚 -肚 -捉 -飄 -漂 -昆 -欺 -吾 -郎 -烷 -汁 -呵 -飾 -蕭 -雅 -郵 -遷 -燕 -撒 -姻 -赴 -宴 -煩 -債 -帳 -斑 -鈴 -旨 -醇 -董 -餅 -雛 -姿 -拌 -傅 -腹 -妥 -揉 -賢 -拆 -歪 -葡 -胺 -丟 -浩 -徽 -昂 -墊 -擋 -覽 -貪 -慰 -繳 -汪 -慌 -馮 -諾 -姜 -誼 -兇 -劣 -誣 -耀 -昏 -躺 -盈 -騎 -喬 -溪 -叢 -盧 -抹 -悶 -諮 -刮 -駕 -纜 -悟 -摘 -鉺 -擲 -頗 -幻 -柄 -惠 -慘 -佳 -仇 -臘 -窩 -滌 -劍 -瞧 -堡 -潑 -蔥 -罩 -霍 -撈 -胎 -蒼 -濱 -倆 -捅 -湘 -砍 -霞 -邵 -萄 -瘋 -淮 -遂 -熊 -糞 -烘 -宿 -檔 -戈 -駁 -嫂 -裕 -徙 -箭 -捐 -腸 -撐 -曬 -辨 -殿 -蓮 -攤 -攪 -醬 -屏 -疫 -哀 -蔡 -堵 -沫 -皺 -暢 -疊 -閣 -萊 -敲 -轄 -鉤 -痕 -壩 -巷 -餓 -禍 -丘 -玄 -溜 -曰 -邏 -彭 -嘗 -卿 -妨 -艇 -吞 -韋 -怨 -矮 -歇`.split('\n'); diff --git a/package-lock.json b/package-lock.json index 3b71fd53..9bf1cf81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.1", "dependencies": { "applesauce-accounts": "^3.1.0", + "applesauce-content": "^4.0.0", "applesauce-core": "^3.1.0", "applesauce-loaders": "^3.1.0", "applesauce-react": "^3.1.0", @@ -333,16 +334,17 @@ } }, "node_modules/@cashu/cashu-ts": { - "version": "2.0.0-rc1", - "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", - "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.7.2.tgz", + "integrity": "sha512-AOwL6+10AA0syRf2mtRYgoTvAz31gE4MnElj9TLS9xG3k8Msxy27awBlCX5MsBpBgcZZoqWOReYEuUgnbN3IQQ==", "license": "MIT", "dependencies": { - "@cashu/crypto": "^0.2.7", - "@noble/curves": "^1.3.0", - "@noble/hashes": "^1.3.3", - "@scure/bip32": "^1.3.3", - "buffer": "^6.0.3" + "@noble/curves": "^1.9.5", + "@noble/hashes": "^1.5.0", + "@scure/bip32": "^1.5.0" + }, + "engines": { + "node": ">=22.4.0" } }, "node_modules/@cashu/crypto": { @@ -358,6 +360,19 @@ "buffer": "^6.0.3" } }, + "node_modules/@cashu/crypto/node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -1373,18 +1388,39 @@ } }, "node_modules/@scure/bip39": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", - "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", "license": "MIT", "dependencies": { - "@noble/hashes": "~1.8.0", - "@scure/base": "~1.2.5" + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1845,18 +1881,18 @@ } }, "node_modules/applesauce-content": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", - "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-4.0.0.tgz", + "integrity": "sha512-2ZrhM/UCQkcZcAldXJX+KfWAPAtkoTXH5BwPhYpaMw0UgHjWX8mYiy/801PtLBr2gWkKd/Dw1obdNDcPUO3idw==", "license": "MIT", "dependencies": { - "@cashu/cashu-ts": "2.0.0-rc1", + "@cashu/cashu-ts": "^2.7.2", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3", - "applesauce-core": "^3.1.0", + "applesauce-core": "^4.0.0", "mdast-util-find-and-replace": "^3.0.2", - "nostr-tools": "~2.15", + "nostr-tools": "~2.17", "remark": "^15.0.1", "remark-parse": "^11.0.0", "unified": "^11.0.5", @@ -1867,6 +1903,157 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-content/node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.3.1" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/@scure/bip32/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/applesauce-core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/applesauce-core/-/applesauce-core-4.0.0.tgz", + "integrity": "sha512-cXg9lDU0PKpAeVw7FGN3jzKB/k9kX5YOI7uwzrZhibYB5PfpHAYRiVexxBuFdT2RNaDgQogXl75gV2hag5uLuw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.7.1", + "@scure/base": "^1.2.4", + "debug": "^4.4.0", + "fast-deep-equal": "^3.1.3", + "hash-sum": "^2.0.0", + "light-bolt11-decoder": "^3.2.0", + "nanoid": "^5.0.9", + "nostr-tools": "~2.17", + "rxjs": "^7.8.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.17.0.tgz", + "integrity": "sha512-lrvHM7cSaGhz7F0YuBvgHMoU2s8/KuThihDoOYk8w5gpVHTy0DeUCAgCN8uLGeuSl5MAWekJr9Dkfo5HClqO9w==", + "license": "Unlicense", + "dependencies": { + "@noble/ciphers": "^0.5.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.1", + "@scure/base": "1.1.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1", + "nostr-wasm": "0.1.0" + }, + "peerDependencies": { + "typescript": ">=5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/applesauce-content/node_modules/nostr-tools/node_modules/@scure/base": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", + "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, "node_modules/applesauce-core": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-core/-/applesauce-core-3.1.0.tgz", @@ -1904,6 +2091,42 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-factory/node_modules/@cashu/cashu-ts": { + "version": "2.0.0-rc1", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", + "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "license": "MIT", + "dependencies": { + "@cashu/crypto": "^0.2.7", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@scure/bip32": "^1.3.3", + "buffer": "^6.0.3" + } + }, + "node_modules/applesauce-factory/node_modules/applesauce-content": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", + "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "license": "MIT", + "dependencies": { + "@cashu/cashu-ts": "2.0.0-rc1", + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "@types/unist": "^3.0.3", + "applesauce-core": "^3.1.0", + "mdast-util-find-and-replace": "^3.0.2", + "nostr-tools": "~2.15", + "remark": "^15.0.1", + "remark-parse": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit-parents": "^6.0.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, "node_modules/applesauce-loaders": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-loaders/-/applesauce-loaders-3.1.0.tgz", @@ -1942,6 +2165,42 @@ "url": "lightning:nostrudel@geyser.fund" } }, + "node_modules/applesauce-react/node_modules/@cashu/cashu-ts": { + "version": "2.0.0-rc1", + "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.0.0-rc1.tgz", + "integrity": "sha512-39459l7x/fUMEgOsCdGLLl6rMekO4nbv+wEuavmyElh8hgN8t66wcb29AJvdFTb6K3lPACKF2rs/jAlPYrN7Ng==", + "license": "MIT", + "dependencies": { + "@cashu/crypto": "^0.2.7", + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@scure/bip32": "^1.3.3", + "buffer": "^6.0.3" + } + }, + "node_modules/applesauce-react/node_modules/applesauce-content": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/applesauce-content/-/applesauce-content-3.1.0.tgz", + "integrity": "sha512-dxXmEzMz5KQIdaKOVJg2ufphVPoECWa6l7NIQo5mXQGrjv3VrT5QY5x0MVWJWWcC4fRBwE8xIhJyfhIeosymMQ==", + "license": "MIT", + "dependencies": { + "@cashu/cashu-ts": "2.0.0-rc1", + "@types/hast": "^3.0.4", + "@types/mdast": "^4.0.4", + "@types/unist": "^3.0.3", + "applesauce-core": "^3.1.0", + "mdast-util-find-and-replace": "^3.0.2", + "nostr-tools": "~2.15", + "remark": "^15.0.1", + "remark-parse": "^11.0.0", + "unified": "^11.0.5", + "unist-util-visit-parents": "^6.0.1" + }, + "funding": { + "type": "lightning", + "url": "lightning:nostrudel@geyser.fund" + } + }, "node_modules/applesauce-relay": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/applesauce-relay/-/applesauce-relay-3.1.0.tgz", @@ -3893,19 +4152,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/nostr-tools/node_modules/@scure/bip39": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", - "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.3.0", - "@scure/base": "~1.1.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/nostr-wasm": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz", diff --git a/package.json b/package.json index 03b5b96f..80cd4080 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "applesauce-accounts": "^3.1.0", + "applesauce-content": "^4.0.0", "applesauce-core": "^3.1.0", "applesauce-loaders": "^3.1.0", "applesauce-react": "^3.1.0", @@ -33,19 +34,35 @@ }, "eslintConfig": { "root": true, - "env": { "browser": true, "es2020": true }, + "env": { + "browser": true, + "es2020": true + }, "extends": [ "eslint:recommended" ], - "ignorePatterns": ["dist", ".eslintrc.cjs"], + "ignorePatterns": [ + "dist", + ".eslintrc.cjs" + ], "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "react-refresh"], + "plugins": [ + "@typescript-eslint", + "react-refresh" + ], "rules": { "react-refresh/only-export-components": [ "warn", - { "allowConstantExport": true } + { + "allowConstantExport": true + } + ], + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_" + } ], - "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], "@typescript-eslint/no-explicit-any": "warn", "prefer-const": "error", "no-var": "error" diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index d7e17b76..7e1bca57 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -2,8 +2,22 @@ import React, { useState, useEffect } from 'react' import { Hooks } from 'applesauce-react' import { useEventModel } from 'applesauce-react/hooks' import { Models } from 'applesauce-core' +import { getParsedContent } from 'applesauce-content/text' import { NostrEvent } from 'nostr-tools' +interface ParsedNode { + type: string + value?: string + url?: string + encoded?: string + children?: ParsedNode[] +} + +interface ParsedContent { + type: string + children: ParsedNode[] +} + interface Bookmark { id: string title: string @@ -15,6 +29,7 @@ interface Bookmark { eventReferences?: string[] articleReferences?: string[] urlReferences?: string[] + parsedContent?: ParsedContent } interface BookmarksProps { @@ -100,6 +115,9 @@ const Bookmarks: React.FC = ({ addressLoader, onLogout }) => { const articleTags = event.tags.filter((tag: string[]) => tag[0] === 'a') const urlTags = event.tags.filter((tag: string[]) => tag[0] === 'r') + // Use applesauce-content to parse the content properly + const parsedContent = event.content ? getParsedContent(event.content) as ParsedContent : undefined + // Get the title from content or use a default const title = event.content || `Bookmark List (${eventTags.length + articleTags.length + urlTags.length} items)` @@ -110,6 +128,7 @@ const Bookmarks: React.FC = ({ addressLoader, onLogout }) => { content: event.content, created_at: event.created_at, tags: event.tags, + parsedContent: parsedContent, // Add metadata about the bookmark list bookmarkCount: eventTags.length + articleTags.length + urlTags.length, eventReferences: eventTags.map(tag => tag[1]), @@ -126,6 +145,67 @@ const Bookmarks: React.FC = ({ addressLoader, onLogout }) => { return new Date(timestamp * 1000).toLocaleDateString() } + // Component to render parsed content using applesauce-content + const renderParsedContent = (parsedContent: ParsedContent) => { + if (!parsedContent || !parsedContent.children) { + return null + } + + const renderNode = (node: ParsedNode, index: number): React.ReactNode => { + if (node.type === 'text') { + return {node.value} + } + + if (node.type === 'mention') { + return ( + + {node.encoded} + + ) + } + + if (node.type === 'link') { + return ( + + {node.url} + + ) + } + + if (node.children) { + return ( + + {node.children.map((child: ParsedNode, childIndex: number) => + renderNode(child, childIndex) + )} + + ) + } + + return null + } + + return ( +
+ {parsedContent.children.map((node: ParsedNode, index: number) => + renderNode(node, index) + )} +
+ ) + } + const formatUserDisplay = () => { if (!activeAccount) return 'Unknown User' @@ -217,7 +297,11 @@ const Bookmarks: React.FC = ({ addressLoader, onLogout }) => { )} - {bookmark.content && ( + {bookmark.parsedContent ? ( +
+ {renderParsedContent(bookmark.parsedContent)} +
+ ) : bookmark.content && (

{bookmark.content}

)}
diff --git a/src/index.css b/src/index.css index d2061b72..145b5d68 100644 --- a/src/index.css +++ b/src/index.css @@ -181,6 +181,36 @@ body { font-size: 0.8rem; } +.parsed-content { + margin: 1rem 0; + line-height: 1.6; +} + +.nostr-mention { + color: #007bff; + text-decoration: none; + font-family: monospace; + background: #f8f9fa; + padding: 0.2rem 0.4rem; + border-radius: 3px; + font-size: 0.9rem; +} + +.nostr-mention:hover { + background: #e9ecef; + text-decoration: underline; +} + +.nostr-link { + color: #007bff; + text-decoration: none; + word-break: break-all; +} + +.nostr-link:hover { + text-decoration: underline; +} + .logout-button { background: #dc3545; color: white;