@trezor/connect 9.3.1-beta.3 → 9.4.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +158 -102
  2. package/README.md +1 -1
  3. package/lib/api/binance/api/index.js +4 -6
  4. package/lib/api/bitcoin/Fees.d.ts +2 -2
  5. package/lib/api/bitcoin/outputs.d.ts +1 -1
  6. package/lib/api/bitcoin/refTx.d.ts +2 -2
  7. package/lib/api/cardano/api/index.js +6 -8
  8. package/lib/api/cardano/cardanoInputs.d.ts +10 -10
  9. package/lib/api/cardano/cardanoOutputs.d.ts +23 -23
  10. package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
  11. package/lib/api/common/Discovery.d.ts +0 -1
  12. package/lib/api/common/paramsValidator.js +2 -2
  13. package/lib/api/composeTransaction.js +3 -0
  14. package/lib/api/eos/api/index.js +3 -5
  15. package/lib/api/eos/eosSignTx.d.ts +4 -4
  16. package/lib/api/eos/eosSignTx.js +2 -2
  17. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +68 -68
  18. package/lib/api/ethereum/api/index.js +7 -9
  19. package/lib/api/ethereum/ethereumDefinitions.d.ts +23 -23
  20. package/lib/api/ethereum/ethereumSignTypedData.js +3 -4
  21. package/lib/api/firmware/calculateFirmwareHash.d.ts +0 -1
  22. package/lib/api/firmware/parseFirmwareHeaders.d.ts +0 -1
  23. package/lib/api/firmware/uploadFirmware.d.ts +6 -1
  24. package/lib/api/firmware/verifyAuthenticityProof.d.ts +0 -1
  25. package/lib/api/getAccountInfo.d.ts +38 -38
  26. package/lib/api/getCoinInfo.d.ts +3 -3
  27. package/lib/api/getDeviceState.d.ts +2 -1
  28. package/lib/api/getDeviceState.js +6 -3
  29. package/lib/api/getFeatures.d.ts +10 -10
  30. package/lib/api/index.js +49 -51
  31. package/lib/api/nem/api/index.js +3 -5
  32. package/lib/api/pushTransaction.js +1 -1
  33. package/lib/api/ripple/api/index.js +3 -5
  34. package/lib/api/signTransaction.js +3 -0
  35. package/lib/api/solana/api/index.js +4 -6
  36. package/lib/api/stellar/api/index.js +3 -5
  37. package/lib/api/tezos/api/index.js +4 -6
  38. package/lib/api/tezos/tezosSignTx.js +2 -2
  39. package/lib/backend/Blockchain.d.ts +2 -2
  40. package/lib/backend/BlockchainLink.d.ts +2 -2
  41. package/lib/constants/nem.d.ts +3 -3
  42. package/lib/core/AbstractMethod.d.ts +8 -6
  43. package/lib/core/AbstractMethod.js +26 -3
  44. package/lib/core/index.d.ts +0 -1
  45. package/lib/core/index.js +45 -54
  46. package/lib/core/onCallFirmwareUpdate.js +7 -2
  47. package/lib/data/DataManager.d.ts +5 -31
  48. package/lib/data/coinInfo.d.ts +15 -21
  49. package/lib/data/config.d.ts +5 -31
  50. package/lib/data/config.js +8 -5
  51. package/lib/data/deviceAuthenticityConfig.js +32 -14
  52. package/lib/data/deviceAuthenticityConfigTypes.d.ts +28 -28
  53. package/lib/data/firmwareInfo.d.ts +2 -2
  54. package/lib/data/firmwareInfo.js +8 -7
  55. package/lib/data/models.js +3 -3
  56. package/lib/data/version.d.ts +1 -1
  57. package/lib/data/version.js +1 -1
  58. package/lib/device/Device.d.ts +52 -19
  59. package/lib/device/Device.js +87 -73
  60. package/lib/device/DeviceCommands.d.ts +9 -9
  61. package/lib/device/DeviceCommands.js +10 -10
  62. package/lib/device/DeviceList.js +60 -83
  63. package/lib/device/StateStorage.d.ts +15 -0
  64. package/lib/device/StateStorage.js +40 -0
  65. package/lib/device/checkFirmwareRevision.js +0 -4
  66. package/lib/events/device.d.ts +0 -1
  67. package/lib/events/device.js +0 -1
  68. package/lib/events/ui-request.d.ts +2 -1
  69. package/lib/factory.d.ts +0 -1
  70. package/lib/index.d.ts +0 -1
  71. package/lib/types/api/applySettings.d.ts +14 -14
  72. package/lib/types/api/authenticateDevice.d.ts +30 -30
  73. package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
  74. package/lib/types/api/binance/index.d.ts +152 -152
  75. package/lib/types/api/bitcoin/index.d.ts +12 -12
  76. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +2 -2
  77. package/lib/types/api/cardano/index.d.ts +556 -556
  78. package/lib/types/api/changeLanguage.d.ts +7 -7
  79. package/lib/types/api/cipherKeyValue.d.ts +8 -8
  80. package/lib/types/api/eos/index.d.ts +633 -633
  81. package/lib/types/api/ethereum/index.d.ts +124 -124
  82. package/lib/types/api/firmwareUpdate.d.ts +6 -6
  83. package/lib/types/api/getAccountDescriptor.d.ts +5 -5
  84. package/lib/types/api/getAddress.d.ts +33 -33
  85. package/lib/types/api/getDeviceState.d.ts +3 -1
  86. package/lib/types/api/getOwnershipId.d.ts +25 -25
  87. package/lib/types/api/getOwnershipProof.d.ts +29 -29
  88. package/lib/types/api/getPublicKey.d.ts +25 -25
  89. package/lib/types/api/nem/index.d.ts +707 -707
  90. package/lib/types/api/nemGetAddress.d.ts +7 -7
  91. package/lib/types/api/pushTransaction.d.ts +4 -4
  92. package/lib/types/api/recoveryDevice.d.ts +10 -10
  93. package/lib/types/api/requestLogin.d.ts +28 -28
  94. package/lib/types/api/ripple/index.d.ts +28 -28
  95. package/lib/types/api/solana/index.d.ts +28 -28
  96. package/lib/types/api/stellar/index.d.ts +745 -745
  97. package/lib/types/api/tezos/index.d.ts +129 -129
  98. package/lib/types/api/unlockPath.d.ts +3 -3
  99. package/lib/types/coinInfo.d.ts +246 -246
  100. package/lib/types/device.d.ts +9 -1
  101. package/lib/types/fees.d.ts +22 -22
  102. package/lib/types/firmware.d.ts +1 -1
  103. package/lib/types/params.d.ts +20 -19
  104. package/lib/utils/assetUtils.js +1 -1
  105. package/lib/utils/assets-browser.d.ts +1 -1
  106. package/lib/utils/assets.js +1 -2
  107. package/lib/utils/debug.d.ts +2 -2
  108. package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
  109. package/lib/utils/hdnodeUtils.d.ts +1 -191
  110. package/lib/utils/hdnodeUtils.js +2 -2
  111. package/lib/utils/pathUtils.d.ts +1 -191
  112. package/lib/utils/promiseUtils.d.ts +1 -1
  113. package/lib/utils/uiPromiseManager.d.ts +2 -2
  114. package/package.json +17 -15
