From dbbb7d5e1e40990ad2355e61f1ff1d4679a3a2a5 Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Thu, 17 Aug 2023 17:15:50 +0200 Subject: [PATCH 1/6] Add Trezor wallet adapter --- PACKAGES.md | 1 + packages/wallets/trezor/CHANGELOG.md | 7 + packages/wallets/trezor/LICENSE | 202 ++++++++++ packages/wallets/trezor/README.md | 5 + packages/wallets/trezor/package.json | 46 +++ packages/wallets/trezor/src/adapter.ts | 169 ++++++++ packages/wallets/trezor/src/index.ts | 1 + packages/wallets/trezor/tsconfig.cjs.json | 7 + packages/wallets/trezor/tsconfig.esm.json | 8 + packages/wallets/trezor/tsconfig.json | 11 + packages/wallets/wallets/package.json | 1 + packages/wallets/wallets/src/index.ts | 1 + pnpm-lock.yaml | 468 ++++++++++++++++++++++ 13 files changed, 927 insertions(+) create mode 100644 packages/wallets/trezor/CHANGELOG.md create mode 100644 packages/wallets/trezor/LICENSE create mode 100644 packages/wallets/trezor/README.md create mode 100644 packages/wallets/trezor/package.json create mode 100644 packages/wallets/trezor/src/adapter.ts create mode 100644 packages/wallets/trezor/src/index.ts create mode 100644 packages/wallets/trezor/tsconfig.cjs.json create mode 100644 packages/wallets/trezor/tsconfig.esm.json create mode 100644 packages/wallets/trezor/tsconfig.json diff --git a/PACKAGES.md b/PACKAGES.md index 75fb6c40c..974376092 100644 --- a/PACKAGES.md +++ b/PACKAGES.md @@ -68,6 +68,7 @@ You can use the [wallets](https://github.com/solana-labs/wallet-adapter/tree/mas | [tokenary](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/tokenary) | Adapter for [Tokenary](https://tokenary.io) | [`@solana/wallet-adapter-tokenary`](https://npmjs.com/package/@solana/wallet-adapter-tokenary) | | [tokenpocket](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/tokenpocket) | Adapter for [TokenPocket](https://tokenpocket.pro) | [`@solana/wallet-adapter-tokenpocket`](https://npmjs.com/package/@solana/wallet-adapter-tokenpocket) | | [torus](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/torus) | Adapter for [Torus](https://tor.us) | [`@solana/wallet-adapter-torus`](https://npmjs.com/package/@solana/wallet-adapter-torus) | +| [trezor](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/trezor) | Adapter for [Trezor](https://trezor.io) | [`@solana/wallet-adapter-trezor`](https://npmjs.com/package/@solana/wallet-adapter-trezor) | | [trust](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/trust) | Adapter for [Trust Wallet](https://trustwallet.com) | [`@solana/wallet-adapter-trust`](https://npmjs.com/package/@solana/wallet-adapter-trust) | | [walletconnect](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/walletconnect) | Adapter for [WalletConnect](https://walletconnect.com) | [`@solana/wallet-adapter-walletconnect`](https://npmjs.com/package/@solana/wallet-adapter-walletconnect) | | [xdefi](https://github.com/solana-labs/wallet-adapter/tree/master/packages/wallets/xdefi) | Adapter for [XDEFI](https://xdefi.io) | [`@solana/wallet-adapter-xdefi`](https://npmjs.com/package/@solana/wallet-adapter-xdefi) | diff --git a/packages/wallets/trezor/CHANGELOG.md b/packages/wallets/trezor/CHANGELOG.md new file mode 100644 index 000000000..6512b96c2 --- /dev/null +++ b/packages/wallets/trezor/CHANGELOG.md @@ -0,0 +1,7 @@ +# @solana/wallet-adapter-trezor + +## 0.1.0 + +### Patch Changes + +- Trezor wallet adapter added [] diff --git a/packages/wallets/trezor/LICENSE b/packages/wallets/trezor/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/packages/wallets/trezor/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/wallets/trezor/README.md b/packages/wallets/trezor/README.md new file mode 100644 index 000000000..89ca30c27 --- /dev/null +++ b/packages/wallets/trezor/README.md @@ -0,0 +1,5 @@ +# `@solana/wallet-adapter-trezor` + + + +Coming soon. diff --git a/packages/wallets/trezor/package.json b/packages/wallets/trezor/package.json new file mode 100644 index 000000000..e9ea2bfa9 --- /dev/null +++ b/packages/wallets/trezor/package.json @@ -0,0 +1,46 @@ +{ + "name": "@solana/wallet-adapter-trezor", + "version": "0.1.0", + "author": "Solana Maintainers ", + "repository": "https://github.com/solana-labs/wallet-adapter", + "license": "Apache-2.0", + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "src", + "LICENSE" + ], + "engines": { + "node": ">=16" + }, + "type": "module", + "sideEffects": false, + "main": "./lib/cjs/index.js", + "module": "./lib/esm/index.js", + "types": "./lib/types/index.d.ts", + "exports": { + "require": "./lib/cjs/index.js", + "import": "./lib/esm/index.js", + "types": "./lib/types/index.d.ts" + }, + "scripts": { + "build": "tsc --build --verbose && pnpm run package", + "clean": "shx mkdir -p lib && shx rm -rf lib", + "lint": "prettier --check 'src/{*,**/*}.{ts,tsx,js,jsx,json}' && eslint", + "package": "shx mkdir -p lib/cjs && shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json" + }, + "peerDependencies": { + "@solana/web3.js": "^1.77.3" + }, + "dependencies": { + "@solana/wallet-adapter-base": "workspace:^", + "@trezor/connect-web": "^9.0.11", + "buffer": "^6.0.3" + }, + "devDependencies": { + "@solana/web3.js": "^1.77.3", + "shx": "^0.3.4" + } +} diff --git a/packages/wallets/trezor/src/adapter.ts b/packages/wallets/trezor/src/adapter.ts new file mode 100644 index 000000000..b0bac764c --- /dev/null +++ b/packages/wallets/trezor/src/adapter.ts @@ -0,0 +1,169 @@ +import type { WalletName } from '@solana/wallet-adapter-base'; +import TrezorConnect, { DEVICE, DEVICE_EVENT } from '@trezor/connect-web'; +import { + BaseSignerWalletAdapter, + WalletDisconnectedError, + WalletDisconnectionError, + WalletNotConnectedError, + WalletNotReadyError, + WalletPublicKeyError, + WalletReadyState, + WalletSignTransactionError, + isVersionedTransaction, +} from '@solana/wallet-adapter-base'; +import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js'; +import { PublicKey } from '@solana/web3.js'; + +export interface TrezorWalletAdapterConfig { + derivationPath?: string; + connectUrl?: string; +} + +export const TrezorWalletName = 'Trezor' as WalletName<'Trezor'>; + +export class TrezorWalletAdapter extends BaseSignerWalletAdapter { + name = TrezorWalletName; + url = 'https://trezor.io'; + icon = + 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEwOHB4IiBoZWlnaHQ9IjEwOHB4IiB2aWV3Qm94PSIwIDAgMTA4IDEwOCIgdmVyc2lvbj0iMS4xIj4NCjxnIGlkPSJzdXJmYWNlMSI+DQo8cGF0aCBzdHlsZT0iIHN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6cmdiKDEwMCUsMTAwJSwxMDAlKTtmaWxsLW9wYWNpdHk6MTsiIGQ9Ik0gNTQgMCBDIDgzLjgyNDIxOSAwIDEwOCAyNC4xNzU3ODEgMTA4IDU0IEMgMTA4IDgzLjgyNDIxOSA4My44MjQyMTkgMTA4IDU0IDEwOCBDIDI0LjE3NTc4MSAxMDggMCA4My44MjQyMTkgMCA1NCBDIDAgMjQuMTc1NzgxIDI0LjE3NTc4MSAwIDU0IDAgWiBNIDU0IDAgIi8+DQo8cGF0aCBzdHlsZT0iIHN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6cmdiKDAlLDAlLDAlKTtmaWxsLW9wYWNpdHk6MTsiIGQ9Ik0gNTQuMDQ2ODc1IDEwLjEyNSBDIDQxLjk0MTQwNiAxMC4xMjUgMzIuMTQwNjI1IDIwLjI0MjE4OCAzMi4xNDA2MjUgMzIuNzQyMTg4IEwgMzIuMTQwNjI1IDQxLjIxODc1IEMgMjcuODkwNjI1IDQyLjAxNTYyNSAyMy42MjUgNDMuMDc0MjE5IDIzLjYyNSA0NC40NDkyMTkgTCAyMy42MjUgODguNjg3NSBDIDIzLjYyNSA4OC42ODc1IDIzLjYyNSA4OS45MTAxNTYgMjQuOTU3MDMxIDkwLjQ4ODI4MSBDIDI5Ljc4MTI1IDkyLjUwNzgxMiA0OC43Njk1MzEgOTkuNDQ1MzEyIDUzLjEzMjgxMiAxMDEuMDM1MTU2IEMgNTMuNjk1MzEyIDEwMS4yNSA1My44NTE1NjIgMTAxLjI1IDU0IDEwMS4yNSBDIDU0LjIwNzAzMSAxMDEuMjUgNTQuMzA0Njg4IDEwMS4yNSA1NC44NjcxODggMTAxLjAzNTE1NiBDIDU5LjIzMDQ2OSA5OS40NDUzMTIgNzguMjY1NjI1IDkyLjUwNzgxMiA4My4wOTM3NSA5MC40ODgyODEgQyA4NC4zMjgxMjUgODkuOTYwOTM4IDg0LjM3NSA4OC43MzgyODEgODQuMzc1IDg4LjczODI4MSBMIDg0LjM3NSA0NC40NDkyMTkgQyA4NC4zNzUgNDMuMDc0MjE5IDgwLjE3MTg3NSA0MS45NjQ4NDQgNzUuOTA2MjUgNDEuMjE4NzUgTCA3NS45MDYyNSAzMi43NDIxODggQyA3NS45Njg3NSAyMC4yNDIxODggNjYuMTA5Mzc1IDEwLjEyNSA1NC4wNDY4NzUgMTAuMTI1IFogTSA1NC4wNDY4NzUgMjAuOTMzNTk0IEMgNjEuMTgzNTk0IDIwLjkzMzU5NCA2NS40OTYwOTQgMjUuMzg2NzE5IDY1LjQ5NjA5NCAzMi43NTM5MDYgTCA2NS40OTYwOTQgNDAuMTIxMDk0IEMgNTcuNDk2MDk0IDM5LjU0Mjk2OSA1MC42NjQwNjIgMzkuNTQyOTY5IDQyLjYxMzI4MSA0MC4xMjEwOTQgTCA0Mi42MTMyODEgMzIuNzUzOTA2IEMgNDIuNjEzMjgxIDI1LjM3NSA0Ni45MjU3ODEgMjAuOTMzNTk0IDU0LjA0Njg3NSAyMC45MzM1OTQgWiBNIDU0IDUwLjk2ODc1IEMgNjMuOTU3MDMxIDUwLjk2ODc1IDcyLjMxNjQwNiA1MS43NjU2MjUgNzIuMzE2NDA2IDUzLjE5MTQwNiBMIDcyLjMxNjQwNiA4MC43ODkwNjIgQyA3Mi4zMTY0MDYgODEuMjE4NzUgNzIuMjY1NjI1IDgxLjI2OTUzMSA3MS44OTg0MzggODEuNDIxODc1IEMgNzEuNTQ2ODc1IDgxLjU4NTkzOCA1NC45MTc5NjkgODcuNzc3MzQ0IDU0LjkxNzk2OSA4Ny43NzczNDQgQyA1NC45MTc5NjkgODcuNzc3MzQ0IDU0LjI0NjA5NCA4Ny45OTIxODggNTQuMDQ2ODc1IDg3Ljk5MjE4OCBDIDUzLjgzOTg0NCA4Ny45OTIxODggNTMuMTc5Njg4IDg3LjcyNjU2MiA1My4xNzk2ODggODcuNzI2NTYyIEMgNTMuMTc5Njg4IDg3LjcyNjU2MiAzNi41NTA3ODEgODEuNTM1MTU2IDM2LjE5OTIxOSA4MS4zNzEwOTQgQyAzNS44NDM3NSA4MS4yMDcwMzEgMzUuNzgxMjUgODEuMTU2MjUgMzUuNzgxMjUgODAuNzM4MjgxIEwgMzUuNzgxMjUgNTMuMTQwNjI1IEMgMzUuNjgzNTk0IDUxLjcxNDg0NCA0NC4wNDI5NjkgNTAuOTY4NzUgNTQgNTAuOTY4NzUgWiBNIDU0IDUwLjk2ODc1ICIvPg0KPC9nPg0KPC9zdmc+DQo='; + supportedTransactionVersions: ReadonlySet = new Set(['legacy', 0]); + + private _derivationPath: string; + private _connectUrl?: string; + private _connecting: boolean; + private _publicKey: PublicKey | null; + private _readyState: WalletReadyState = + typeof window === 'undefined' || + typeof document === 'undefined' || + typeof navigator === 'undefined' || + !navigator.hid + ? WalletReadyState.Unsupported + : WalletReadyState.Loadable; + + constructor(config: TrezorWalletAdapterConfig = {}) { + super(); + this._derivationPath = config.derivationPath || `m/44'/501'/0'/0'`; + this._connectUrl = config.connectUrl; + this._connecting = false; + this._publicKey = null; + } + + get publicKey() { + return this._publicKey; + } + + get connecting() { + return this._connecting; + } + + get readyState() { + return this._readyState; + } + + async connect(): Promise { + try { + if (this.connected || this.connecting) return; + if (this._readyState !== WalletReadyState.Loadable) throw new WalletNotReadyError(); + + this._connecting = true; + + const connectUrl = this._connectUrl && this._connectUrl + (this._connectUrl.endsWith('/') ? '' : '/'); + + await TrezorConnect.init({ + manifest: { + email: 'maintainers@solana.foundation', + appUrl: 'https://github.com/solana-labs/wallet-adapter', + }, + lazyLoad: true, + ...(this._connectUrl + ? { + connectSrc: connectUrl, + iframeSrc: connectUrl, + } + : {}), + }); + + let result; + try { + result = await TrezorConnect.solanaGetPublicKey({ + path: this._derivationPath, + }); + } catch (error: any) { + throw new WalletPublicKeyError(error?.message, error); + } + + if (!result.success) { + throw new WalletPublicKeyError(result.payload?.error, result.payload); + } + + const publicKey = result.payload.publicKey; + + TrezorConnect.on(DEVICE_EVENT, (event: any) => { + if (event.type === DEVICE.DISCONNECT) { + this._disconnected(); + } + }); + + this._publicKey = new PublicKey(Buffer.from(publicKey, 'hex')); + + this.emit('connect', this._publicKey); + } catch (error: any) { + this.emit('error', error); + throw error; + } finally { + this._connecting = false; + } + } + + async disconnect(): Promise { + this._publicKey = null; + + try { + await TrezorConnect.dispose(); + } catch (error: any) { + this.emit('error', new WalletDisconnectionError(error?.message, error)); + } + + this.emit('disconnect'); + } + + async signTransaction(transaction: T): Promise { + try { + const publicKey = this._publicKey; + if (!publicKey) throw new WalletNotConnectedError(); + + const serializedTransaction = isVersionedTransaction(transaction) + ? transaction.message.serialize() + : transaction.serializeMessage(); + + let result; + try { + result = await TrezorConnect.solanaSignTransaction({ + path: this._derivationPath, + serializedTx: Buffer.from(serializedTransaction).toString('hex'), + }); + } catch (error: any) { + throw new WalletSignTransactionError(error?.message, error); + } + + if (!result.success) { + throw new WalletSignTransactionError(result.payload?.error, result.payload); + } + + transaction.addSignature(publicKey, Buffer.from(result.payload.signature, 'hex')); + + return transaction; + } catch (error: any) { + this.emit('error', error); + throw error; + } + } + + private _disconnected = () => { + TrezorConnect.dispose(); + this._publicKey = null; + + this.emit('error', new WalletDisconnectedError()); + this.emit('disconnect'); + }; +} diff --git a/packages/wallets/trezor/src/index.ts b/packages/wallets/trezor/src/index.ts new file mode 100644 index 000000000..ddec7b57f --- /dev/null +++ b/packages/wallets/trezor/src/index.ts @@ -0,0 +1 @@ +export * from './adapter.js'; diff --git a/packages/wallets/trezor/tsconfig.cjs.json b/packages/wallets/trezor/tsconfig.cjs.json new file mode 100644 index 000000000..099b9aa7a --- /dev/null +++ b/packages/wallets/trezor/tsconfig.cjs.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.cjs.json", + "include": ["src"], + "compilerOptions": { + "outDir": "lib/cjs" + } +} diff --git a/packages/wallets/trezor/tsconfig.esm.json b/packages/wallets/trezor/tsconfig.esm.json new file mode 100644 index 000000000..4900d2fad --- /dev/null +++ b/packages/wallets/trezor/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "../../../tsconfig.esm.json", + "include": ["src"], + "compilerOptions": { + "outDir": "lib/esm", + "declarationDir": "lib/types" + } +} diff --git a/packages/wallets/trezor/tsconfig.json b/packages/wallets/trezor/tsconfig.json new file mode 100644 index 000000000..c2bd38181 --- /dev/null +++ b/packages/wallets/trezor/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.root.json", + "references": [ + { + "path": "./tsconfig.cjs.json" + }, + { + "path": "./tsconfig.esm.json" + } + ] +} diff --git a/packages/wallets/wallets/package.json b/packages/wallets/wallets/package.json index 3024477d4..f8fdb17c3 100644 --- a/packages/wallets/wallets/package.json +++ b/packages/wallets/wallets/package.json @@ -67,6 +67,7 @@ "@solana/wallet-adapter-tokenary": "workspace:^", "@solana/wallet-adapter-tokenpocket": "workspace:^", "@solana/wallet-adapter-torus": "workspace:^", + "@solana/wallet-adapter-trezor": "workspace:^", "@solana/wallet-adapter-trust": "workspace:^", "@solana/wallet-adapter-unsafe-burner": "workspace:^", "@solana/wallet-adapter-walletconnect": "workspace:^", diff --git a/packages/wallets/wallets/src/index.ts b/packages/wallets/wallets/src/index.ts index 8225afaad..d571859db 100644 --- a/packages/wallets/wallets/src/index.ts +++ b/packages/wallets/wallets/src/index.ts @@ -30,6 +30,7 @@ export * from '@solana/wallet-adapter-spot'; export * from '@solana/wallet-adapter-tokenary'; export * from '@solana/wallet-adapter-tokenpocket'; export * from '@solana/wallet-adapter-torus'; +export * from '@solana/wallet-adapter-trezor'; export * from '@solana/wallet-adapter-trust'; export * from '@solana/wallet-adapter-unsafe-burner'; export * from '@solana/wallet-adapter-walletconnect'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df6494fbc..01c1594e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1100,6 +1100,25 @@ importers: specifier: ^0.3.4 version: 0.3.4 + packages/wallets/trezor: + dependencies: + '@solana/wallet-adapter-base': + specifier: workspace:^ + version: link:../../core/base + '@trezor/connect-web': + specifier: ^9.0.11 + version: 9.0.11 + buffer: + specifier: ^6.0.3 + version: 6.0.3 + devDependencies: + '@solana/web3.js': + specifier: ^1.77.3 + version: 1.78.0 + shx: + specifier: ^0.3.4 + version: 0.3.4 + packages/wallets/trust: dependencies: '@solana/wallet-adapter-base': @@ -1255,6 +1274,9 @@ importers: '@solana/wallet-adapter-torus': specifier: workspace:^ version: link:../torus + '@solana/wallet-adapter-trezor': + specifier: workspace:^ + version: link:../trezor '@solana/wallet-adapter-trust': specifier: workspace:^ version: link:../trust @@ -5414,6 +5436,49 @@ packages: eventemitter3: 4.0.7 dev: false + /@protobufjs/aspromise@1.1.2: + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + dev: false + + /@protobufjs/base64@1.1.2: + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + dev: false + + /@protobufjs/codegen@2.0.4: + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + dev: false + + /@protobufjs/eventemitter@1.1.0: + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + dev: false + + /@protobufjs/fetch@1.1.0: + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + dev: false + + /@protobufjs/float@1.0.2: + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + dev: false + + /@protobufjs/inquire@1.1.0: + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + dev: false + + /@protobufjs/path@1.1.2: + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + dev: false + + /@protobufjs/pool@1.1.0: + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + dev: false + + /@protobufjs/utf8@1.1.0: + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + dev: false + /@rc-component/portal@1.1.2(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg==} engines: {node: '>=8.x'} @@ -6536,6 +6601,137 @@ packages: - utf-8-validate dev: false + /@trezor/analytics@1.0.3: + resolution: {integrity: sha512-7a0bHkY/+z6cDRoh1ZkhffHGw7iaVayD1UpP3fm4lPzrRpGQeH9ksRg8ZT0mBs6Pj+TLETzZRrS5ZBpDK0Piug==} + dependencies: + '@trezor/utils': 9.0.9 + dev: false + + /@trezor/blockchain-link-types@1.0.2: + resolution: {integrity: sha512-ON3A2Anu5k3BkMFtG0LWO48ZxikyWgSORqQ12ki3KDbTbqZV5BwAZTeFchUq8cv1kDlqkG7AtMV2nY9G3KfYOA==} + dev: false + + /@trezor/blockchain-link-utils@1.0.3: + resolution: {integrity: sha512-/mti1QY8n053P11wQwnQyBAASS+nNVBKu2kSZo8KAESwdnFGcnZwH0okXHTlUQZFud5ppg9EYJk9mpk0jf91tQ==} + dependencies: + '@trezor/utils': 9.0.8 + bignumber.js: 9.1.1 + dev: false + + /@trezor/blockchain-link@2.1.13: + resolution: {integrity: sha512-5yRvP8cFKjYd3FBRmUS6VJxHRLm8IuQg237hcRF8RbYRgW6ev7dwkjYmcVYz2iWXGaz+/FV8G0/xB/pmHhrpPQ==} + dependencies: + '@trezor/blockchain-link-types': 1.0.2 + '@trezor/blockchain-link-utils': 1.0.3 + '@trezor/utils': 9.0.9 + '@trezor/utxo-lib': 1.0.7 + '@types/web': 0.0.99 + bignumber.js: 9.1.1 + events: 3.3.0 + ripple-lib: 1.10.1 + socks-proxy-agent: 6.1.1 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@trezor/connect-analytics@1.0.2: + resolution: {integrity: sha512-eUAWb1nc5wGAKmNVTmiOc9DlFr+mbG+1JevzVUFB2q3VLQzcjf0st+RWE5DuDnPUVJiJFxBQWTqWlzACtq/HzQ==} + dependencies: + '@trezor/analytics': 1.0.3 + dev: false + + /@trezor/connect-common@0.0.16: + resolution: {integrity: sha512-DPGWhNYTe8SQO/XzqvVtY5YCOtRGHChN01J2Z5p3xD6aFGceou7SE0ROOcqU0ceSzMgl13+I9I0qXq/OLTGBGw==} + dependencies: + '@trezor/env-utils': 1.0.2 + dev: false + + /@trezor/connect-web@9.0.11: + resolution: {integrity: sha512-9398lmzxPGm/aZGM9OvkjasQ4kUQQs5bYz79eDtFz3jf24SyMM1yf2KvdvdssIyIfvcAbyJLZ+DK1qw2HxWn/Q==} + dependencies: + '@trezor/connect': 9.0.11 + '@trezor/utils': 9.0.9 + events: 3.3.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + + /@trezor/connect@9.0.11: + resolution: {integrity: sha512-8fifMt3xtqIQ4122aHNb8e3l0uisVujsWXUJ/LQS6N+t6SnilohBZ8nfzUBQaCxo2JuorLuXmxQ1ngNpaL45TA==} + dependencies: + '@trezor/blockchain-link': 2.1.13 + '@trezor/connect-analytics': 1.0.2 + '@trezor/connect-common': 0.0.16 + '@trezor/transport': 1.1.12 + '@trezor/utils': 9.0.9 + '@trezor/utxo-lib': 1.0.7 + bignumber.js: 9.1.1 + blakejs: 1.2.1 + cross-fetch: 3.1.8 + events: 3.3.0 + randombytes: 2.1.0 + tslib: 2.5.2 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + + /@trezor/env-utils@1.0.2: + resolution: {integrity: sha512-fPrX6EjaMHnRwAje7h2H3Qgu5/sBoewE8441j8cbBzxfJRgRuQJYZaGCy7lDALjxEwp7g02ZZ/FWavIhWGZIcQ==} + dependencies: + ua-parser-js: 1.0.36 + dev: false + + /@trezor/transport@1.1.12: + resolution: {integrity: sha512-RInOSOmgJ383QOBJbPzjyQW9BoWZ6HTneUmPkdzqydLxn9eyD3Ui13+W9fWFmxoMmljxJKct93twgxgHKUkhCg==} + dependencies: + '@trezor/utils': 9.0.9 + bytebuffer: 5.0.1 + json-stable-stringify: 1.0.2 + long: 4.0.0 + prettier: 2.8.7 + protobufjs: 6.11.3 + dev: false + + /@trezor/utils@9.0.8: + resolution: {integrity: sha512-XsX+VXP2UxanYo+LbY7zcjeIumEWFs5lArTAfK1fdWTIdiV8Od2htNO+D9lnCytvuu04LeJx7RihxinsQQVDvA==} + dev: false + + /@trezor/utils@9.0.9: + resolution: {integrity: sha512-+jzHy+YG3zJsnB11YfudT1a5u5lcwNX/tKoW9VmPU+isuW725M6uUOL+MSgW1aHucCJPyBAp0XUUssLE/ifqBw==} + dev: false + + /@trezor/utxo-lib@1.0.7: + resolution: {integrity: sha512-brC5xqGgT6yloHz3RWUK1CdEYkOSEjrhYM18GAzAaqS4MBULWDBPDD5Qt2XcYTOaoR/+8PKUXHdHVm+olbRSlA==} + dependencies: + '@trezor/utils': 9.0.9 + bchaddrjs: 0.5.2 + bech32: 2.0.0 + bip66: 1.1.5 + bitcoin-ops: 1.4.1 + blake-hash: 2.0.0 + blakejs: 1.2.1 + bn.js: 5.2.1 + bs58: 5.0.0 + bs58check: 3.0.1 + create-hash: 1.2.0 + create-hmac: 1.1.7 + int64-buffer: 1.0.1 + pushdata-bitcoin: 1.0.1 + tiny-secp256k1: 1.1.6 + typeforce: 1.18.0 + varuint-bitcoin: 1.1.2 + wif: 2.0.6 + dev: false + /@trysound/sax@0.2.0: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} @@ -6708,6 +6904,14 @@ packages: '@types/node': 18.16.19 dev: true + /@types/lodash@4.14.199: + resolution: {integrity: sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==} + dev: false + + /@types/long@4.0.2: + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + dev: false + /@types/mime@1.3.2: resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} dev: false @@ -6883,6 +7087,10 @@ packages: resolution: {integrity: sha512-eTQRkPd2JukZfS9+kRtrBAaTCCb6waGh5X8BJHmH1MiVQPLMYwm4+EvhwFfOo9SDna15o9dFAwmWwN6r/YM53A==} dev: true + /@types/web@0.0.99: + resolution: {integrity: sha512-xMz3tOvtkZzc7RpQrDNiLe5sfMmP+fz8bOxHIZ/U8qXyvzDX4L4Ss1HCjor/O9DSelba+1iXK1VM7lruX28hiQ==} + dev: false + /@types/ws@7.4.7: resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} dependencies: @@ -8185,6 +8393,20 @@ packages: resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} dev: false + /bchaddrjs@0.5.2: + resolution: {integrity: sha512-OO7gIn3m7ea4FVx4cT8gdlWQR2+++EquhdpWQJH9BQjK63tJJ6ngB3QMZDO6DiBoXiIGUsTPHjlrHVxPGcGxLQ==} + engines: {node: '>=8.0.0'} + dependencies: + bs58check: 2.1.2 + buffer: 6.0.3 + cashaddrjs: 0.4.4 + stream-browserify: 3.0.0 + dev: false + + /bech32@2.0.0: + resolution: {integrity: sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==} + dev: false + /better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -8202,6 +8424,16 @@ packages: tryer: 1.0.1 dev: false + /big-integer@1.6.36: + resolution: {integrity: sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==} + engines: {node: '>=0.6'} + dev: false + + /big-integer@1.6.51: + resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} + engines: {node: '>=0.6'} + dev: false + /big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -8226,6 +8458,16 @@ packages: dependencies: file-uri-to-path: 1.0.0 + /bip66@1.1.5: + resolution: {integrity: sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /bitcoin-ops@1.4.1: + resolution: {integrity: sha512-pef6gxZFztEhaE9RY9HmWVmiIHqCb2OyS4HPKkpc6CIiiOa3Qmuoylxc5P2EkU3w+5eTSifI9SEZC88idAIGow==} + dev: false + /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -8234,6 +8476,20 @@ packages: readable-stream: 3.6.2 dev: false + /blake-hash@2.0.0: + resolution: {integrity: sha512-Igj8YowDu1PRkRsxZA7NVkdFNxH5rKv5cpLxQ0CVXSIA77pVYwCPRQJ2sMew/oneUpfuYRyjG6r8SmmmnbZb1w==} + engines: {node: '>= 10'} + requiresBuild: true + dependencies: + node-addon-api: 3.2.1 + node-gyp-build: 4.6.0 + readable-stream: 3.6.2 + dev: false + + /blakejs@1.2.1: + resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} + dev: false + /bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: false @@ -8402,6 +8658,13 @@ packages: safe-buffer: 5.2.1 dev: false + /bs58check@3.0.1: + resolution: {integrity: sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==} + dependencies: + '@noble/hashes': 1.3.1 + bs58: 5.0.0 + dev: false + /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: @@ -8457,6 +8720,13 @@ packages: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} dev: true + /bytebuffer@5.0.1: + resolution: {integrity: sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==} + engines: {node: '>=0.8'} + dependencies: + long: 3.2.0 + dev: false + /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -8542,6 +8812,12 @@ packages: engines: {node: '>=4'} dev: false + /cashaddrjs@0.4.4: + resolution: {integrity: sha512-xZkuWdNOh0uq/mxJIng6vYWfTowZLd9F4GMAlp2DwFHlcCqCm91NtuAc47RuV4L7r4PYcY5p6Cr2OKNb4hnkWA==} + dependencies: + big-integer: 1.6.36 + dev: false + /cbor-sync@1.0.4: resolution: {integrity: sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==} dev: false @@ -8971,6 +9247,14 @@ packages: safe-buffer: 5.2.1 sha.js: 2.4.11 + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.6.12 + transitivePeerDependencies: + - encoding + dev: false + /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -11476,6 +11760,11 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: false + /int64-buffer@1.0.1: + resolution: {integrity: sha512-+3azY4pXrjAupJHU1V9uGERWlhoqNswJNji6aD/02xac7oxol508AsMC5lxKhEqyZeDFy3enq5OGWXF4u75hiw==} + engines: {node: '>= 4.5.0'} + dev: false + /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} @@ -11499,6 +11788,10 @@ packages: resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} dev: false + /ip@2.0.0: + resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} + dev: false + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -13109,6 +13402,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /jsonschema@1.2.2: + resolution: {integrity: sha512-iX5OFQ6yx9NgbHCwse51ohhKgLuLL7Z5cNOeZOPIlDUtAMrxlruHLzVZxbltdHE5mEDXN+75oFOwq6Gn0MZwsA==} + dev: false + /jsqr@1.4.0: resolution: {integrity: sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==} dev: false @@ -13432,6 +13729,15 @@ packages: engines: {node: '>= 0.6.0'} dev: false + /long@3.2.0: + resolution: {integrity: sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==} + engines: {node: '>=0.6'} + dev: false + + /long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -14059,6 +14365,10 @@ packages: thenify-all: 1.6.0 dev: false + /nan@2.18.0: + resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} + dev: false + /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -14171,6 +14481,10 @@ packages: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} dev: false + /node-addon-api@3.2.1: + resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} + dev: false + /node-addon-api@4.3.0: resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==} dev: true @@ -14210,6 +14524,7 @@ packages: /node-gyp-build-optional-packages@5.0.7: resolution: {integrity: sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==} hasBin: true + requiresBuild: true dev: true optional: true @@ -15632,6 +15947,12 @@ packages: fast-diff: 1.3.0 dev: true + /prettier@2.8.7: + resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: false + /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -15717,6 +16038,26 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 + /protobufjs@6.11.3: + resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} + hasBin: true + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 18.16.19 + long: 4.0.0 + dev: false + /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -15727,6 +16068,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true @@ -15761,6 +16103,12 @@ packages: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} + /pushdata-bitcoin@1.0.1: + resolution: {integrity: sha512-hw7rcYTJRAl4olM8Owe8x0fBuJJ+WGbMhQuLWOXEMN3PxPCKQHRkhfL+XG0+iXUmSHjkMmb3Ba55Mt21cZc9kQ==} + dependencies: + bitcoin-ops: 1.4.1 + dev: false + /q@1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} @@ -17004,6 +17352,66 @@ packages: hash-base: 3.1.0 inherits: 2.0.4 + /ripple-address-codec@4.3.1: + resolution: {integrity: sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==} + engines: {node: '>= 10'} + dependencies: + base-x: 3.0.9 + create-hash: 1.2.0 + dev: false + + /ripple-binary-codec@1.10.0: + resolution: {integrity: sha512-qWXxubgXBV3h5NTaaLiusZ1FhPqSy+bCYHHarfZ3bMmO2alRa1Ox61jvX1Zyozok8PcF3gs3bKwZci4RTlA07w==} + engines: {node: '>= 10'} + dependencies: + assert: 2.0.0 + big-integer: 1.6.51 + buffer: 6.0.3 + create-hash: 1.2.0 + decimal.js: 10.4.3 + ripple-address-codec: 4.3.1 + dev: false + + /ripple-keypairs@1.3.1: + resolution: {integrity: sha512-dmPlraWKJciFJxHcoubDahGnoIalG5e/BtV6HNDUs7wLXmtnLMHt6w4ed9R8MTL2zNrVPiIdI/HCtMMo0Tm7JQ==} + engines: {node: '>= 10'} + dependencies: + bn.js: 5.2.1 + brorand: 1.1.0 + elliptic: 6.5.4 + hash.js: 1.1.7 + ripple-address-codec: 4.3.1 + dev: false + + /ripple-lib-transactionparser@0.8.2: + resolution: {integrity: sha512-1teosQLjYHLyOQrKUQfYyMjDR3MAq/Ga+MJuLUfpBMypl4LZB4bEoMcmG99/+WVTEiZOezJmH9iCSvm/MyxD+g==} + dependencies: + bignumber.js: 9.1.1 + lodash: 4.17.21 + dev: false + + /ripple-lib@1.10.1: + resolution: {integrity: sha512-OQk+Syl2JfxKxV2KuF/kBMtnh012I5tNnziP3G4WDGCGSIAgeqkOgkR59IQ0YDNrs1YW8GbApxrdMSRi/QClcA==} + engines: {node: '>=10.13.0', yarn: ^1.15.2} + deprecated: 'ripple-lib is deprecated. Please migrate to xrpl.js using this migration guide: https://xrpl.org/xrpljs2-migration-guide.html' + dependencies: + '@types/lodash': 4.14.199 + '@types/ws': 7.4.7 + bignumber.js: 9.1.1 + https-proxy-agent: 5.0.1 + jsonschema: 1.2.2 + lodash: 4.17.21 + ripple-address-codec: 4.3.1 + ripple-binary-codec: 1.10.0 + ripple-keypairs: 1.3.1 + ripple-lib-transactionparser: 0.8.2 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /rollup-plugin-terser@7.0.2(rollup@2.79.1): resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser @@ -17404,6 +17812,11 @@ packages: is-fullwidth-code-point: 2.0.0 dev: false + /smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: false + /smartwrap@2.0.2: resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} engines: {node: '>=6'} @@ -17449,6 +17862,25 @@ packages: websocket-driver: 0.7.4 dev: false + /socks-proxy-agent@6.1.1: + resolution: {integrity: sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew==} + engines: {node: '>= 10'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + socks: 2.7.1 + transitivePeerDependencies: + - supports-color + dev: false + + /socks@2.7.1: + resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} + dependencies: + ip: 2.0.0 + smart-buffer: 4.2.0 + dev: false + /sonic-boom@2.8.0: resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} dependencies: @@ -18121,6 +18553,18 @@ packages: resolution: {integrity: sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==} dev: true + /tiny-secp256k1@1.1.6: + resolution: {integrity: sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==} + engines: {node: '>=6.0.0'} + requiresBuild: true + dependencies: + bindings: 1.5.0 + bn.js: 4.12.0 + create-hmac: 1.1.7 + elliptic: 6.5.4 + nan: 2.18.0 + dev: false + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -18246,6 +18690,10 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + /tslib@2.5.2: + resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} + dev: false + /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} @@ -18438,11 +18886,19 @@ packages: typescript: 4.7.4 dev: true + /typeforce@1.18.0: + resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} + dev: false + /typescript@4.7.4: resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} engines: {node: '>=4.2.0'} hasBin: true + /ua-parser-js@1.0.36: + resolution: {integrity: sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==} + dev: false + /uglify-es@3.3.9: resolution: {integrity: sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==} engines: {node: '>=0.8.0'} @@ -18644,6 +19100,12 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /varuint-bitcoin@1.1.2: + resolution: {integrity: sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==} + dependencies: + safe-buffer: 5.2.1 + dev: false + /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -19013,6 +19475,12 @@ packages: dependencies: isexe: 2.0.0 + /wif@2.0.6: + resolution: {integrity: sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==} + dependencies: + bs58check: 2.1.2 + dev: false + /workbox-background-sync@6.6.0: resolution: {integrity: sha512-jkf4ZdgOJxC9u2vztxLuPT/UjlH7m/nWRQ/MgGL0v8BJHoZdVGJd18Kck+a0e55wGXdqyHO+4IQTk0685g4MUw==} dependencies: From 084dea3d8fcb8b65bcb14a26bf51a645d2b2991f Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Wed, 6 Dec 2023 08:48:15 +0100 Subject: [PATCH 2/6] Handle `connectUrl` only in the constructor --- packages/wallets/trezor/src/adapter.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/wallets/trezor/src/adapter.ts b/packages/wallets/trezor/src/adapter.ts index b0bac764c..b8d3dd8c6 100644 --- a/packages/wallets/trezor/src/adapter.ts +++ b/packages/wallets/trezor/src/adapter.ts @@ -43,7 +43,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { constructor(config: TrezorWalletAdapterConfig = {}) { super(); this._derivationPath = config.derivationPath || `m/44'/501'/0'/0'`; - this._connectUrl = config.connectUrl; + this._connectUrl = config.connectUrl && config.connectUrl + (config.connectUrl.endsWith('/') ? '' : '/'); this._connecting = false; this._publicKey = null; } @@ -67,8 +67,6 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { this._connecting = true; - const connectUrl = this._connectUrl && this._connectUrl + (this._connectUrl.endsWith('/') ? '' : '/'); - await TrezorConnect.init({ manifest: { email: 'maintainers@solana.foundation', @@ -77,8 +75,8 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { lazyLoad: true, ...(this._connectUrl ? { - connectSrc: connectUrl, - iframeSrc: connectUrl, + connectSrc: this._connectUrl, + iframeSrc: this._connectUrl, } : {}), }); From 12f08375621bd1d53c4b73bd1eecfa121ddf23bd Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Wed, 6 Dec 2023 08:50:06 +0100 Subject: [PATCH 3/6] Switch to async import for TrezorConnect --- packages/wallets/trezor/src/adapter.ts | 29 +++++++++++++++++------- packages/wallets/trezor/src/constants.ts | 19 ++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 packages/wallets/trezor/src/constants.ts diff --git a/packages/wallets/trezor/src/adapter.ts b/packages/wallets/trezor/src/adapter.ts index b8d3dd8c6..3428aa375 100644 --- a/packages/wallets/trezor/src/adapter.ts +++ b/packages/wallets/trezor/src/adapter.ts @@ -1,7 +1,8 @@ import type { WalletName } from '@solana/wallet-adapter-base'; -import TrezorConnect, { DEVICE, DEVICE_EVENT } from '@trezor/connect-web'; +import type { TrezorConnect } from '@trezor/connect-web'; import { BaseSignerWalletAdapter, + WalletConfigError, WalletDisconnectedError, WalletDisconnectionError, WalletNotConnectedError, @@ -13,6 +14,7 @@ import { } from '@solana/wallet-adapter-base'; import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js'; import { PublicKey } from '@solana/web3.js'; +import { DEVICE, DEVICE_EVENT } from './constants.js'; export interface TrezorWalletAdapterConfig { derivationPath?: string; @@ -29,6 +31,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { supportedTransactionVersions: ReadonlySet = new Set(['legacy', 0]); private _derivationPath: string; + private _wallet: TrezorConnect | null; private _connectUrl?: string; private _connecting: boolean; private _publicKey: PublicKey | null; @@ -43,6 +46,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { constructor(config: TrezorWalletAdapterConfig = {}) { super(); this._derivationPath = config.derivationPath || `m/44'/501'/0'/0'`; + this._wallet = null; this._connectUrl = config.connectUrl && config.connectUrl + (config.connectUrl.endsWith('/') ? '' : '/'); this._connecting = false; this._publicKey = null; @@ -67,7 +71,15 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { this._connecting = true; - await TrezorConnect.init({ + try { + const { default: TrezorConnect } = await import('@trezor/connect-web'); + // @ts-ignore + this._wallet = TrezorConnect.default as TrezorConnect; + } catch (error: any) { + throw new WalletConfigError(error?.message, error); + } + + await this._wallet.init({ manifest: { email: 'maintainers@solana.foundation', appUrl: 'https://github.com/solana-labs/wallet-adapter', @@ -83,7 +95,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { let result; try { - result = await TrezorConnect.solanaGetPublicKey({ + result = await this._wallet.solanaGetPublicKey({ path: this._derivationPath, }); } catch (error: any) { @@ -96,7 +108,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { const publicKey = result.payload.publicKey; - TrezorConnect.on(DEVICE_EVENT, (event: any) => { + this._wallet.on(DEVICE_EVENT, (event: any) => { if (event.type === DEVICE.DISCONNECT) { this._disconnected(); } @@ -117,7 +129,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { this._publicKey = null; try { - await TrezorConnect.dispose(); + await this._wallet?.dispose(); } catch (error: any) { this.emit('error', new WalletDisconnectionError(error?.message, error)); } @@ -127,8 +139,9 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { async signTransaction(transaction: T): Promise { try { + const wallet = this._wallet; const publicKey = this._publicKey; - if (!publicKey) throw new WalletNotConnectedError(); + if (!wallet || !publicKey) throw new WalletNotConnectedError(); const serializedTransaction = isVersionedTransaction(transaction) ? transaction.message.serialize() @@ -136,7 +149,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { let result; try { - result = await TrezorConnect.solanaSignTransaction({ + result = await wallet.solanaSignTransaction({ path: this._derivationPath, serializedTx: Buffer.from(serializedTransaction).toString('hex'), }); @@ -158,7 +171,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { } private _disconnected = () => { - TrezorConnect.dispose(); + this._wallet?.dispose(); this._publicKey = null; this.emit('error', new WalletDisconnectedError()); diff --git a/packages/wallets/trezor/src/constants.ts b/packages/wallets/trezor/src/constants.ts new file mode 100644 index 000000000..982afc369 --- /dev/null +++ b/packages/wallets/trezor/src/constants.ts @@ -0,0 +1,19 @@ +// redeclared from TrezorConnect to allow async import +export const DEVICE_EVENT = 'DEVICE_EVENT'; +export const DEVICE = { + CONNECT: 'device-connect', + CONNECT_UNACQUIRED: 'device-connect_unacquired', + DISCONNECT: 'device-disconnect', + CHANGED: 'device-changed', + ACQUIRE: 'device-acquire', + RELEASE: 'device-release', + ACQUIRED: 'device-acquired', + RELEASED: 'device-released', + USED_ELSEWHERE: 'device-used_elsewhere', + LOADING: 'device-loading', + BUTTON: 'button', + PIN: 'pin', + PASSPHRASE: 'passphrase', + PASSPHRASE_ON_DEVICE: 'passphrase_on_device', + WORD: 'word', +}; From c76adddd6b67aa707d0b66592121e194036aab8e Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Fri, 8 Dec 2023 12:23:57 +0100 Subject: [PATCH 4/6] Change Connect manifest email --- packages/wallets/trezor/src/adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/wallets/trezor/src/adapter.ts b/packages/wallets/trezor/src/adapter.ts index 3428aa375..4a91c54c6 100644 --- a/packages/wallets/trezor/src/adapter.ts +++ b/packages/wallets/trezor/src/adapter.ts @@ -81,7 +81,7 @@ export class TrezorWalletAdapter extends BaseSignerWalletAdapter { await this._wallet.init({ manifest: { - email: 'maintainers@solana.foundation', + email: 'gabriel.kerekes@vacuumlabs.com', appUrl: 'https://github.com/solana-labs/wallet-adapter', }, lazyLoad: true, From cbb14e75887b5898f2b4a793fd1e17161ce4e594 Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Fri, 8 Dec 2023 12:56:55 +0100 Subject: [PATCH 5/6] Update @trezor/connect-web to a version with Solana support --- packages/wallets/trezor/package.json | 2 +- packages/wallets/trezor/tsconfig.cjs.json | 3 +- packages/wallets/trezor/tsconfig.esm.json | 3 +- pnpm-lock.yaml | 356 +++++++++++++++------- 4 files changed, 252 insertions(+), 112 deletions(-) diff --git a/packages/wallets/trezor/package.json b/packages/wallets/trezor/package.json index e9ea2bfa9..f872c7e56 100644 --- a/packages/wallets/trezor/package.json +++ b/packages/wallets/trezor/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@solana/wallet-adapter-base": "workspace:^", - "@trezor/connect-web": "^9.0.11", + "@trezor/connect-web": "^9.1.6", "buffer": "^6.0.3" }, "devDependencies": { diff --git a/packages/wallets/trezor/tsconfig.cjs.json b/packages/wallets/trezor/tsconfig.cjs.json index 099b9aa7a..2f42a38ae 100644 --- a/packages/wallets/trezor/tsconfig.cjs.json +++ b/packages/wallets/trezor/tsconfig.cjs.json @@ -2,6 +2,7 @@ "extends": "../../../tsconfig.cjs.json", "include": ["src"], "compilerOptions": { - "outDir": "lib/cjs" + "outDir": "lib/cjs", + "skipLibCheck": true } } diff --git a/packages/wallets/trezor/tsconfig.esm.json b/packages/wallets/trezor/tsconfig.esm.json index 4900d2fad..2eebaf076 100644 --- a/packages/wallets/trezor/tsconfig.esm.json +++ b/packages/wallets/trezor/tsconfig.esm.json @@ -3,6 +3,7 @@ "include": ["src"], "compilerOptions": { "outDir": "lib/esm", - "declarationDir": "lib/types" + "declarationDir": "lib/types", + "skipLibCheck": true } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 01c1594e3..d22ad3909 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1106,8 +1106,8 @@ importers: specifier: workspace:^ version: link:../../core/base '@trezor/connect-web': - specifier: ^9.0.11 - version: 9.0.11 + specifier: ^9.1.6 + version: 9.1.6(tslib@2.6.2) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -1420,7 +1420,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: '@babel/core': '>=7.11.0' - eslint: ^7.5.0 || ^8.0.0 + eslint: 8.22.0 dependencies: '@babel/core': 7.22.9 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 @@ -2862,6 +2862,13 @@ packages: dependencies: regenerator-runtime: 0.13.11 + /@babel/runtime@7.23.5: + resolution: {integrity: sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.0 + dev: false + /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} @@ -3360,11 +3367,19 @@ packages: /@emotion/weak-memoize@0.3.1: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + /@emurgo/cardano-serialization-lib-browser@11.5.0: + resolution: {integrity: sha512-qchOJ9NYDUz10tzs5r5QhP9hK0p+ZOlRiBwPdTAxqAYLw/8emYBkQQLaS8T1DF6EkeudyrgS00ym5Trw1fo4iA==} + dev: false + + /@emurgo/cardano-serialization-lib-nodejs@11.0.0: + resolution: {integrity: sha512-thm7g+NT9W4Iwor0S7oTewpLoKwGTGVdVWiZsUj3GjNNp+XJQHXffsOy9JyauMHjqaQeIpDLR1QckY5VnCWzhg==} + dev: false + /@eslint-community/eslint-utils@4.4.0(eslint@8.22.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + eslint: 8.22.0 dependencies: eslint: 8.22.0 eslint-visitor-keys: 3.4.1 @@ -3421,6 +3436,13 @@ packages: micro-ftch: 0.3.1 dev: false + /@fivebinaries/coin-selection@2.2.0: + resolution: {integrity: sha512-1j0GGlfXla6Ws51gmemyLBVtsROQBGhTMExSYmpRmLHGLpNuOsEA4O7P19yzjW209gSswcD9+T7zEYCNbp3MRg==} + dependencies: + '@emurgo/cardano-serialization-lib-browser': 11.5.0 + '@emurgo/cardano-serialization-lib-nodejs': 11.0.0 + dev: false + /@fractalwagmi/popup-connection@1.1.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-hYL+45iYwNbwjvP2DxP3YzVsrAGtj/RV9LOgMpJyCxsfNoyyOoi2+YrnywKkiANingiG2kJ1nKsizbu1Bd4zZw==} peerDependencies: @@ -4186,6 +4208,11 @@ packages: json5: 2.2.3 dev: true + /@mobily/ts-belt@3.13.1: + resolution: {integrity: sha512-K5KqIhPI/EoCTbA6CGbrenM9s41OouyK8A03fGJJcla/zKucsgLbz8HNbeseoLarRPgyWJsUyCYqFhI7t3Ra9Q==} + engines: {node: '>= 10.*'} + dev: false + /@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.2: resolution: {integrity: sha512-9bfjwDxIDWmmOKusUcqdS4Rw+SETlp9Dy39Xui9BEGEk19dDwH0jhipwFzEff/pFg95NKymc6TOTbRKcWeRqyQ==} cpu: [arm64] @@ -4555,10 +4582,21 @@ packages: dependencies: '@noble/hashes': 1.3.1 + /@noble/curves@1.2.0: + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} + dependencies: + '@noble/hashes': 1.3.2 + dev: false + /@noble/hashes@1.3.1: resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} engines: {node: '>= 16'} + /@noble/hashes@1.3.2: + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -5946,7 +5984,7 @@ packages: resolution: {integrity: sha512-bkCPtOHWMXsCpqudoOQ2BSMAJQAcPrgAApDROGI4zpPIM1GI8WA7QslS9MJgSvkWKIRIUdf1r6YnpVSwT6c8sw==} engines: {node: '>=16'} peerDependencies: - '@solana/wallet-adapter-base': '*' + '@solana/wallet-adapter-base': workspace:^ react: '*' dependencies: '@solana/wallet-adapter-base': link:packages/core/base @@ -5983,6 +6021,31 @@ packages: - supports-color - utf-8-validate + /@solana/web3.js@1.87.6: + resolution: {integrity: sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg==} + dependencies: + '@babel/runtime': 7.23.5 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.1 + '@solana/buffer-layout': 4.0.1 + agentkeepalive: 4.3.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.0 + node-fetch: 2.6.12 + rpc-websockets: 7.5.1 + superstruct: 0.14.2 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + dev: false + /@solflare-wallet/metamask-sdk@1.0.2(@solana/web3.js@1.78.0): resolution: {integrity: sha512-IoHz81EfU8x/QlmUlVimt45FTPlqOQzTcVpB4T3h1E/J9jtuywHHsdRAzmjw71phPCp/5fgFIfg+pD48GIqmQA==} peerDependencies: @@ -6601,31 +6664,45 @@ packages: - utf-8-validate dev: false - /@trezor/analytics@1.0.3: - resolution: {integrity: sha512-7a0bHkY/+z6cDRoh1ZkhffHGw7iaVayD1UpP3fm4lPzrRpGQeH9ksRg8ZT0mBs6Pj+TLETzZRrS5ZBpDK0Piug==} + /@trezor/analytics@1.0.10: + resolution: {integrity: sha512-uXO51TmcdjhBP7WwXqU6AgnMoWbpRzzd6Ehmb6hSSSokm77RlBEurjSeVxRnjzA7h6XbSX06hxqq3iCTMK4Nmg==} dependencies: - '@trezor/utils': 9.0.9 + '@trezor/env-utils': 1.0.9 + '@trezor/utils': 9.0.15 + transitivePeerDependencies: + - expo-localization + - react-native + - react-native-config dev: false - /@trezor/blockchain-link-types@1.0.2: - resolution: {integrity: sha512-ON3A2Anu5k3BkMFtG0LWO48ZxikyWgSORqQ12ki3KDbTbqZV5BwAZTeFchUq8cv1kDlqkG7AtMV2nY9G3KfYOA==} + /@trezor/blockchain-link-types@1.0.8: + resolution: {integrity: sha512-0K3Pb3tXnvhPdHlAivbLncbaxcVchdZa/0AdY0L9vEdiszEuAQkw51DqFNPYJxMl91eyW1T2wbJgAvB7e3VIyg==} dev: false - /@trezor/blockchain-link-utils@1.0.3: - resolution: {integrity: sha512-/mti1QY8n053P11wQwnQyBAASS+nNVBKu2kSZo8KAESwdnFGcnZwH0okXHTlUQZFud5ppg9EYJk9mpk0jf91tQ==} + /@trezor/blockchain-link-utils@1.0.9: + resolution: {integrity: sha512-24vxhafyjfIH2iWaOYAcYyG9ApiZ7PCO1hcvAMEIsH8yBRO8zQoHy10uU2CtUX0cvU6LJ/Bp2bplNGe35jUzbw==} dependencies: - '@trezor/utils': 9.0.8 + '@mobily/ts-belt': 3.13.1 + '@solana/web3.js': 1.87.6 + '@trezor/utils': 9.0.15 bignumber.js: 9.1.1 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate dev: false - /@trezor/blockchain-link@2.1.13: - resolution: {integrity: sha512-5yRvP8cFKjYd3FBRmUS6VJxHRLm8IuQg237hcRF8RbYRgW6ev7dwkjYmcVYz2iWXGaz+/FV8G0/xB/pmHhrpPQ==} + /@trezor/blockchain-link@2.1.19: + resolution: {integrity: sha512-hOD3S3tE4kj0JsxiT8Ux+GQVpB0OfKWzCJG+U8CTPOZEgpJGioLZr9O94BMCBFECd7dMUkQt/u/QVNvpP4Nacw==} dependencies: - '@trezor/blockchain-link-types': 1.0.2 - '@trezor/blockchain-link-utils': 1.0.3 - '@trezor/utils': 9.0.9 - '@trezor/utxo-lib': 1.0.7 - '@types/web': 0.0.99 + '@solana/buffer-layout': 4.0.1 + '@solana/web3.js': 1.87.6 + '@trezor/blockchain-link-types': 1.0.8 + '@trezor/blockchain-link-utils': 1.0.9 + '@trezor/utils': 9.0.15 + '@trezor/utxo-lib': 2.0.1 + '@types/web': 0.0.119 bignumber.js: 9.1.1 events: 3.3.0 ripple-lib: 1.10.1 @@ -6633,86 +6710,137 @@ packages: ws: 7.5.9 transitivePeerDependencies: - bufferutil + - encoding - supports-color - utf-8-validate dev: false - /@trezor/connect-analytics@1.0.2: - resolution: {integrity: sha512-eUAWb1nc5wGAKmNVTmiOc9DlFr+mbG+1JevzVUFB2q3VLQzcjf0st+RWE5DuDnPUVJiJFxBQWTqWlzACtq/HzQ==} + /@trezor/connect-analytics@1.0.9: + resolution: {integrity: sha512-/wNn/4yoSONFhh61y/BR8SFP+b8zsRuv70Wz5Ozaxy8Fzhhe1k1AeH2OyNY8s3mCi8+1OeMZf4CO7b/mWw9PVw==} dependencies: - '@trezor/analytics': 1.0.3 + '@trezor/analytics': 1.0.10 + transitivePeerDependencies: + - expo-localization + - react-native + - react-native-config dev: false - /@trezor/connect-common@0.0.16: - resolution: {integrity: sha512-DPGWhNYTe8SQO/XzqvVtY5YCOtRGHChN01J2Z5p3xD6aFGceou7SE0ROOcqU0ceSzMgl13+I9I0qXq/OLTGBGw==} + /@trezor/connect-common@0.0.23: + resolution: {integrity: sha512-FJFIO3HRrgW223w5oJSkMzYGx1LpjaYS+I57dhs35HEl//cHcvVUH8DiWV6omUlZp+CcpJguxk8q4Q5+BBPebg==} dependencies: - '@trezor/env-utils': 1.0.2 + '@trezor/env-utils': 1.0.9 + transitivePeerDependencies: + - expo-localization + - react-native + - react-native-config dev: false - /@trezor/connect-web@9.0.11: - resolution: {integrity: sha512-9398lmzxPGm/aZGM9OvkjasQ4kUQQs5bYz79eDtFz3jf24SyMM1yf2KvdvdssIyIfvcAbyJLZ+DK1qw2HxWn/Q==} + /@trezor/connect-web@9.1.6(tslib@2.6.2): + resolution: {integrity: sha512-KybU1roM2L47aIXP4AvlMJ8oyEvXuWU/E6+5TVmWx8JOWKFQL6cFS1e+FEsON0WUweQ7AjIMIrcCxddK2UMcCQ==} dependencies: - '@trezor/connect': 9.0.11 - '@trezor/utils': 9.0.9 + '@trezor/connect': 9.1.6(tslib@2.6.2) + '@trezor/utils': 9.0.15 events: 3.3.0 transitivePeerDependencies: - bufferutil - encoding + - expo-localization + - react-native + - react-native-config - supports-color + - tslib - utf-8-validate dev: false - /@trezor/connect@9.0.11: - resolution: {integrity: sha512-8fifMt3xtqIQ4122aHNb8e3l0uisVujsWXUJ/LQS6N+t6SnilohBZ8nfzUBQaCxo2JuorLuXmxQ1ngNpaL45TA==} + /@trezor/connect@9.1.6(tslib@2.6.2): + resolution: {integrity: sha512-wPQWNItVQu6kAEVSJroUQKieAYywwf0nBiiZpktfMUaWDwy5tsQMgw6FGTBbbfT5XJhlGyZM+K2Bbt5zGSlJXQ==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/blockchain-link': 2.1.13 - '@trezor/connect-analytics': 1.0.2 - '@trezor/connect-common': 0.0.16 - '@trezor/transport': 1.1.12 - '@trezor/utils': 9.0.9 - '@trezor/utxo-lib': 1.0.7 + '@ethereumjs/common': 3.2.0 + '@ethereumjs/tx': 4.2.0 + '@fivebinaries/coin-selection': 2.2.0 + '@trezor/blockchain-link': 2.1.19 + '@trezor/blockchain-link-types': 1.0.8 + '@trezor/connect-analytics': 1.0.9 + '@trezor/connect-common': 0.0.23 + '@trezor/protobuf': 1.0.3 + '@trezor/protocol': 1.0.3 + '@trezor/transport': 1.1.18 + '@trezor/utils': 9.0.15 + '@trezor/utxo-lib': 2.0.1 bignumber.js: 9.1.1 blakejs: 1.2.1 - cross-fetch: 3.1.8 + bs58: 5.0.0 + bs58check: 3.0.1 + cross-fetch: 4.0.0 events: 3.3.0 - randombytes: 2.1.0 - tslib: 2.5.2 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - encoding + - expo-localization + - react-native + - react-native-config - supports-color - utf-8-validate dev: false - /@trezor/env-utils@1.0.2: - resolution: {integrity: sha512-fPrX6EjaMHnRwAje7h2H3Qgu5/sBoewE8441j8cbBzxfJRgRuQJYZaGCy7lDALjxEwp7g02ZZ/FWavIhWGZIcQ==} + /@trezor/env-utils@1.0.9: + resolution: {integrity: sha512-DygKVWFr21ITnr9iO4+BF40UuocOUXh4Sk/sj67edMaxo/FCF/bzfO5YV2tnfzsOU8l0phuEA/t5W2WVhTwPWg==} + peerDependencies: + expo-localization: ^14.1.1 + react-native: 0.71.8 + react-native-config: ^1.5.0 + peerDependenciesMeta: + expo-localization: + optional: true + react-native: + optional: true + react-native-config: + optional: true dependencies: - ua-parser-js: 1.0.36 + ua-parser-js: 1.0.37 dev: false - /@trezor/transport@1.1.12: - resolution: {integrity: sha512-RInOSOmgJ383QOBJbPzjyQW9BoWZ6HTneUmPkdzqydLxn9eyD3Ui13+W9fWFmxoMmljxJKct93twgxgHKUkhCg==} + /@trezor/protobuf@1.0.3: + resolution: {integrity: sha512-cvOJZCA9647nVodZ6Ias/1NWkbCGhnLCa1Rr0sljpzr+DhMpEz2nuuxpYannq8j6H4rxV4bcg/cmm5ym29/H0A==} dependencies: - '@trezor/utils': 9.0.9 bytebuffer: 5.0.1 - json-stable-stringify: 1.0.2 long: 4.0.0 - prettier: 2.8.7 - protobufjs: 6.11.3 + protobufjs: 7.2.5 dev: false - /@trezor/utils@9.0.8: - resolution: {integrity: sha512-XsX+VXP2UxanYo+LbY7zcjeIumEWFs5lArTAfK1fdWTIdiV8Od2htNO+D9lnCytvuu04LeJx7RihxinsQQVDvA==} + /@trezor/protocol@1.0.3: + resolution: {integrity: sha512-yzbqid0VN3f8F0Kkqyvf2hhbFGVUU2aJKT0AJVYigJfZQE9RVO3mbbUonOs1BXDfLZsNQEGzI6q432qHIm1XhA==} + dependencies: + bytebuffer: 5.0.1 dev: false - /@trezor/utils@9.0.9: - resolution: {integrity: sha512-+jzHy+YG3zJsnB11YfudT1a5u5lcwNX/tKoW9VmPU+isuW725M6uUOL+MSgW1aHucCJPyBAp0XUUssLE/ifqBw==} + /@trezor/transport@1.1.18: + resolution: {integrity: sha512-zxV88QZFgFhQHtgmxVmvxRoQsZOdmtZ1ZgGUDbkUFdeYizZfatiY4LJWQTm2UodmLXNi33bmufcJXI8Ibpo2xw==} + dependencies: + '@trezor/protobuf': 1.0.3 + '@trezor/protocol': 1.0.3 + '@trezor/utils': 9.0.15 + bytebuffer: 5.0.1 + cross-fetch: 4.0.0 + json-stable-stringify: 1.0.2 + long: 4.0.0 + protobufjs: 7.2.5 + usb: 2.11.0 + transitivePeerDependencies: + - encoding + dev: false + + /@trezor/utils@9.0.15: + resolution: {integrity: sha512-MbtSIt+C5nWWO1yNVTBeRNW5kxUB2VuBU0CbPSWZkc2sg2/3qe0W/DNf6I0j3wrLSppzZW2jHG3ptz6i+vp39Q==} dev: false - /@trezor/utxo-lib@1.0.7: - resolution: {integrity: sha512-brC5xqGgT6yloHz3RWUK1CdEYkOSEjrhYM18GAzAaqS4MBULWDBPDD5Qt2XcYTOaoR/+8PKUXHdHVm+olbRSlA==} + /@trezor/utxo-lib@2.0.1: + resolution: {integrity: sha512-C4dY0riZVzYLEt+kXe5KbDguSGBzFto/2jH5xoyhlKt0bEZEJaP4MpYsNwE+zlOGD1yholAPOofx6xiqjDsGig==} dependencies: - '@trezor/utils': 9.0.9 + '@trezor/utils': 9.0.15 bchaddrjs: 0.5.2 bech32: 2.0.0 bip66: 1.1.5 @@ -6729,7 +6857,7 @@ packages: tiny-secp256k1: 1.1.6 typeforce: 1.18.0 varuint-bitcoin: 1.1.2 - wif: 2.0.6 + wif: 4.0.0 dev: false /@trysound/sax@0.2.0: @@ -6908,10 +7036,6 @@ packages: resolution: {integrity: sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==} dev: false - /@types/long@4.0.2: - resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} - dev: false - /@types/mime@1.3.2: resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} dev: false @@ -7087,8 +7211,12 @@ packages: resolution: {integrity: sha512-eTQRkPd2JukZfS9+kRtrBAaTCCb6waGh5X8BJHmH1MiVQPLMYwm4+EvhwFfOo9SDna15o9dFAwmWwN6r/YM53A==} dev: true - /@types/web@0.0.99: - resolution: {integrity: sha512-xMz3tOvtkZzc7RpQrDNiLe5sfMmP+fz8bOxHIZ/U8qXyvzDX4L4Ss1HCjor/O9DSelba+1iXK1VM7lruX28hiQ==} + /@types/w3c-web-usb@1.0.10: + resolution: {integrity: sha512-CHgUI5kTc/QLMP8hODUHhge0D4vx+9UiAwIGiT0sTy/B2XpdX1U5rJt6JSISgr6ikRT7vxV9EVAFeYZqUnl1gQ==} + dev: false + + /@types/web@0.0.119: + resolution: {integrity: sha512-CQVOcEWrxr0MXbQbR3rrw6GHo2mcr8WlhLHQkOKDhhySTjz15/35jk0Zm2FbHRyCvSEjr/J7A2iDD5GRrGxE2A==} dev: false /@types/ws@7.4.7: @@ -7127,7 +7255,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: 8.22.0 typescript: '*' peerDependenciesMeta: typescript: @@ -7153,7 +7281,7 @@ packages: resolution: {integrity: sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: 8.22.0 dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.22.0)(typescript@4.7.4) eslint: 8.22.0 @@ -7166,7 +7294,7 @@ packages: resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: 8.22.0 typescript: '*' peerDependenciesMeta: typescript: @@ -7192,7 +7320,7 @@ packages: resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '*' + eslint: 8.22.0 typescript: '*' peerDependenciesMeta: typescript: @@ -7235,7 +7363,7 @@ packages: resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: 8.22.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.22.0) '@types/json-schema': 7.0.12 @@ -9247,8 +9375,8 @@ packages: safe-buffer: 5.2.1 sha.js: 2.4.11 - /cross-fetch@3.1.8: - resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + /cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} dependencies: node-fetch: 2.6.12 transitivePeerDependencies: @@ -10207,7 +10335,7 @@ packages: /eslint-config-next@12.3.4(eslint@8.22.0)(typescript@4.7.4): resolution: {integrity: sha512-WuT3gvgi7Bwz00AOmKGhOeqnyA5P29Cdyr0iVjLyfDbk+FANQKcOjFUTZIdyYfe5Tq1x4TGcmoe4CwctGvFjHQ==} peerDependencies: - eslint: ^7.23.0 || ^8.0.0 + eslint: 8.22.0 typescript: '>=3.3.1' peerDependenciesMeta: typescript: @@ -10233,7 +10361,7 @@ packages: resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: - eslint: '>=7.0.0' + eslint: 8.22.0 dependencies: eslint: 8.22.0 dev: true @@ -10242,7 +10370,7 @@ packages: resolution: {integrity: sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==} engines: {node: '>=14.0.0'} peerDependencies: - eslint: ^8.0.0 + eslint: 8.22.0 typescript: '*' peerDependenciesMeta: typescript: @@ -10286,7 +10414,7 @@ packages: resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} engines: {node: '>=4'} peerDependencies: - eslint: '*' + eslint: 8.22.0 eslint-plugin-import: '*' dependencies: debug: 4.3.4 @@ -10334,7 +10462,7 @@ packages: peerDependencies: '@babel/plugin-syntax-flow': ^7.14.5 '@babel/plugin-transform-react-jsx': ^7.14.9 - eslint: ^8.1.0 + eslint: 8.22.0 dependencies: '@babel/plugin-syntax-flow': 7.22.5(@babel/core@7.22.9) '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.9) @@ -10348,7 +10476,7 @@ packages: engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: 8.22.0 peerDependenciesMeta: '@typescript-eslint/parser': optional: true @@ -10380,7 +10508,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: 8.22.0 jest: '*' peerDependenciesMeta: '@typescript-eslint/eslint-plugin': @@ -10401,7 +10529,7 @@ packages: resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: 8.22.0 dependencies: '@babel/runtime': 7.22.6 aria-query: 5.3.0 @@ -10425,7 +10553,7 @@ packages: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: - eslint: '>=7.28.0' + eslint: 8.22.0 eslint-config-prettier: '*' prettier: '>=2.0.0' peerDependenciesMeta: @@ -10442,7 +10570,7 @@ packages: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + eslint: 8.22.0 dependencies: eslint: 8.22.0 @@ -10450,7 +10578,7 @@ packages: resolution: {integrity: sha512-qewL/8P34WkY8jAqdQxsiL82pDUeT7nhs8IsuXgfgnsEloKCT4miAV9N9kGtx7/KM9NH/NCGUE7Edt9iGxLXFw==} engines: {node: '>=4'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: 8.22.0 dependencies: array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 @@ -10473,7 +10601,7 @@ packages: resolution: {integrity: sha512-T3c1PZ9PIdI3hjV8LdunfYI8gj017UQjzAnCrxuo3wAjneDbTPHdE3oNWInOjMA+z/aBkUtlW5vC0YepYMZIug==} engines: {node: '>=16'} peerDependencies: - eslint: '*' + eslint: 8.22.0 dependencies: eslint: 8.22.0 dev: true @@ -10482,7 +10610,7 @@ packages: resolution: {integrity: sha512-ELY7Gefo+61OfXKlQeXNIDVVLPcvKTeiQOoMZG9TeuWa7Ln4dUNRv8JdRWBQI9Mbb427XGlVB1aa1QPZxBJM8Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} peerDependencies: - eslint: ^7.5.0 || ^8.0.0 + eslint: 8.22.0 dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.22.0)(typescript@4.7.4) eslint: 8.22.0 @@ -10509,7 +10637,7 @@ packages: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: - eslint: '>=5' + eslint: 8.22.0 dependencies: eslint: 8.22.0 eslint-visitor-keys: 2.1.0 @@ -10526,7 +10654,7 @@ packages: resolution: {integrity: sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w==} engines: {node: '>= 12.13.0'} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: 8.22.0 webpack: ^5.0.0 dependencies: '@types/eslint': 8.44.0 @@ -10999,7 +11127,7 @@ packages: resolution: {integrity: sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==} engines: {node: '>=10', yarn: '>=1.0.0'} peerDependencies: - eslint: '>= 6' + eslint: 8.22.0 typescript: '>= 2.7' vue-template-compiler: '*' webpack: '>= 4' @@ -13738,6 +13866,10 @@ packages: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} dev: false + /long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -14491,7 +14623,6 @@ packages: /node-addon-api@7.0.0: resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==} - dev: true /node-dir@0.1.17: resolution: {integrity: sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==} @@ -15947,12 +16078,6 @@ packages: fast-diff: 1.3.0 dev: true - /prettier@2.8.7: - resolution: {integrity: sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: false - /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -16038,9 +16163,9 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 - /protobufjs@6.11.3: - resolution: {integrity: sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==} - hasBin: true + /protobufjs@7.2.5: + resolution: {integrity: sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==} + engines: {node: '>=12.0.0'} requiresBuild: true dependencies: '@protobufjs/aspromise': 1.1.2 @@ -16053,9 +16178,8 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/long': 4.0.2 '@types/node': 18.16.19 - long: 4.0.0 + long: 5.2.3 dev: false /proxy-addr@2.0.7: @@ -16928,7 +17052,7 @@ packages: engines: {node: '>=14.0.0'} hasBin: true peerDependencies: - eslint: '*' + eslint: 8.22.0 react: '>= 16' typescript: ^3.2.1 || ^4 peerDependenciesMeta: @@ -17184,6 +17308,10 @@ packages: /regenerator-runtime@0.13.11: resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + dev: false + /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: @@ -18690,13 +18818,13 @@ packages: /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - /tslib@2.5.2: - resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} - dev: false - /tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + /tsutils@3.21.0(typescript@4.7.4): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -18895,8 +19023,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /ua-parser-js@1.0.36: - resolution: {integrity: sha512-znuyCIXzl8ciS3+y3fHJI/2OhQIXbXw9MWC/o3qwyR+RGppjZHrM27CGFSKCJXi2Kctiz537iOu2KnXs1lMQhw==} + /ua-parser-js@1.0.37: + resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==} dev: false /uglify-es@3.3.9: @@ -19012,6 +19140,16 @@ packages: qs: 6.11.2 dev: true + /usb@2.11.0: + resolution: {integrity: sha512-u5+NZ6DtoW8TIBtuSArQGAZZ/K15i3lYvZBAYmcgI+RcDS9G50/KPrUd3CrU8M92ahyCvg5e0gc8BDvr5Hwejg==} + engines: {node: '>=12.22.0 <13.0 || >=14.17.0'} + requiresBuild: true + dependencies: + '@types/w3c-web-usb': 1.0.10 + node-addon-api: 7.0.0 + node-gyp-build: 4.6.0 + dev: false + /use-sync-external-store@1.2.0(react@18.2.0): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: @@ -19475,10 +19613,10 @@ packages: dependencies: isexe: 2.0.0 - /wif@2.0.6: - resolution: {integrity: sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==} + /wif@4.0.0: + resolution: {integrity: sha512-kADznC+4AFJNXpT8rLhbsfI7EmAcorc5nWvAdKUchGmwXEBD3n55q0/GZ3DBmc6auAvuTSsr/utiKizuXdNYOQ==} dependencies: - bs58check: 2.1.2 + bs58check: 3.0.1 dev: false /workbox-background-sync@6.6.0: From 9020138eb3ffa6ad81497c809ceb2508a3143f90 Mon Sep 17 00:00:00 2001 From: gabrielkerekes Date: Tue, 26 Dec 2023 17:47:58 +0100 Subject: [PATCH 6/6] Update @trezor/connect-web to latest version --- packages/wallets/trezor/package.json | 2 +- pnpm-lock.yaml | 308 ++++++++++++++++++--------- 2 files changed, 203 insertions(+), 107 deletions(-) diff --git a/packages/wallets/trezor/package.json b/packages/wallets/trezor/package.json index f872c7e56..6a938bff4 100644 --- a/packages/wallets/trezor/package.json +++ b/packages/wallets/trezor/package.json @@ -36,7 +36,7 @@ }, "dependencies": { "@solana/wallet-adapter-base": "workspace:^", - "@trezor/connect-web": "^9.1.6", + "@trezor/connect-web": "^9.1.7", "buffer": "^6.0.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d22ad3909..86f0a66de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1070,7 +1070,7 @@ importers: version: link:../../core/base '@toruslabs/solana-embed': specifier: ^0.3.4 - version: 0.3.4(@babel/runtime@7.22.6) + version: 0.3.4(@babel/runtime@7.23.5) assert: specifier: ^2.0.0 version: 2.0.0 @@ -1106,8 +1106,8 @@ importers: specifier: workspace:^ version: link:../../core/base '@trezor/connect-web': - specifier: ^9.1.6 - version: 9.1.6(tslib@2.6.2) + specifier: ^9.1.7 + version: 9.1.7(buffer@6.0.3)(tslib@2.6.2) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -2867,7 +2867,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: false /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} @@ -3371,8 +3370,8 @@ packages: resolution: {integrity: sha512-qchOJ9NYDUz10tzs5r5QhP9hK0p+ZOlRiBwPdTAxqAYLw/8emYBkQQLaS8T1DF6EkeudyrgS00ym5Trw1fo4iA==} dev: false - /@emurgo/cardano-serialization-lib-nodejs@11.0.0: - resolution: {integrity: sha512-thm7g+NT9W4Iwor0S7oTewpLoKwGTGVdVWiZsUj3GjNNp+XJQHXffsOy9JyauMHjqaQeIpDLR1QckY5VnCWzhg==} + /@emurgo/cardano-serialization-lib-nodejs@11.5.0: + resolution: {integrity: sha512-IlVABlRgo9XaTR1NunwZpWcxnfEv04ba2l1vkUz4S1W7Jt36F4CtffP+jPeqBZGnAe+fnUwo0XjIJC3ZTNToNQ==} dev: false /@eslint-community/eslint-utils@4.4.0(eslint@8.22.0): @@ -3411,12 +3410,28 @@ packages: crc-32: 1.2.2 dev: false + /@ethereumjs/common@4.1.0(buffer@6.0.3): + resolution: {integrity: sha512-XWdQvUjlQHVwh4uGEPFKHpsic69GOsMXEhlHrggS5ju/+2zAmmlz6B25TkCCymeElC9DUp13tH5Tc25Iuvtlcg==} + dependencies: + '@ethereumjs/util': 9.0.1 + crc: 4.3.2(buffer@6.0.3) + transitivePeerDependencies: + - buffer + - c-kzg + dev: false + /@ethereumjs/rlp@4.0.1: resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} engines: {node: '>=14'} hasBin: true dev: false + /@ethereumjs/rlp@5.0.1: + resolution: {integrity: sha512-Ab/Hfzz+T9Zl+65Nkg+9xAmwKPLicsnQ4NW49pgvJp9ovefuic95cgOS9CbPc9izIEgsqm1UitV0uNveCvud9w==} + engines: {node: '>=18'} + hasBin: true + dev: false + /@ethereumjs/tx@4.2.0: resolution: {integrity: sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==} engines: {node: '>=14'} @@ -3427,6 +3442,23 @@ packages: ethereum-cryptography: 2.1.2 dev: false + /@ethereumjs/tx@5.1.0(buffer@6.0.3): + resolution: {integrity: sha512-VUhw2+4yXArJZRWhPjmZFrN4WUjUo0qUZUszVpW2KzsGlqCFf67kwJcH9Rca5eS0CRHjr2qHJLpvYOjNuaXVdA==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + dependencies: + '@ethereumjs/common': 4.1.0(buffer@6.0.3) + '@ethereumjs/rlp': 5.0.1 + '@ethereumjs/util': 9.0.1 + ethereum-cryptography: 2.1.2 + transitivePeerDependencies: + - buffer + dev: false + /@ethereumjs/util@8.1.0: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} @@ -3436,11 +3468,24 @@ packages: micro-ftch: 0.3.1 dev: false - /@fivebinaries/coin-selection@2.2.0: - resolution: {integrity: sha512-1j0GGlfXla6Ws51gmemyLBVtsROQBGhTMExSYmpRmLHGLpNuOsEA4O7P19yzjW209gSswcD9+T7zEYCNbp3MRg==} + /@ethereumjs/util@9.0.1: + resolution: {integrity: sha512-NdFFEzCc3H1sYkNnnySwLg6owdQMhjUc2jfuDyx8Xv162WSluCnnSKouKOSG3njGNEyy2I9NmF8zTRDwuqpZWA==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + dependencies: + '@ethereumjs/rlp': 5.0.1 + ethereum-cryptography: 2.1.2 + dev: false + + /@fivebinaries/coin-selection@2.2.1: + resolution: {integrity: sha512-iYFsYr7RY7TEvTqP9NKR4p/yf3Iybf9abUDR7lRjzanGsrLwVsREvIuyE05iRYFrvqarlk+gWRPsdR1N2hUBrg==} dependencies: '@emurgo/cardano-serialization-lib-browser': 11.5.0 - '@emurgo/cardano-serialization-lib-nodejs': 11.0.0 + '@emurgo/cardano-serialization-lib-nodejs': 11.5.0 dev: false /@fractalwagmi/popup-connection@1.1.1(react-dom@18.2.0)(react@18.2.0): @@ -6026,7 +6071,7 @@ packages: dependencies: '@babel/runtime': 7.23.5 '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.2 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.3.0 bigint-buffer: 1.1.5 @@ -6447,7 +6492,7 @@ packages: engines: {node: '>=14'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 @@ -6504,16 +6549,16 @@ packages: engines: {node: '>= 10'} dev: true - /@toruslabs/base-controllers@2.9.0(@babel/runtime@7.22.6): + /@toruslabs/base-controllers@2.9.0(@babel/runtime@7.23.5): resolution: {integrity: sha512-rKc+bR4QB/wdbH0CxLZC5e2PUZcIgkr9yY7TMd3oIffDklaYBnsuC5ES2/rgK1aRUDRWz+qWbTwLqsY6PlT37Q==} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 '@ethereumjs/util': 8.1.0 '@toruslabs/broadcast-channel': 6.3.1 - '@toruslabs/http-helpers': 3.4.0(@babel/runtime@7.22.6) - '@toruslabs/openlogin-jrpc': 4.7.0(@babel/runtime@7.22.6) + '@toruslabs/http-helpers': 3.4.0(@babel/runtime@7.23.5) + '@toruslabs/openlogin-jrpc': 4.7.0(@babel/runtime@7.23.5) async-mutex: 0.4.0 bignumber.js: 9.1.1 bowser: 2.11.0 @@ -6567,6 +6612,21 @@ packages: loglevel: 1.8.1 dev: false + /@toruslabs/http-helpers@3.4.0(@babel/runtime@7.23.5): + resolution: {integrity: sha512-CoeJSL32mpp0gmYjxv48odu6pfjHk/rbJHDwCtYPcMHAl+qUQ/DTpVOOn9U0fGkD+fYZrQmZbRkXFgLhiT0ajQ==} + engines: {node: '>=14.17.0', npm: '>=6.x'} + peerDependencies: + '@babel/runtime': ^7.x + '@sentry/types': ^7.x + peerDependenciesMeta: + '@sentry/types': + optional: true + dependencies: + '@babel/runtime': 7.23.5 + lodash.merge: 4.6.2 + loglevel: 1.8.1 + dev: false + /@toruslabs/metadata-helpers@3.2.0(@babel/runtime@7.22.6): resolution: {integrity: sha512-2bCc6PNKd9y+aWfZQ1FXd47QmfyT4NmmqPGfsqk+sQS2o+MlxIyLuh9uh7deMgXo4b4qBDX+RQGbIKM1zVk56w==} engines: {node: '>=14.17.0', npm: '>=6.x'} @@ -6583,13 +6643,13 @@ packages: - '@sentry/types' dev: false - /@toruslabs/openlogin-jrpc@3.2.0(@babel/runtime@7.22.6): + /@toruslabs/openlogin-jrpc@3.2.0(@babel/runtime@7.23.5): resolution: {integrity: sha512-G+K0EHyVUaAEyeD4xGsnAZRpn/ner8lQ2HC2+pGKg6oGmzKI2wGMDcw2KMH6+HKlfBGVJ5/VR9AQfC/tZlLDmQ==} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 - '@toruslabs/openlogin-utils': 3.0.0(@babel/runtime@7.22.6) + '@babel/runtime': 7.23.5 + '@toruslabs/openlogin-utils': 3.0.0(@babel/runtime@7.23.5) end-of-stream: 1.4.4 eth-rpc-errors: 4.0.3 events: 3.3.0 @@ -6599,15 +6659,15 @@ packages: readable-stream: 3.6.2 dev: false - /@toruslabs/openlogin-jrpc@4.7.0(@babel/runtime@7.22.6): + /@toruslabs/openlogin-jrpc@4.7.0(@babel/runtime@7.23.5): resolution: {integrity: sha512-7Zke2ky9e6HgM6Rs8ByXqrT6s5/l8wn7I11UOUPNPrP9AcYk8n7lDlVu8hniNADDc/IwHZGS0mAbtpRbWletuQ==} engines: {node: '>=16.18.1', npm: '>=8.x'} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 '@metamask/rpc-errors': 5.1.1 - '@toruslabs/openlogin-utils': 4.7.0(@babel/runtime@7.22.6) + '@toruslabs/openlogin-utils': 4.7.0(@babel/runtime@7.23.5) end-of-stream: 1.4.4 events: 3.3.0 fast-safe-stringify: 2.1.1 @@ -6618,38 +6678,38 @@ packages: - supports-color dev: false - /@toruslabs/openlogin-utils@3.0.0(@babel/runtime@7.22.6): + /@toruslabs/openlogin-utils@3.0.0(@babel/runtime@7.23.5): resolution: {integrity: sha512-T5t29/AIFqXc84x4OoAkZWjd0uoP2Lk6iaFndnIIMzCPu+BwwV0spX/jd/3YYNjZ8Po8D+faEnwAhiqemYeK2w==} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 base64url: 3.0.1 keccak: 3.0.3 randombytes: 2.1.0 dev: false - /@toruslabs/openlogin-utils@4.7.0(@babel/runtime@7.22.6): + /@toruslabs/openlogin-utils@4.7.0(@babel/runtime@7.23.5): resolution: {integrity: sha512-w6XkHs4WKuufsf/zzteBzs4EJuOknrUmJ+iv5FZ8HzIpMQeL/984CP8HYaFSEYkbGCP4ydAnhY4Uh0QAhpDbPg==} engines: {node: '>=16.18.1', npm: '>=8.x'} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 base64url: 3.0.1 dev: false - /@toruslabs/solana-embed@0.3.4(@babel/runtime@7.22.6): + /@toruslabs/solana-embed@0.3.4(@babel/runtime@7.23.5): resolution: {integrity: sha512-yj+aBJoBAneap7Jlu9/OOp7irWNuC5CqAhyhVcmb0IjWrCUFnioLdL0U7UfGaqVm/5O0leJh7/Z5Ll+3toWJBg==} engines: {node: '>=14.17.0', npm: '>=6.x'} peerDependencies: '@babel/runtime': 7.x dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 '@solana/web3.js': 1.78.0 - '@toruslabs/base-controllers': 2.9.0(@babel/runtime@7.22.6) - '@toruslabs/http-helpers': 3.4.0(@babel/runtime@7.22.6) - '@toruslabs/openlogin-jrpc': 3.2.0(@babel/runtime@7.22.6) + '@toruslabs/base-controllers': 2.9.0(@babel/runtime@7.23.5) + '@toruslabs/http-helpers': 3.4.0(@babel/runtime@7.23.5) + '@toruslabs/openlogin-jrpc': 3.2.0(@babel/runtime@7.23.5) eth-rpc-errors: 4.0.3 fast-deep-equal: 3.1.3 is-stream: 2.0.1 @@ -6664,28 +6724,34 @@ packages: - utf-8-validate dev: false - /@trezor/analytics@1.0.10: - resolution: {integrity: sha512-uXO51TmcdjhBP7WwXqU6AgnMoWbpRzzd6Ehmb6hSSSokm77RlBEurjSeVxRnjzA7h6XbSX06hxqq3iCTMK4Nmg==} + /@trezor/analytics@1.0.11(tslib@2.6.2): + resolution: {integrity: sha512-OZ+hmwq92lswzRMYiY5xRkraNT9Isx1KW9geQBYdjSSvu49SvaTxLsTOsj1xthbkD1jADTt0yk8A4QYlAEwYfA==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/env-utils': 1.0.9 - '@trezor/utils': 9.0.15 + '@trezor/env-utils': 1.0.10(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) + tslib: 2.6.2 transitivePeerDependencies: - expo-localization - react-native - react-native-config dev: false - /@trezor/blockchain-link-types@1.0.8: - resolution: {integrity: sha512-0K3Pb3tXnvhPdHlAivbLncbaxcVchdZa/0AdY0L9vEdiszEuAQkw51DqFNPYJxMl91eyW1T2wbJgAvB7e3VIyg==} + /@trezor/blockchain-link-types@1.0.9: + resolution: {integrity: sha512-7Qk1BlnY9F9fxx7EevvIXs5tAuI+uyha/QWnmjGsdCiIQmjtiPS1U4DeA/VlBHC5zPXaMBOFeKX3Tu6oer0YBw==} dev: false - /@trezor/blockchain-link-utils@1.0.9: - resolution: {integrity: sha512-24vxhafyjfIH2iWaOYAcYyG9ApiZ7PCO1hcvAMEIsH8yBRO8zQoHy10uU2CtUX0cvU6LJ/Bp2bplNGe35jUzbw==} + /@trezor/blockchain-link-utils@1.0.10(tslib@2.6.2): + resolution: {integrity: sha512-XbOf/mr5zRpnUfUFcmULtRkZSMirlpReWwN0kyz4LP8y2h+sSjXVAgpBhqYoUNk9HBjgXNtyMxH7RWL4EZBgCw==} + peerDependencies: + tslib: ^2.6.2 dependencies: '@mobily/ts-belt': 3.13.1 '@solana/web3.js': 1.87.6 - '@trezor/utils': 9.0.15 + '@trezor/utils': 9.0.16(tslib@2.6.2) bignumber.js: 9.1.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - encoding @@ -6693,20 +6759,23 @@ packages: - utf-8-validate dev: false - /@trezor/blockchain-link@2.1.19: - resolution: {integrity: sha512-hOD3S3tE4kj0JsxiT8Ux+GQVpB0OfKWzCJG+U8CTPOZEgpJGioLZr9O94BMCBFECd7dMUkQt/u/QVNvpP4Nacw==} + /@trezor/blockchain-link@2.1.20(tslib@2.6.2): + resolution: {integrity: sha512-37Fvg9ak4VZHUKmljDFV/iU26TkS3lIqvaCHCeonA6ViIJss+fX07YkCl8hcSteF6Mv3oUHgmH1P5RmtJVfIRA==} + peerDependencies: + tslib: ^2.6.2 dependencies: '@solana/buffer-layout': 4.0.1 '@solana/web3.js': 1.87.6 - '@trezor/blockchain-link-types': 1.0.8 - '@trezor/blockchain-link-utils': 1.0.9 - '@trezor/utils': 9.0.15 - '@trezor/utxo-lib': 2.0.1 + '@trezor/blockchain-link-types': 1.0.9 + '@trezor/blockchain-link-utils': 1.0.10(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) + '@trezor/utxo-lib': 2.0.2(tslib@2.6.2) '@types/web': 0.0.119 bignumber.js: 9.1.1 events: 3.3.0 ripple-lib: 1.10.1 socks-proxy-agent: 6.1.1 + tslib: 2.6.2 ws: 7.5.9 transitivePeerDependencies: - bufferutil @@ -6715,60 +6784,71 @@ packages: - utf-8-validate dev: false - /@trezor/connect-analytics@1.0.9: - resolution: {integrity: sha512-/wNn/4yoSONFhh61y/BR8SFP+b8zsRuv70Wz5Ozaxy8Fzhhe1k1AeH2OyNY8s3mCi8+1OeMZf4CO7b/mWw9PVw==} + /@trezor/connect-analytics@1.0.10(tslib@2.6.2): + resolution: {integrity: sha512-o7cbUK81CB/hFRmpgj5dPembBeoyXs5GJ1R4wibUcHvXNGCnqyS9KZT7pwafXzYFWd4HXpQje6jrIdyAOkZWZQ==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/analytics': 1.0.10 + '@trezor/analytics': 1.0.11(tslib@2.6.2) + tslib: 2.6.2 transitivePeerDependencies: - expo-localization - react-native - react-native-config dev: false - /@trezor/connect-common@0.0.23: - resolution: {integrity: sha512-FJFIO3HRrgW223w5oJSkMzYGx1LpjaYS+I57dhs35HEl//cHcvVUH8DiWV6omUlZp+CcpJguxk8q4Q5+BBPebg==} + /@trezor/connect-common@0.0.24(tslib@2.6.2): + resolution: {integrity: sha512-8nzuZNH8tsyHA2Mt4RQO935FU5ZaMZDvLqlRxVQqbrQffxP0Bei7N93DT0b4g/3UMGWdbrMwTA58jgq7pmx/Hw==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/env-utils': 1.0.9 + '@trezor/env-utils': 1.0.10(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) + tslib: 2.6.2 transitivePeerDependencies: - expo-localization - react-native - react-native-config dev: false - /@trezor/connect-web@9.1.6(tslib@2.6.2): - resolution: {integrity: sha512-KybU1roM2L47aIXP4AvlMJ8oyEvXuWU/E6+5TVmWx8JOWKFQL6cFS1e+FEsON0WUweQ7AjIMIrcCxddK2UMcCQ==} + /@trezor/connect-web@9.1.7(buffer@6.0.3)(tslib@2.6.2): + resolution: {integrity: sha512-DwjpAOaoiP1eUBzGWM6It64UMZM9Ddis9ivcc4XLj+BLOPnSHBIBqKEQPVVHY4dJ3o36EmQPqIDu8e/Zdw598Q==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/connect': 9.1.6(tslib@2.6.2) - '@trezor/utils': 9.0.15 + '@trezor/connect': 9.1.7(buffer@6.0.3)(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) events: 3.3.0 + tslib: 2.6.2 transitivePeerDependencies: + - buffer - bufferutil + - c-kzg - encoding - expo-localization - react-native - react-native-config - supports-color - - tslib - utf-8-validate dev: false - /@trezor/connect@9.1.6(tslib@2.6.2): - resolution: {integrity: sha512-wPQWNItVQu6kAEVSJroUQKieAYywwf0nBiiZpktfMUaWDwy5tsQMgw6FGTBbbfT5XJhlGyZM+K2Bbt5zGSlJXQ==} + /@trezor/connect@9.1.7(buffer@6.0.3)(tslib@2.6.2): + resolution: {integrity: sha512-6I4g8xf4WkwPjkTvCkpXwWrcSiXSoUvAwg86s29dCWizv8B1j8HmQ+6JeFyn/EC8suiLM9wj84MxNxYh6NJ6zQ==} peerDependencies: tslib: ^2.6.2 dependencies: - '@ethereumjs/common': 3.2.0 - '@ethereumjs/tx': 4.2.0 - '@fivebinaries/coin-selection': 2.2.0 - '@trezor/blockchain-link': 2.1.19 - '@trezor/blockchain-link-types': 1.0.8 - '@trezor/connect-analytics': 1.0.9 - '@trezor/connect-common': 0.0.23 - '@trezor/protobuf': 1.0.3 - '@trezor/protocol': 1.0.3 - '@trezor/transport': 1.1.18 - '@trezor/utils': 9.0.15 - '@trezor/utxo-lib': 2.0.1 + '@ethereumjs/common': 4.1.0(buffer@6.0.3) + '@ethereumjs/tx': 5.1.0(buffer@6.0.3) + '@fivebinaries/coin-selection': 2.2.1 + '@trezor/blockchain-link': 2.1.20(tslib@2.6.2) + '@trezor/blockchain-link-types': 1.0.9 + '@trezor/connect-analytics': 1.0.10(tslib@2.6.2) + '@trezor/connect-common': 0.0.24(tslib@2.6.2) + '@trezor/protobuf': 1.0.4(tslib@2.6.2) + '@trezor/protocol': 1.0.4(tslib@2.6.2) + '@trezor/transport': 1.1.19(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) + '@trezor/utxo-lib': 2.0.2(tslib@2.6.2) bignumber.js: 9.1.1 blakejs: 1.2.1 bs58: 5.0.0 @@ -6777,7 +6857,9 @@ packages: events: 3.3.0 tslib: 2.6.2 transitivePeerDependencies: + - buffer - bufferutil + - c-kzg - encoding - expo-localization - react-native @@ -6786,12 +6868,13 @@ packages: - utf-8-validate dev: false - /@trezor/env-utils@1.0.9: - resolution: {integrity: sha512-DygKVWFr21ITnr9iO4+BF40UuocOUXh4Sk/sj67edMaxo/FCF/bzfO5YV2tnfzsOU8l0phuEA/t5W2WVhTwPWg==} + /@trezor/env-utils@1.0.10(tslib@2.6.2): + resolution: {integrity: sha512-4jV8q0kMoS9FBTwsRu9ps52j8uKxavpdbzvosmEVXWqcbJjA+apuBJcnx2k6mRwMrhhwiNPVpA4MYy+s3kITLw==} peerDependencies: expo-localization: ^14.1.1 react-native: 0.71.8 react-native-config: ^1.5.0 + tslib: ^2.6.2 peerDependenciesMeta: expo-localization: optional: true @@ -6800,47 +6883,60 @@ packages: react-native-config: optional: true dependencies: + tslib: 2.6.2 ua-parser-js: 1.0.37 dev: false - /@trezor/protobuf@1.0.3: - resolution: {integrity: sha512-cvOJZCA9647nVodZ6Ias/1NWkbCGhnLCa1Rr0sljpzr+DhMpEz2nuuxpYannq8j6H4rxV4bcg/cmm5ym29/H0A==} + /@trezor/protobuf@1.0.4(tslib@2.6.2): + resolution: {integrity: sha512-uX/cA+bM4swJIJlkBQkMWoZzkxKVJnyB6sm5QosNOBWT75qQMbbcOOTHOpEnyV3fa2GXwj5uawhEQMlbWOh5zA==} + peerDependencies: + tslib: ^2.6.2 dependencies: - bytebuffer: 5.0.1 long: 4.0.0 protobufjs: 7.2.5 + tslib: 2.6.2 dev: false - /@trezor/protocol@1.0.3: - resolution: {integrity: sha512-yzbqid0VN3f8F0Kkqyvf2hhbFGVUU2aJKT0AJVYigJfZQE9RVO3mbbUonOs1BXDfLZsNQEGzI6q432qHIm1XhA==} + /@trezor/protocol@1.0.4(tslib@2.6.2): + resolution: {integrity: sha512-9mEKdLA2S9Hdfuh7goIqurmSYNMOvPIPbOez+9GqZcwI1LpW/usACkY6vbHCKQmK5Q1at1rm/N2GUdFpuTtQow==} + peerDependencies: + tslib: ^2.6.2 dependencies: - bytebuffer: 5.0.1 + tslib: 2.6.2 dev: false - /@trezor/transport@1.1.18: - resolution: {integrity: sha512-zxV88QZFgFhQHtgmxVmvxRoQsZOdmtZ1ZgGUDbkUFdeYizZfatiY4LJWQTm2UodmLXNi33bmufcJXI8Ibpo2xw==} + /@trezor/transport@1.1.19(tslib@2.6.2): + resolution: {integrity: sha512-dhcqr5pyXC/YpNT/Qou+kMDR3xxBnDB3htOkCH7Mut1xe/lb1JepKGqyGfdpWMmuDramzy1E7zd1WXoLZvQYcw==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/protobuf': 1.0.3 - '@trezor/protocol': 1.0.3 - '@trezor/utils': 9.0.15 - bytebuffer: 5.0.1 + '@trezor/protobuf': 1.0.4(tslib@2.6.2) + '@trezor/protocol': 1.0.4(tslib@2.6.2) + '@trezor/utils': 9.0.16(tslib@2.6.2) cross-fetch: 4.0.0 json-stable-stringify: 1.0.2 long: 4.0.0 protobufjs: 7.2.5 + tslib: 2.6.2 usb: 2.11.0 transitivePeerDependencies: - encoding dev: false - /@trezor/utils@9.0.15: - resolution: {integrity: sha512-MbtSIt+C5nWWO1yNVTBeRNW5kxUB2VuBU0CbPSWZkc2sg2/3qe0W/DNf6I0j3wrLSppzZW2jHG3ptz6i+vp39Q==} + /@trezor/utils@9.0.16(tslib@2.6.2): + resolution: {integrity: sha512-Tc0cNQHAqKE7IRvHB6gcSJns3aANV0fomUX2KagsC91KFSEex9lQxJvkwZDrESXdc/6/ooG5APph05X5Nwfzrg==} + peerDependencies: + tslib: ^2.6.2 + dependencies: + tslib: 2.6.2 dev: false - /@trezor/utxo-lib@2.0.1: - resolution: {integrity: sha512-C4dY0riZVzYLEt+kXe5KbDguSGBzFto/2jH5xoyhlKt0bEZEJaP4MpYsNwE+zlOGD1yholAPOofx6xiqjDsGig==} + /@trezor/utxo-lib@2.0.2(tslib@2.6.2): + resolution: {integrity: sha512-NmF4y1qRdHRyxLti/9XTQuHoCfGjV5FXjojnbUQe77LpaLiHySTKfYeZXwiJHvuhfzvMnxxIAdV42Bty+cmH9Q==} + peerDependencies: + tslib: ^2.6.2 dependencies: - '@trezor/utils': 9.0.15 + '@trezor/utils': 9.0.16(tslib@2.6.2) bchaddrjs: 0.5.2 bech32: 2.0.0 bip66: 1.1.5 @@ -6855,6 +6951,7 @@ packages: int64-buffer: 1.0.1 pushdata-bitcoin: 1.0.1 tiny-secp256k1: 1.1.6 + tslib: 2.6.2 typeforce: 1.18.0 varuint-bitcoin: 1.1.2 wif: 4.0.0 @@ -8165,7 +8262,7 @@ packages: resolution: {integrity: sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==} engines: {node: '>=4'} dependencies: - tslib: 2.6.0 + tslib: 2.6.2 dev: false /astral-regex@1.0.0: @@ -8789,7 +8886,7 @@ packages: /bs58check@3.0.1: resolution: {integrity: sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==} dependencies: - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.2 bs58: 5.0.0 dev: false @@ -8848,13 +8945,6 @@ packages: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} dev: true - /bytebuffer@5.0.1: - resolution: {integrity: sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==} - engines: {node: '>=0.8'} - dependencies: - long: 3.2.0 - dev: false - /bytes@3.0.0: resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} engines: {node: '>= 0.8'} @@ -9350,6 +9440,18 @@ packages: buffer: 5.7.1 dev: false + /crc@4.3.2(buffer@6.0.3): + resolution: {integrity: sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==} + engines: {node: '>=12'} + peerDependencies: + buffer: '>=6.0.3' + peerDependenciesMeta: + buffer: + optional: true + dependencies: + buffer: 6.0.3 + dev: false + /create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} dependencies: @@ -13857,11 +13959,6 @@ packages: engines: {node: '>= 0.6.0'} dev: false - /long@3.2.0: - resolution: {integrity: sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==} - engines: {node: '>=0.6'} - dev: false - /long@4.0.0: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} dev: false @@ -14199,7 +14296,7 @@ packages: resolution: {integrity: sha512-MuWHubQHymUWBpZLwuKZQgA/qbb35WnDAKPo83rk7JRLIFPvzXSvFaC18voPuzJBt1V98lKQIonh6MiC9gd8Ug==} engines: {node: '>=16'} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.23.5 react-refresh: 0.4.3 dev: false @@ -17269,7 +17366,7 @@ packages: ast-types: 0.15.2 esprima: 4.0.1 source-map: 0.6.1 - tslib: 2.6.0 + tslib: 2.6.2 dev: false /rechoir@0.6.2: @@ -17310,7 +17407,6 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: false /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==}