package/CHANGELOG.md CHANGED
@@ -1,50 +1,136 @@
1
1
  | Package | Stable | Canary |
2
2
  | :------------------------------: | :----: | :----------: |
3
- | npm @trezor/connect | 9.3.0 | 9.3.1-beta.3 |
4
- | npm @trezor/connect-web | 9.3.0 | 9.3.1-beta.3 |
5
- | npm @trezor/connect-webextension | 9.3.0 | 9.3.1-beta.3 |
3
+ | npm @trezor/connect | 9.4.0 | 9.4.1-beta.1 |
4
+ | npm @trezor/connect-web | 9.4.0 | 9.4.1-beta.1 |
5
+ | npm @trezor/connect-webextension | 9.4.0 | 9.4.1-beta.1 |
6
6
 
7
7
  | Deployment | Stable | Canary |
8
8
  | :----------------: | :----: | :----------: |
9
- | connect.trezor.io/ | 9.3.0 | 9.3.1-beta.3 |
9
+ | connect.trezor.io/ | 9.4.0 | 9.4.1-beta.1 |
10
10
 
11
11
  Use the persistent link [connect.trezor.io/9](https://connect.trezor.io/9/) to access the latest stable version of Connect Explorer.
12
12
 
13
- # 9.3.1-beta.3
13
+ # 9.4.1-beta.1
14
+
15
+ Automatic retry for no transport issue: If the transport (bridge) is initially not available, the automatic retry feature allows the user to continue after starting the transport, without having to restart the entire flow.
16
+
17
+ Additional confirmation for pushing transactions: A new permission prompts users for extra confirmation when methods push transactions to the network, ensuring a more secure experience.
18
+
19
+ NodeBridge new version compatibility fix: Resolved an issue where NodeBridge version parsing failed to work with the latest Suite version. While the fix is on the Connect side, updating is recommended for improved compatibility.
20
+
21
+ ### Features
22
+
23
+ - When method param has a side-effect (push transaction) user is prompted for permission in connect-popup (d05fb24)
24
+ - User is now able to finish flow in popup even if transport (bridge) is not available when it started. (8874eb6)
25
+ - Connect-popup now remembers device for either 15 minutes or value of device auto_lock depending on which is higher (e6a68e0)
26
+ - connect-common: add FW 2.8.3 binaries for T3B1 (c32984c)
27
+ - connect-common: add FW 2.8.3 binaries for T3T1 (b57198a)
28
+ - docs(connect-explorer): step by step tutorial to build connect webextension (9d5ba70)
29
+ - docs(connect-explorer): add more ways to test getAccountInfo (62101d6)
30
+
31
+ ### Fixes:
32
+
33
+ - New NodeBridge version not parsed correctly - ignore semver labels in version utils (6501704)
34
+ - fw releases value for custom device model (265028d)
35
+ - keepSession with changing useCardanoDerivation (8c654a1)
36
+ - fw update: when device is disconnected during fw update as a result of RebootToBootloader call do not release it on transport layer (93da8b5)
37
+ - fw update: temporarily disable automatic language update for TT due to memory constraints (5d7f578)
38
+ - connect-explorer: doc repository base so edit page works (203a83d)
39
+ - connect-examples: add asterisk to match popup urls for content script (9da8b0b)
40
+ - connect-explorer: diagrams dark mode regression (09a5f9f)
41
+
42
+ ### Chores
43
+
44
+ - update device authenticity config (31ec9a2, 68254a3)
45
+ - remove useless setTransports (a8bd51d)
46
+ - gen-reftx add decred fields (f57ef60)
47
+ - rework gen-reftx util to ts (15e64e8)
48
+ - device state saving refactor (e6a68e0)
49
+ - remove useless null fallback (7cc0b00)
50
+ - StaticSessionId template literal type (a97dfae)
51
+ - allow preminor releases in connect (38ba9e1)
52
+ - unify names of Device fields (483d370)
53
+ - grooming in Device.state (0bfbe1c)
54
+ - remove TypedPayload import (DeviceCommands) from eosSignTx.ts (609f6a6)
55
+ - rename types in deviceCommands (a17c695)
56
+ - add T3B1 and T3T1 to methods config (744ede5)
57
+ - auto retry cycle instead of recursion (7f73cae)
58
+ - descriptor diff improvement (afa479e)
59
+ - device descriptor update (7db4bb5)
60
+ - test: adjust decred to 2.8.2 (f4798ef)
61
+ - test: e2e semver filtering fix (16cc575)
62
+ - test: rewrite common.setup.js to ts (62a3962)
63
+ - test: Extend checkFirmwareRevision test to all devices (e706d74)
64
+ - test: remove ADDRESS_N utility from tests (40cd370)
65
+ - connect-common: update coins.json via yarn update-coins (f7c16e1)
66
+ - connect-common: add t3b1 to coins.json (6a8b460)
67
+ - connect-common: change lng blob in release.json (c8a0c46)
68
+ - connect-explorer: make device support documentation more future-proof (ea03610)
69
+ - connect-explorer: remove old conversion script (11c534e)
70
+ - transport: don't pass signal to transports (0cb09ab)
71
+ - transport: sessions background without abort signal (4f6e8cf)
72
+ - transport: better abortable methods (583f4aa)
73
+
74
+ ### Deps
75
+
76
+ - @sinclair/typebox 0.31.28=>0.33.7 (43ae297)
77
+ - webpack from 5.93.0 to 5.94.0 (358b96d)
78
+ - crypto libs (a304dd5)
79
+ - next-theme 0.2.1=>0.3.0 (f8f5351)
80
+ - next 14.1.3=>14.2.6 (b364e97)
81
+ - @uiw/react-codemirror 4.21.25=>4.23.0 (8bcc314)
82
+ - codemiror-json-schema 0.7.0=>0.7.8 (d38b9a0)
83
+ - @playwright\* 1.45.3=>1.46.1 (492ff5f)
84
+ - @types/chrome; @types/web; @types/sharedworker (8e73aeb)
85
+ - various patch versions deps (ed3e9bf)
86
+ - TS 5.5 (198c91f)
87
+
88
+ # 9.4.0
14
89
 
15
90
  ## connect
16
91
 
17
- - add fw 2.8.1 (847cfd6)
18
- - feat: Implement firmware hash check into device (905e656, 10a1c86, 95d3d90, 655b9d3)
19
- - chore: rename bsc to bnb as it is declared in fw repo (0174dc2)
20
- - fix: report devices without GetFeatures support as fw required (f6b7826)
21
- - refactor: core and deviceList global state (6149ef1, d1e92f9, cbb4c5c, 167cacf, 0057aeb, 76ab7a0, 8e65374, 418b7cc)
92
+ ### New Feature: coreMode Initialization Option
22
93
 
23
- ## connect-popup
94
+ We have introduced a new initialization option, coreMode, which allows websites to choose between the existing iframe mode and the new popup mode. The popup mode enables the use of WebUSB on third-party websites, a feature not available in iframe mode. By default, coreMode is set to auto, allowing the library to automatically select the optimal mode based on the environment. For more details, please refer to the [init method documentation](https://connect.trezor.io/9.3.1-beta.1/methods/other/init/).
24
95
 
25
- - Opera is now not marked as unsupported browser (8e34af7)
26
- - fix typo in loader message (9adeb0b)
27
- - allow on mobile (9a6ba2e, 462e45e)
28
- - update no transport description message (10a79da)
96
+ ### Legacy Passphrase Support Removed
29
97
 
30
- ## connect-explorer
98
+ Support for legacy passphrases has been discontinued. Users with firmware versions earlier than 1.0.9 and 2.3.0 will need to update their devices to continue using @trezor/connect.
31
99
 
32
- - add extra meta tags & preview image (c4e1c2d)
33
- - add loading indicator to method submit button (14e1248)
34
- - clean up coins select - remove namecoin, vertcoin, capricoin and komodo (9cef961)
100
+ ### Enhanced Popup Handshake Reliability
35
101
 
36
- ## Dependencies update
102
+ ### Cardano Support Update
103
+
104
+ Added support for Conway certificates and increased the minimum supported firmware version to 2.6.0 to streamline legacy code.
105
+
106
+ ### Minor Fixes
107
+
108
+ Various minor fixes have been implemented in Connect Explorer and the documentation.
37
109
 
38
- - npm-prerelease: @trezor/blockchain-link 2.2.1-beta.3
39
- - npm-prerelease: @trezor/blockchain-link-utils 1.1.1-beta.3
40
- - npm-prerelease: @trezor/blockchain-link-types 1.1.1-beta.3
41
- - npm-prerelease: @trezor/connect-analytics 1.1.1-beta.1
42
- - npm-prerelease: @trezor/connect-common 0.1.1-beta.3
43
- - npm-prerelease: @trezor/transport 1.2.1-beta.3
44
- - npm-prerelease: @trezor/utils 9.1.1-beta.3
110
+ ### Device Authentication Enhancement
45
111
 
46
- # 9.3.1-beta.2
112
+ The AuthenticateDevice method now verifies CA certificate extensions.
47
113
 
114
+ ### New Support for T3B1
115
+
116
+ Added support for T3B1.
117
+
118
+ - chore(connect): Add Ambire Browser Extension to knownHosts (cbe81ab)
119
+ - chore(connect): remove ethereum-cryptography npm package (18851d1)
120
+ - chore(connect): split public and internal settings type (3aab4ea)
121
+ - chore(connect): add new CA pubkeys and update timestamp (48ec951)
122
+ - chore(connect): refactoring of the CheckFirmwareAuthenticity to support local binary (and wont download it from web, when its available in the suite) (82ab513)
123
+ - fix(connect): disallow interaction-less fw update when switching fw type (4936939)
124
+ - fix(connect): validate x509 asn1 component (bc13fe2)
125
+ - fix(connect): handle missing language binary (954dbb9)
126
+ - fix(connect): proceed with fw install even when language data fails to download (b40d1b7)
127
+ - test(connect): x509 extensions parser (163c82c)
128
+ - test(connect): update to min version fw 1.0.9 and 2.3.0 (544c311)
129
+ - add fw 2.8.1 (847cfd6)
130
+ - feat: Implement firmware hash check into device (905e656, 10a1c86, 95d3d90, 655b9d3)
131
+ - chore: rename bsc to bnb as it is declared in fw repo (0174dc2)
132
+ - fix: report devices without GetFeatures support as fw required (f6b7826)
133
+ - refactor: core and deviceList global state (6149ef1, d1e92f9, cbb4c5c, 167cacf, 0057aeb, 76ab7a0, 8e65374, 418b7cc)
48
134
  - refactor(connect): removed initDeviceList, move transportReconnect inside DeviceList, make DeviceList reusable, device list constructor not throwing, singleton-like DeviceList, separate onTransportUpdate, pendingTransportEvent improved, improve DeviceList init flow (f4b3694, 02215de, b53259b, e8c6c25, e395dc8, 6509e5c, 3e30d64, d173966, 50cbbea, 1a81d89, 4780c51, 75bfe75, 83c0cb3, 73261c8, f2167bf, bb7dfee)
49
135
  - fix(connect): correctly wait for device selection in case of overriding (0c7a3bd)
50
136
  - fix(connect): Fork old PassphraseTypeCard to connect (155afda)
@@ -57,22 +143,46 @@ Use the persistent link [connect.trezor.io/9](https://connect.trezor.io/9/) to a
57
143
 
58
144
  ## connect-web
59
145
 
60
- - don't fallback to core in popup with no webusb (7120e83)
61
146
  - clean up in popupmanager when useUi=false (9bc2ea9)
147
+ - default coreMode to auto (e45d47e)
148
+ - automatic fallback to core in popup (e4e1fcc, 7120e83)
62
149
 
63
150
  ## connect-popup
64
151
 
65
152
  - add missing device icons (9fdd1d7)
66
-
67
- ## connect-webextension
68
-
69
- - Allow multiple content script extension conflicts (348b32a)
153
+ - Opera is now not marked as unsupported browser (8e34af7)
154
+ - fix typo in loader message (9adeb0b)
155
+ - allow on mobile (9a6ba2e, 462e45e)
156
+ - update no transport description message (10a79da)
157
+ - remove bridge references, deeplink to suite desktop (98e98a4)
70
158
 
71
159
  ## connect-explorer
72
160
 
73
- - wrong default coreMode in settings (3a81f14)
74
161
  - don't validate connectSrc in webextension (8737d47)
75
162
  - add link to new webextension example (86a13b1)
163
+ - add extra meta tags & preview image (c4e1c2d)
164
+ - add loading indicator to method submit button (14e1248)
165
+ - clean up coins select - remove namecoin, vertcoin, capricoin and komodo (9cef961)
166
+ - applySettings optional values (0bcd83a)
167
+ - hide extra headings from toc in homepage (14f89c4)
168
+ - show success message in settings (0ca7c0c)
169
+ - remove MTT for firmwareUpdate (ebbe96c)
170
+ - bad styled-components prop (e2b7fc7)
171
+
172
+ ## connect-webextension
173
+
174
+ - Prevent multiple content script extension conflicts (348b32a)
175
+ - link changelog to the one in connect (a02ec72)
176
+
177
+ ## connect-common
178
+
179
+ - add new fw 2.8.0 (314052b)
180
+ - fw version 1.9.0 and 2.3.0 required (ee623e4)
181
+
182
+ ## connect-plugin-stellar
183
+
184
+ - update stellar sdk (89cf20e)
185
+ - update trends libs (70b9c11)
76
186
 
77
187
  ## Dependencies update
78
188
 
@@ -87,74 +197,20 @@ Use the persistent link [connect.trezor.io/9](https://connect.trezor.io/9/) to a
87
197
  - bump rimraf from 5.0.5 to 6.0.1
88
198
  - bump txs from 4.7.0 to 4.16.2
89
199
 
90
- - npm-prerelease: @trezor/blockchain-link 2.2.1-beta.2
91
- - npm-prerelease: @trezor/blockchain-link-utils 1.1.1-beta.2
92
- - npm-prerelease: @trezor/blockchain-link-types 1.1.1-beta.2
93
- - npm-prerelease: @trezor/analytics 1.1.1-beta.1
94
- - npm-prerelease: @trezor/connect-common 0.1.1-beta.2
95
- - npm-prerelease: @trezor/env-utils 1.1.1-beta.1
96
- - npm-prerelease: @trezor/transport 1.2.1-beta.2
97
- - npm-prerelease: @trezor/protobuf 1.1.1-beta.2
98
- - npm-prerelease: @trezor/schema-utils 1.1.1-beta.1
99
- - npm-prerelease: @trezor/protocol 1.1.1-beta.1
100
- - npm-prerelease: @trezor/utxo-lib 2.1.1-beta.1
101
- - npm-prerelease: @trezor/utils 9.1.1-beta.2
102
- - npm-release: @trezor/connect 9.3.1-beta.2
103
-
104
- # 9.3.1-beta.1
105
-
106
- We introduce a new init option `coreMode`, which allows websites to interact either using the existing `iframe` mode or the new `popup` mode. The `popup` mode is allows to use WebUSB even on third-party websites, which is not possible with the `iframe` mode. By default, the `coreMode` is set to `auto`, which means that the library will automatically choose the best mode based on the environment. More information can be found in [init method documentation](https://connect.trezor.io/9.3.1-beta.1/methods/other/init/).
107
-
108
- Remove support for legacy passphrase, users with Firmware version smaller than 1.0.9 and 2.3.0 will be requested to update in order to use @trezor/connect (7bb57cf)
109
-
110
- AuthenticateDevice verify CA cert extensions (4ba4445)
111
-
112
- Add support for T3B1 (f7f1705)
113
-
114
- - chore(connect): Add Ambire Browser Extension to knownHosts (cbe81ab)
115
- - chore(connect): remove ethereum-cryptography (18851d1)
116
- - chore(connect): split public and internal settings type (3aab4ea)
117
- - chore(connect): remove useCoreInPopup from explorer and tests (fee60c1)
118
- - chore(connect): add new CA pubkeys and update timestamp (48ec951)
119
- - chore(connect): refactoring of the CheckFirmwareAuthenticity to support local binary (and wont download it from web, when its available in the suite) (82ab513)
120
- - docs(connect): describe coreMode (a5238d6)
121
- - fix(connect): disallow interaction-less fw update when switching fw type (4936939)
122
- - fix(connect): validate x509 asn1 component (bc13fe2)
123
- - fix(connect): handle missing language binary (954dbb9)
124
- - fix(connect): proceed with fw install even when language data fails to download (b40d1b7)
125
- - test(connect): x509 extensions parser (163c82c)
126
- - test(connect): update to min version fw 1.0.9 and 2.3.0 (544c311)
127
-
128
- ## connect-ui
129
-
130
- - remove bridge references, deeplink to suite desktop (98e98a4)
131
-
132
- ## connect-plugin-stellar
133
-
134
- - update stellar sdk (89cf20e)
135
- - update trends libs (70b9c11)
136
-
137
- ## connect-web
138
-
139
- - default coreMode to auto (e45d47e)
140
- - automatic fallback to core in popup (e4e1fcc)
141
-
142
- ## connect-webextension
143
-
144
- - link changelog to the one in connect (a02ec72)
145
-
146
- ## connect-explorer
147
-
148
- - applySettings optional values (0bcd83a)
149
- - hide extra headings from toc in homepage (14f89c4)
150
- - show success message in settings (0ca7c0c)
151
- - remove MTT for firmwareUpdate (ebbe96c)
152
- - bad styled-components prop (e2b7fc7)
153
-
154
- ## connect-common
155
-
156
- - add new fw 2.8.0 (314052b)
157
- - fw version 1.9.0 and 2.3.0 required (ee623e4)
200
+ - npm-release: @trezor/blockchain-link 2.3.0
201
+ - npm-release: @trezor/blockchain-link-utils 1.2.0
202
+ - npm-release: @trezor/blockchain-link-types 1.2.0
203
+ - npm-release: @trezor/connect-analytics 1.2.0
204
+ - npm-release: @trezor/analytics 1.2.0
205
+ - npm-release: @trezor/connect-common 0.2.0
206
+ - npm-release: @trezor/env-utils 1.2.0
207
+ - npm-release: @trezor/transport 1.3.0
208
+ - npm-release: @trezor/protobuf 1.2.0
209
+ - npm-release: @trezor/schema-utils 1.2.0
210
+ - npm-release: @trezor/protocol 1.2.0
211
+ - npm-release: @trezor/utxo-lib 2.2.0
212
+ - npm-release: @trezor/utils 9.2.0
213
+ - npm-release: @trezor/connect 9.4.0
158
214
 
159
215
  # 9.3.0
160
216
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @trezor/connect
2
2
 
3
- API version 9.3.1-beta.3
3
+ API version 9.4.1-beta.1
4
4
 
5
5
  [![Build Status](https://github.com/trezor/trezor-suite/actions/workflows/test-connect.yml/badge.svg)](https://github.com/trezor/trezor-suite/actions/workflows/test-connect.yml)
6
6
  [![NPM](https://img.shields.io/npm/v/@trezor/connect.svg)](https://www.npmjs.org/package/@trezor/connect)
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.binanceSignTransaction = exports.binanceGetPublicKey = exports.binanceGetAddress = void 0;
4
+ const tslib_1 = require("tslib");
7
5
  var binanceGetAddress_1 = require("./binanceGetAddress");
8
- Object.defineProperty(exports, "binanceGetAddress", { enumerable: true, get: function () { return __importDefault(binanceGetAddress_1).default; } });
6
+ Object.defineProperty(exports, "binanceGetAddress", { enumerable: true, get: function () { return tslib_1.__importDefault(binanceGetAddress_1).default; } });
9
7
  var binanceGetPublicKey_1 = require("./binanceGetPublicKey");
10
- Object.defineProperty(exports, "binanceGetPublicKey", { enumerable: true, get: function () { return __importDefault(binanceGetPublicKey_1).default; } });
8
+ Object.defineProperty(exports, "binanceGetPublicKey", { enumerable: true, get: function () { return tslib_1.__importDefault(binanceGetPublicKey_1).default; } });
11
9
  var binanceSignTransaction_1 = require("./binanceSignTransaction");
12
- Object.defineProperty(exports, "binanceSignTransaction", { enumerable: true, get: function () { return __importDefault(binanceSignTransaction_1).default; } });
10
+ Object.defineProperty(exports, "binanceSignTransaction", { enumerable: true, get: function () { return tslib_1.__importDefault(binanceSignTransaction_1).default; } });
13
11
  //# sourceMappingURL=index.js.map
@@ -10,14 +10,14 @@ export declare class FeeLevels {
10
10
  loadMisc(blockchain: Blockchain): Promise<{
11
11
  feeLimit?: string | undefined;
12
12
  feePerTx?: string | undefined;
13
- label: "high" | "normal" | "economy" | "low" | "custom";
13
+ label: "normal" | "custom" | "high" | "economy" | "low";
14
14
  feePerUnit: string;
15
15
  blocks: number;
16
16
  }[]>;
17
17
  load(blockchain: Blockchain): Promise<{
18
18
  feeLimit?: string | undefined;
19
19
  feePerTx?: string | undefined;
20
- label: "high" | "normal" | "economy" | "low" | "custom";
20
+ label: "normal" | "custom" | "high" | "economy" | "low";
21
21
  feePerUnit: string;
22
22
  blocks: number;
23
23
  }[]>;
@@ -4,5 +4,5 @@ import type { BitcoinNetworkInfo, ProtoWithDerivationPath } from '../../types';
4
4
  import type { ComposeOutput, ComposeResultFinal } from '../../types/api/composeTransaction';
5
5
  export declare const validateTrezorOutputs: (outputs: ProtoWithDerivationPath<PROTO.TxOutputType>[], coinInfo: BitcoinNetworkInfo) => PROTO.TxOutputType[];
6
6
  export declare const validateHDOutput: (output: ComposeOutput, coinInfo: BitcoinNetworkInfo) => ComposeOutputBase;
7
- export declare const outputToTrezor: (output: ComposeResultFinal['outputs'][number]) => PROTO.TxOutputType;
7
+ export declare const outputToTrezor: (output: ComposeResultFinal["outputs"][number]) => PROTO.TxOutputType;
8
8
  //# sourceMappingURL=outputs.d.ts.map
@@ -10,10 +10,10 @@ export declare const transformOrigTransactions: (txs: BitcoinJsTransaction[], co
10
10
  export declare const transformReferencedTransaction: (tx: BitcoinJsTransaction) => RefTransaction;
11
11
  export declare const transformReferencedTransactions: (txs: BitcoinJsTransaction[]) => RefTransaction[];
12
12
  export declare const validateReferencedTransactions: ({ transactions, inputs, outputs, addresses, coinInfo, }: {
13
- transactions?: (AccountTransaction | RefTransaction)[] | undefined;
13
+ transactions?: (RefTransaction | AccountTransaction)[];
14
14
  inputs: PROTO.TxInputType[];
15
15
  outputs: PROTO.TxOutputType[];
16
- addresses?: AccountAddresses | undefined;
16
+ addresses?: AccountAddresses;
17
17
  coinInfo: BitcoinNetworkInfo;
18
18
  }) => RefTransaction[] | undefined;
19
19
  //# sourceMappingURL=refTx.d.ts.map
@@ -1,17 +1,15 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.cardanoComposeTransaction = exports.cardanoSignTransaction = exports.cardanoGetPublicKey = exports.cardanoGetNativeScriptHash = exports.cardanoGetAddress = void 0;
4
+ const tslib_1 = require("tslib");
7
5
  var cardanoGetAddress_1 = require("./cardanoGetAddress");
8
- Object.defineProperty(exports, "cardanoGetAddress", { enumerable: true, get: function () { return __importDefault(cardanoGetAddress_1).default; } });
6
+ Object.defineProperty(exports, "cardanoGetAddress", { enumerable: true, get: function () { return tslib_1.__importDefault(cardanoGetAddress_1).default; } });
9
7
  var cardanoGetNativeScriptHash_1 = require("./cardanoGetNativeScriptHash");
10
- Object.defineProperty(exports, "cardanoGetNativeScriptHash", { enumerable: true, get: function () { return __importDefault(cardanoGetNativeScriptHash_1).default; } });
8
+ Object.defineProperty(exports, "cardanoGetNativeScriptHash", { enumerable: true, get: function () { return tslib_1.__importDefault(cardanoGetNativeScriptHash_1).default; } });
11
9
  var cardanoGetPublicKey_1 = require("./cardanoGetPublicKey");
12
- Object.defineProperty(exports, "cardanoGetPublicKey", { enumerable: true, get: function () { return __importDefault(cardanoGetPublicKey_1).default; } });
10
+ Object.defineProperty(exports, "cardanoGetPublicKey", { enumerable: true, get: function () { return tslib_1.__importDefault(cardanoGetPublicKey_1).default; } });
13
11
  var cardanoSignTransaction_1 = require("./cardanoSignTransaction");
14
- Object.defineProperty(exports, "cardanoSignTransaction", { enumerable: true, get: function () { return __importDefault(cardanoSignTransaction_1).default; } });
12
+ Object.defineProperty(exports, "cardanoSignTransaction", { enumerable: true, get: function () { return tslib_1.__importDefault(cardanoSignTransaction_1).default; } });
15
13
  var cardanoComposeTransaction_1 = require("./cardanoComposeTransaction");
16
- Object.defineProperty(exports, "cardanoComposeTransaction", { enumerable: true, get: function () { return __importDefault(cardanoComposeTransaction_1).default; } });
14
+ Object.defineProperty(exports, "cardanoComposeTransaction", { enumerable: true, get: function () { return tslib_1.__importDefault(cardanoComposeTransaction_1).default; } });
17
15
  //# sourceMappingURL=index.js.map
@@ -1,24 +1,24 @@
1
1
  import { PROTO } from '../../constants';
2
2
  import { Static } from '@trezor/schema-utils';
3
3
  export type Path = number[];
4
- export declare const Path: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
4
+ export declare const Path: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TNumber>;
5
5
  export type CollateralInputWithPath = {
6
6
  collateralInput: PROTO.CardanoTxCollateralInput;
7
7
  path?: Path;
8
8
  };
9
9
  export type InputWithPath = Static<typeof InputWithPath>;
10
- export declare const InputWithPath: import("@sinclair/typebox").TObject<{
11
- input: import("@sinclair/typebox").TObject<{
12
- prev_hash: import("@sinclair/typebox").TString;
13
- prev_index: import("@sinclair/typebox").TNumber;
10
+ export declare const InputWithPath: import("@trezor/schema-utils").TObject<{
11
+ input: import("@trezor/schema-utils").TObject<{
12
+ prev_hash: import("@sinclair/typebox/build/esm/index.mjs").TString;
13
+ prev_index: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
14
14
  }>;
15
- path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
15
+ path: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TNumber>>;
16
16
  }>;
17
17
  export type InputWithPathParam = Static<typeof InputWithPath>;
18
- export declare const InputWithPathParam: import("@sinclair/typebox").TObject<{
19
- path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
20
- prev_hash: import("@sinclair/typebox").TString;
21
- prev_index: import("@sinclair/typebox").TNumber;
18
+ export declare const InputWithPathParam: import("@trezor/schema-utils").TObject<{
19
+ prev_hash: import("@sinclair/typebox/build/esm/index.mjs").TString;
20
+ prev_index: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
21
+ path: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TUnion<[import("@sinclair/typebox/build/esm/index.mjs").TString, import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TNumber>]>>;
22
22
  }>;
23
23
  export declare const transformInput: (input: unknown) => InputWithPath;
24
24
  export declare const transformCollateralInput: (collateralInput: unknown) => CollateralInputWithPath;
@@ -6,33 +6,33 @@ export type OutputWithData = {
6
6
  inlineDatum?: string;
7
7
  referenceScript?: string;
8
8
  };
9
- export declare const OutputValidation: import("@sinclair/typebox").TObject<{
10
- address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
+ export declare const OutputValidation: import("@trezor/schema-utils").TObject<{
10
+ address: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
11
11
  amount: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
12
- tokenBundle: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
13
- policyId: import("@sinclair/typebox").TString;
14
- tokenAmounts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
- assetNameBytes: import("@sinclair/typebox").TString;
16
- amount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
17
- mintAmount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
12
+ tokenBundle: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@trezor/schema-utils").TObject<{
13
+ policyId: import("@sinclair/typebox/build/esm/index.mjs").TString;
14
+ tokenAmounts: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@trezor/schema-utils").TObject<{
15
+ assetNameBytes: import("@sinclair/typebox/build/esm/index.mjs").TString;
16
+ amount: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
17
+ mintAmount: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
18
18
  }>>;
19
19
  }>>>;
20
- datumHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
21
- format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
22
- inlineDatum: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
23
- referenceScript: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
24
- addressParameters: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
25
- addressType: import("@sinclair/typebox").TEnum<typeof PROTO.CardanoAddressType>;
26
- path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
27
- stakingPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>>;
28
- stakingKeyHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
29
- certificatePointer: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
30
- blockIndex: import("@sinclair/typebox").TNumber;
31
- txIndex: import("@sinclair/typebox").TNumber;
32
- certificateIndex: import("@sinclair/typebox").TNumber;
20
+ datumHash: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
21
+ format: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TNumber>;
22
+ inlineDatum: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
23
+ referenceScript: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
24
+ addressParameters: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils").TObject<{
25
+ addressType: import("@sinclair/typebox/build/esm/index.mjs").TEnum<typeof PROTO.CardanoAddressType>;
26
+ path: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TUnion<[import("@sinclair/typebox/build/esm/index.mjs").TString, import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TNumber>]>>;
27
+ stakingPath: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TUnion<[import("@sinclair/typebox/build/esm/index.mjs").TString, import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TNumber>]>>;
28
+ stakingKeyHash: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
29
+ certificatePointer: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils").TObject<{
30
+ blockIndex: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
31
+ txIndex: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
32
+ certificateIndex: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
33
33
  }>>;
34
- paymentScriptHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
35
- stakingScriptHash: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
34
+ paymentScriptHash: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
35
+ stakingScriptHash: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TString>;
36
36
  }>>;
37
37
  }>;
38
38
  export declare const transformOutput: (output: unknown) => OutputWithData;
@@ -1,12 +1,12 @@
1
1
  import { CardanoAssetGroup } from '../../types/api/cardano';
2
2
  import { Static } from '@trezor/schema-utils';
3
3
  export type AssetGroupWithTokens = Static<typeof AssetGroupWithTokens>;
4
- export declare const AssetGroupWithTokens: import("@sinclair/typebox").TObject<{
5
- policyId: import("@sinclair/typebox").TString;
6
- tokens: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
7
- asset_name_bytes: import("@sinclair/typebox").TString;
8
- amount: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
9
- mint_amount: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
4
+ export declare const AssetGroupWithTokens: import("@trezor/schema-utils").TObject<{
5
+ policyId: import("@sinclair/typebox/build/esm/index.mjs").TString;
6
+ tokens: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@trezor/schema-utils").TObject<{
7
+ asset_name_bytes: import("@sinclair/typebox/build/esm/index.mjs").TString;
8
+ amount: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
9
+ mint_amount: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils/lib/custom-types/uint").TUint>;
10
10
  }>>;
11
11
  }>;
12
12
  export declare const tokenBundleToProto: (tokenBundle: CardanoAssetGroup[]) => AssetGroupWithTokens[];
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import EventEmitter from 'events';
3
2
  import { PROTO } from '../../constants';
4
3
  import { Blockchain } from '../../backend/BlockchainLink';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFirmwareRange = exports.validateCoinPath = exports.validateParams = void 0;
3
+ exports.getFirmwareRange = exports.validateCoinPath = void 0;
4
+ exports.validateParams = validateParams;
4
5
  const utils_1 = require("@trezor/utils");
5
6
  const constants_1 = require("../../constants");
6
7
  const pathUtils_1 = require("../../utils/pathUtils");
@@ -60,7 +61,6 @@ function validateParams(params, schema) {
60
61
  });
61
62
  return params;
62
63
  }
63
- exports.validateParams = validateParams;
64
64
  const validateCoinPath = (path, coinInfo) => {
65
65
  if (coinInfo && coinInfo.slip44 !== (0, pathUtils_1.fromHardened)(path[1])) {
66
66
  throw invalidParameter('Parameters "path" and "coin" do not match.');
@@ -59,6 +59,9 @@ class ComposeTransaction extends AbstractMethod_1.AbstractMethod {
59
59
  push: typeof payload.push === 'boolean' ? payload.push : false,
60
60
  total,
61
61
  };
62
+ if (this.params.push) {
63
+ this.requiredPermissions.push('push_tx');
64
+ }
62
65
  }
63
66
  get info() {
64
67
  var _a;
@@ -1,11 +1,9 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.eosSignTransaction = exports.eosGetPublicKey = void 0;
4
+ const tslib_1 = require("tslib");
7
5
  var eosGetPublicKey_1 = require("./eosGetPublicKey");
8
- Object.defineProperty(exports, "eosGetPublicKey", { enumerable: true, get: function () { return __importDefault(eosGetPublicKey_1).default; } });
6
+ Object.defineProperty(exports, "eosGetPublicKey", { enumerable: true, get: function () { return tslib_1.__importDefault(eosGetPublicKey_1).default; } });
9
7
  var eosSignTransaction_1 = require("./eosSignTransaction");
10
- Object.defineProperty(exports, "eosSignTransaction", { enumerable: true, get: function () { return __importDefault(eosSignTransaction_1).default; } });
8
+ Object.defineProperty(exports, "eosSignTransaction", { enumerable: true, get: function () { return tslib_1.__importDefault(eosSignTransaction_1).default; } });
11
9
  //# sourceMappingURL=index.js.map
@@ -12,6 +12,10 @@ export declare const validate: (tx: EosSDKTransaction) => {
12
12
  delay_sec: number;
13
13
  };
14
14
  ack: {
15
+ unknown?: {
16
+ data_size: number;
17
+ data_chunk: string;
18
+ } | undefined;
15
19
  transfer?: {
16
20
  memo: string;
17
21
  quantity: {
@@ -21,10 +25,6 @@ export declare const validate: (tx: EosSDKTransaction) => {
21
25
  sender: string;
22
26
  receiver: string;
23
27
  } | undefined;
24
- unknown?: {
25
- data_size: number;
26
- data_chunk: string;
27
- } | undefined;
28
28
  refund?: {
29
29
  owner: string;
30
30
  } | undefined;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.signTx = exports.validate = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bs58 = tslib_1.__importStar(require("bs58"));
5
+ const bs58_1 = tslib_1.__importDefault(require("bs58"));
6
6
  const constants_1 = require("../../constants");
7
7
  const binaryToDecimal = (bignum, minDigits = 1) => {
8
8
  const result = Array(minDigits).fill('0'.charCodeAt(0));
@@ -99,7 +99,7 @@ const parseQuantity = (s) => {
99
99
  const parseAuth = (a) => {
100
100
  const keyToBuffer = (pk) => {
101
101
  const len = pk.indexOf('EOS') === 0 ? 3 : 7;
102
- const key = Buffer.from(bs58.decode(pk.substring(len)));
102
+ const key = Buffer.from(bs58_1.default.decode(pk.substring(len)));
103
103
  return {
104
104
  type: 0,
105
105
  key: key.subarray(0, key.length - 4).toString('hex'),