@ledgerhq/live-common 34.54.0-nightly.20251204135727 → 34.54.0-nightly.20251205023918

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 (163) hide show
  1. package/lib/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  2. package/lib/bridge/generic-alpaca/broadcast.js +3 -3
  3. package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
  4. package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  5. package/lib/bridge/generic-alpaca/currencyBridge.js +1 -3
  6. package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  7. package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  8. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +2 -1
  9. package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  10. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  11. package/lib/bridge/generic-alpaca/getAccountShape.js +16 -7
  12. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  13. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  14. package/lib/bridge/generic-alpaca/getTransactionStatus.js +16 -1
  15. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  16. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  17. package/lib/bridge/generic-alpaca/prepareTransaction.js +38 -4
  18. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  19. package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  20. package/lib/bridge/generic-alpaca/signOperation.js +18 -2
  21. package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
  22. package/lib/bridge/generic-alpaca/signer/Eth.d.ts +2 -0
  23. package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
  24. package/lib/bridge/generic-alpaca/signer/Eth.js +8 -1
  25. package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -1
  26. package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  27. package/lib/bridge/generic-alpaca/signer/index.js +7 -0
  28. package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
  29. package/lib/bridge/generic-alpaca/types.d.ts +4 -0
  30. package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
  31. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  32. package/lib/bridge/generic-alpaca/utils.js +11 -3
  33. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  34. package/lib/bridge/impl.d.ts.map +1 -1
  35. package/lib/bridge/impl.js +14 -3
  36. package/lib/bridge/impl.js.map +1 -1
  37. package/lib/families/canton/config.d.ts.map +1 -1
  38. package/lib/families/canton/config.js +4 -4
  39. package/lib/families/canton/config.js.map +1 -1
  40. package/lib/families/celo/setup.d.ts.map +1 -1
  41. package/lib/families/celo/setup.js +11 -0
  42. package/lib/families/celo/setup.js.map +1 -1
  43. package/lib/families/evm/bridge/mock.d.ts +1 -0
  44. package/lib/families/evm/bridge/mock.d.ts.map +1 -1
  45. package/lib/families/evm/bridge/mock.js +12 -0
  46. package/lib/families/evm/bridge/mock.js.map +1 -1
  47. package/lib/families/evm/setup.d.ts +1 -4
  48. package/lib/families/evm/setup.d.ts.map +1 -1
  49. package/lib/families/evm/setup.js +1 -8
  50. package/lib/families/evm/setup.js.map +1 -1
  51. package/lib/families/evm/walletApiAdapter.d.ts +7 -0
  52. package/lib/families/evm/walletApiAdapter.d.ts.map +1 -1
  53. package/lib/families/evm/walletApiAdapter.js +36 -2
  54. package/lib/families/evm/walletApiAdapter.js.map +1 -1
  55. package/lib/families/stacks/constants.d.ts +1 -1
  56. package/lib/families/stacks/constants.d.ts.map +1 -1
  57. package/lib/families/stacks/constants.js +1 -1
  58. package/lib/families/stacks/constants.js.map +1 -1
  59. package/lib/generated/bridge/js.d.ts +0 -1
  60. package/lib/generated/bridge/js.d.ts.map +1 -1
  61. package/lib/generated/bridge/js.js +30 -32
  62. package/lib/generated/bridge/js.js.map +1 -1
  63. package/lib/generated/bridge/mock.d.ts +1 -0
  64. package/lib/generated/bridge/mock.d.ts.map +1 -1
  65. package/lib/operation.d.ts.map +1 -1
  66. package/lib/operation.js +7 -2
  67. package/lib/operation.js.map +1 -1
  68. package/lib/wallet-api/constants.d.ts +1 -1
  69. package/lib-es/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
  70. package/lib-es/bridge/generic-alpaca/broadcast.js +3 -3
  71. package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
  72. package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
  73. package/lib-es/bridge/generic-alpaca/currencyBridge.js +1 -3
  74. package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
  75. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
  76. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +2 -1
  77. package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
  78. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  79. package/lib-es/bridge/generic-alpaca/getAccountShape.js +16 -7
  80. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  81. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  82. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +16 -1
  83. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  84. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  85. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +38 -4
  86. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  87. package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
  88. package/lib-es/bridge/generic-alpaca/signOperation.js +18 -2
  89. package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
  90. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +2 -0
  91. package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
  92. package/lib-es/bridge/generic-alpaca/signer/Eth.js +4 -0
  93. package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -1
  94. package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
  95. package/lib-es/bridge/generic-alpaca/signer/index.js +7 -0
  96. package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
  97. package/lib-es/bridge/generic-alpaca/types.d.ts +4 -0
  98. package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
  99. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  100. package/lib-es/bridge/generic-alpaca/utils.js +11 -3
  101. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  102. package/lib-es/bridge/impl.d.ts.map +1 -1
  103. package/lib-es/bridge/impl.js +14 -3
  104. package/lib-es/bridge/impl.js.map +1 -1
  105. package/lib-es/families/canton/config.d.ts.map +1 -1
  106. package/lib-es/families/canton/config.js +4 -4
  107. package/lib-es/families/canton/config.js.map +1 -1
  108. package/lib-es/families/celo/setup.d.ts.map +1 -1
  109. package/lib-es/families/celo/setup.js +11 -0
  110. package/lib-es/families/celo/setup.js.map +1 -1
  111. package/lib-es/families/evm/bridge/mock.d.ts +1 -0
  112. package/lib-es/families/evm/bridge/mock.d.ts.map +1 -1
  113. package/lib-es/families/evm/bridge/mock.js +12 -0
  114. package/lib-es/families/evm/bridge/mock.js.map +1 -1
  115. package/lib-es/families/evm/setup.d.ts +1 -4
  116. package/lib-es/families/evm/setup.d.ts.map +1 -1
  117. package/lib-es/families/evm/setup.js +2 -8
  118. package/lib-es/families/evm/setup.js.map +1 -1
  119. package/lib-es/families/evm/walletApiAdapter.d.ts +7 -0
  120. package/lib-es/families/evm/walletApiAdapter.d.ts.map +1 -1
  121. package/lib-es/families/evm/walletApiAdapter.js +30 -1
  122. package/lib-es/families/evm/walletApiAdapter.js.map +1 -1
  123. package/lib-es/families/stacks/constants.d.ts +1 -1
  124. package/lib-es/families/stacks/constants.d.ts.map +1 -1
  125. package/lib-es/families/stacks/constants.js +1 -1
  126. package/lib-es/families/stacks/constants.js.map +1 -1
  127. package/lib-es/generated/bridge/js.d.ts +0 -1
  128. package/lib-es/generated/bridge/js.d.ts.map +1 -1
  129. package/lib-es/generated/bridge/js.js +0 -2
  130. package/lib-es/generated/bridge/js.js.map +1 -1
  131. package/lib-es/generated/bridge/mock.d.ts +1 -0
  132. package/lib-es/generated/bridge/mock.d.ts.map +1 -1
  133. package/lib-es/operation.d.ts.map +1 -1
  134. package/lib-es/operation.js +7 -2
  135. package/lib-es/operation.js.map +1 -1
  136. package/lib-es/wallet-api/constants.d.ts +1 -1
  137. package/package.json +56 -56
  138. package/src/bridge/generic-alpaca/broadcast.ts +6 -3
  139. package/src/bridge/generic-alpaca/currencyBridge.ts +1 -3
  140. package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +2 -1
  141. package/src/bridge/generic-alpaca/getAccountShape.ts +24 -12
  142. package/src/bridge/generic-alpaca/getTransactionStatus.ts +16 -1
  143. package/src/bridge/generic-alpaca/prepareTransaction.ts +44 -10
  144. package/src/bridge/generic-alpaca/signOperation.ts +18 -2
  145. package/src/bridge/generic-alpaca/signer/Eth.ts +5 -1
  146. package/src/bridge/generic-alpaca/signer/index.ts +7 -0
  147. package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +2 -2
  148. package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +32 -0
  149. package/src/bridge/generic-alpaca/types.ts +4 -0
  150. package/src/bridge/generic-alpaca/utils.test.ts +1 -0
  151. package/src/bridge/generic-alpaca/utils.ts +14 -3
  152. package/src/bridge/impl.ts +16 -3
  153. package/src/families/canton/config.ts +5 -4
  154. package/src/families/celo/setup.ts +12 -0
  155. package/src/families/evm/bridge/mock.ts +14 -0
  156. package/src/families/evm/setup.ts +3 -22
  157. package/src/families/evm/walletApiAdapter.ts +33 -1
  158. package/src/families/stacks/__snapshots__/bridge.integration.test.ts.snap +1537 -18
  159. package/src/families/stacks/__tests__/sync.integration.test.ts +2 -2
  160. package/src/families/stacks/constants.ts +1 -1
  161. package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +9 -9
  162. package/src/generated/bridge/js.ts +0 -2
  163. package/src/operation.ts +10 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-common",
3
3
  "description": "Common ground for the Ledger Live apps",
4
- "version": "34.54.0-nightly.20251204135727",
4
+ "version": "34.54.0-nightly.20251205023918",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/LedgerHQ/ledger-live.git"
@@ -176,78 +176,78 @@
176
176
  "xstate": "^5.19.2",
177
177
  "yargs": "^17.0.0",
178
178
  "zod": "^3.22.4",
179
- "@ledgerhq/coin-aptos": "^3.6.1-nightly.20251204135727",
180
- "@ledgerhq/coin-bitcoin": "^0.26.0-nightly.20251204135727",
181
- "@ledgerhq/coin-canton": "^0.11.0-nightly.20251204135727",
182
- "@ledgerhq/coin-cardano": "^0.15.1-nightly.20251204135727",
183
- "@ledgerhq/coin-casper": "^2.4.1-nightly.20251204135727",
184
- "@ledgerhq/coin-algorand": "^0.14.0-nightly.20251204135727",
185
- "@ledgerhq/coin-celo": "^1.7.2-nightly.20251204135727",
186
- "@ledgerhq/coin-cosmos": "^0.21.0-nightly.20251204135727",
187
- "@ledgerhq/coin-evm": "^2.36.0-nightly.20251204135727",
188
- "@ledgerhq/coin-filecoin": "^1.15.0-nightly.20251204135727",
189
- "@ledgerhq/coin-framework": "^6.10.0-nightly.20251204135727",
190
- "@ledgerhq/coin-hedera": "^1.15.0-nightly.20251204135727",
191
- "@ledgerhq/coin-icon": "^0.15.1-nightly.20251204135727",
192
- "@ledgerhq/coin-mina": "^1.4.2-nightly.20251204135727",
193
- "@ledgerhq/coin-multiversx": "^0.8.1-nightly.20251204135727",
194
- "@ledgerhq/coin-internet_computer": "^1.11.1-nightly.20251204135727",
195
- "@ledgerhq/coin-kaspa": "^1.4.2-nightly.20251204135727",
196
- "@ledgerhq/coin-polkadot": "^6.14.0-nightly.20251204135727",
197
- "@ledgerhq/coin-stacks": "^0.12.1-nightly.20251204135727",
198
- "@ledgerhq/coin-stellar": "^6.8.0-nightly.20251204135727",
199
- "@ledgerhq/coin-solana": "^0.38.0-nightly.20251204135727",
200
- "@ledgerhq/coin-sui": "^0.18.1-nightly.20251204135727",
201
- "@ledgerhq/coin-near": "^0.16.1-nightly.20251204135727",
202
- "@ledgerhq/coin-tezos": "^6.10.0-nightly.20251204135727",
203
- "@ledgerhq/coin-ton": "^0.17.1-nightly.20251204135727",
204
- "@ledgerhq/coin-vechain": "^2.12.2-nightly.20251204135727",
205
- "@ledgerhq/coin-tron": "^5.7.1-nightly.20251204135727",
206
- "@ledgerhq/cryptoassets": "^13.34.0-nightly.20251204135727",
207
- "@ledgerhq/device-core": "^0.6.9-nightly.20251204135727",
179
+ "@ledgerhq/coin-algorand": "^0.14.0-nightly.20251205023918",
180
+ "@ledgerhq/coin-aptos": "^3.6.1-nightly.20251205023918",
181
+ "@ledgerhq/coin-canton": "^0.11.0-nightly.20251205023918",
182
+ "@ledgerhq/coin-cardano": "^0.15.1-nightly.20251205023918",
183
+ "@ledgerhq/coin-casper": "^2.4.1-nightly.20251205023918",
184
+ "@ledgerhq/coin-bitcoin": "^0.26.0-nightly.20251205023918",
185
+ "@ledgerhq/coin-celo": "^1.7.2-nightly.20251205023918",
186
+ "@ledgerhq/coin-cosmos": "^0.21.0-nightly.20251205023918",
187
+ "@ledgerhq/coin-evm": "^2.36.0-nightly.20251205023918",
188
+ "@ledgerhq/coin-filecoin": "^1.15.0-nightly.20251205023918",
189
+ "@ledgerhq/coin-framework": "^6.10.0-nightly.20251205023918",
190
+ "@ledgerhq/coin-hedera": "^1.15.0-nightly.20251205023918",
191
+ "@ledgerhq/coin-icon": "^0.15.1-nightly.20251205023918",
192
+ "@ledgerhq/coin-internet_computer": "^1.11.1-nightly.20251205023918",
193
+ "@ledgerhq/coin-kaspa": "^1.4.2-nightly.20251205023918",
194
+ "@ledgerhq/coin-mina": "^1.4.2-nightly.20251205023918",
195
+ "@ledgerhq/coin-multiversx": "^0.8.1-nightly.20251205023918",
196
+ "@ledgerhq/coin-near": "^0.16.1-nightly.20251205023918",
197
+ "@ledgerhq/coin-polkadot": "^6.14.0-nightly.20251205023918",
198
+ "@ledgerhq/coin-solana": "^0.38.0-nightly.20251205023918",
199
+ "@ledgerhq/coin-stacks": "^0.13.0-nightly.20251205023918",
200
+ "@ledgerhq/coin-stellar": "^6.8.0-nightly.20251205023918",
201
+ "@ledgerhq/coin-sui": "^0.18.1-nightly.20251205023918",
202
+ "@ledgerhq/coin-tezos": "^6.10.0-nightly.20251205023918",
203
+ "@ledgerhq/coin-ton": "^0.17.1-nightly.20251205023918",
204
+ "@ledgerhq/coin-tron": "^5.7.1-nightly.20251205023918",
205
+ "@ledgerhq/coin-xrp": "^7.9.0-nightly.20251205023918",
206
+ "@ledgerhq/cryptoassets": "^13.34.0-nightly.20251205023918",
207
+ "@ledgerhq/coin-vechain": "^2.12.2-nightly.20251205023918",
208
+ "@ledgerhq/device-core": "^0.6.9-nightly.20251205023918",
208
209
  "@ledgerhq/devices": "8.7.0",
209
210
  "@ledgerhq/errors": "^6.27.0",
210
211
  "@ledgerhq/hw-app-algorand": "^6.31.9",
211
- "@ledgerhq/hw-app-btc": "^10.12.1-nightly.20251204135727",
212
212
  "@ledgerhq/hw-app-aptos": "^6.34.9",
213
- "@ledgerhq/hw-app-celo": "^6.35.4-nightly.20251204135727",
214
- "@ledgerhq/coin-xrp": "^7.9.0-nightly.20251204135727",
213
+ "@ledgerhq/hw-app-celo": "^6.35.4-nightly.20251205023918",
214
+ "@ledgerhq/hw-app-btc": "^10.12.1-nightly.20251205023918",
215
215
  "@ledgerhq/hw-app-cosmos": "^6.32.9",
216
- "@ledgerhq/hw-app-eth": "^7.0.0-nightly.20251204135727",
217
- "@ledgerhq/hw-app-exchange": "^0.18.0-nightly.20251204135727",
216
+ "@ledgerhq/hw-app-eth": "^7.0.0-nightly.20251205023918",
218
217
  "@ledgerhq/hw-app-hedera": "^1.2.9",
219
- "@ledgerhq/hw-app-kaspa": "^1.3.2",
220
- "@ledgerhq/hw-app-near": "^6.31.9",
218
+ "@ledgerhq/hw-app-exchange": "^0.18.0-nightly.20251205023918",
221
219
  "@ledgerhq/hw-app-icon": "^1.3.9",
220
+ "@ledgerhq/hw-app-kaspa": "^1.3.2",
222
221
  "@ledgerhq/hw-app-multiversx": "^6.26.0",
222
+ "@ledgerhq/hw-app-near": "^6.31.9",
223
223
  "@ledgerhq/hw-app-polkadot": "^6.34.9",
224
224
  "@ledgerhq/hw-app-str": "^7.2.9",
225
225
  "@ledgerhq/hw-app-sui": "^1.4.0",
226
+ "@ledgerhq/hw-app-trx": "^6.31.9",
226
227
  "@ledgerhq/hw-app-tezos": "^6.31.9",
227
- "@ledgerhq/hw-app-vet": "^0.8.0-nightly.20251204135727",
228
+ "@ledgerhq/hw-app-vet": "^0.8.0-nightly.20251205023918",
228
229
  "@ledgerhq/hw-app-xrp": "^6.32.7",
229
- "@ledgerhq/ledger-cal-service": "^1.9.1-nightly.20251204135727",
230
230
  "@ledgerhq/hw-bolos": "^6.32.9",
231
- "@ledgerhq/hw-transport-mocker": "^6.29.13",
232
- "@ledgerhq/hw-app-trx": "^6.31.9",
233
231
  "@ledgerhq/hw-transport": "6.31.13",
232
+ "@ledgerhq/hw-transport-mocker": "^6.29.13",
233
+ "@ledgerhq/ledger-cal-service": "^1.9.1-nightly.20251205023918",
234
+ "@ledgerhq/ledger-trust-service": "^0.4.3-nightly.20251205023918",
234
235
  "@ledgerhq/live-config": "^3.2.0",
235
- "@ledgerhq/live-countervalues": "^0.10.1-nightly.20251204135727",
236
- "@ledgerhq/live-countervalues-react": "^0.7.3-nightly.20251204135727",
236
+ "@ledgerhq/live-countervalues-react": "^0.7.3-nightly.20251205023918",
237
237
  "@ledgerhq/live-dmk-shared": "^0.15.0",
238
- "@ledgerhq/live-env": "^2.22.0-nightly.20251204135727",
239
- "@ledgerhq/live-network": "^2.1.2-nightly.20251204135727",
240
- "@ledgerhq/live-promise": "^0.1.1",
241
- "@ledgerhq/ledger-trust-service": "^0.4.3-nightly.20251204135727",
238
+ "@ledgerhq/live-countervalues": "^0.10.1-nightly.20251205023918",
239
+ "@ledgerhq/live-env": "^2.22.0-nightly.20251205023918",
242
240
  "@ledgerhq/live-hooks": "0.2.0",
243
- "@ledgerhq/live-signer-solana": "^0.6.2-nightly.20251204135727",
244
- "@ledgerhq/live-signer-evm": "^0.10.2-nightly.20251204135727",
245
- "@ledgerhq/live-signer-canton": "^0.5.2-nightly.20251204135727",
246
- "@ledgerhq/live-wallet": "^0.16.1-nightly.20251204135727",
241
+ "@ledgerhq/live-promise": "^0.1.1",
242
+ "@ledgerhq/live-network": "^2.1.2-nightly.20251205023918",
243
+ "@ledgerhq/live-signer-evm": "^0.10.2-nightly.20251205023918",
244
+ "@ledgerhq/live-signer-canton": "^0.5.2-nightly.20251205023918",
245
+ "@ledgerhq/live-signer-solana": "^0.6.2-nightly.20251205023918",
246
+ "@ledgerhq/live-wallet": "^0.16.1-nightly.20251205023918",
247
247
  "@ledgerhq/logs": "^6.13.0",
248
- "@ledgerhq/speculos-transport": "^0.3.0-nightly.20251204135727",
249
- "@ledgerhq/wallet-api-acre-module": "^0.10.0-nightly.20251204135727",
250
- "@ledgerhq/wallet-api-exchange-module": "^0.19.0-nightly.20251204135727"
248
+ "@ledgerhq/wallet-api-acre-module": "^0.10.0-nightly.20251205023918",
249
+ "@ledgerhq/speculos-transport": "^0.3.0-nightly.20251205023918",
250
+ "@ledgerhq/wallet-api-exchange-module": "^0.19.0-nightly.20251205023918"
251
251
  },
252
252
  "devDependencies": {
253
253
  "@solana/web3.js": "1.95.4",
@@ -294,10 +294,10 @@
294
294
  "undici": "6.19.2",
295
295
  "uuid": "^8.3.2",
296
296
  "ws": "7",
297
+ "@ledgerhq/device-react": "^0.3.3-nightly.20251205023918",
297
298
  "@ledgerhq/types-cryptoassets": "^7.30.0",
298
299
  "@ledgerhq/types-devices": "^6.27.0",
299
- "@ledgerhq/types-live": "^6.90.0-nightly.20251204135727",
300
- "@ledgerhq/device-react": "^0.3.3-nightly.20251204135727"
300
+ "@ledgerhq/types-live": "^6.90.0-nightly.20251205023918"
301
301
  },
302
302
  "scripts": {
303
303
  "build": "zx ./scripts/build-ts.mjs",
@@ -1,11 +1,14 @@
1
1
  import { AccountBridge, TransactionCommon } from "@ledgerhq/types-live";
2
- import { patchOperationWithHash } from "../../operation";
2
+ import { patchOperationWithHash } from "@ledgerhq/coin-framework/operation";
3
3
  import { getAlpacaApi } from "./alpaca";
4
4
 
5
5
  export const genericBroadcast: (network, kind) => AccountBridge<TransactionCommon>["broadcast"] =
6
6
  (network, kind) =>
7
- async ({ signedOperation: { signature, operation }, account }) => {
8
- const hash = await getAlpacaApi(account.currency.id, kind).broadcast(signature);
7
+ async ({ signedOperation: { signature, operation }, account, broadcastConfig }) => {
8
+ const hash = await getAlpacaApi(account.currency.id, kind).broadcast(
9
+ signature,
10
+ broadcastConfig,
11
+ );
9
12
 
10
13
  return patchOperationWithHash(operation, hash);
11
14
  };
@@ -13,9 +13,7 @@ export function getAlpacaCurrencyBridge(
13
13
  const signer = customSigner ?? getSigner(network);
14
14
  return {
15
15
  preload: () => Promise.resolve({}),
16
- hydrate: () => {
17
- return;
18
- },
16
+ hydrate: () => undefined,
19
17
  scanAccounts: makeScanAccounts({
20
18
  getAccountShape: genericGetAccountShape(network, kind),
21
19
  getAddressFn: signer.getAddress.bind(signer),
@@ -30,11 +30,12 @@ export function genericEstimateMaxSpendable(
30
30
  )
31
31
  ).value;
32
32
  }
33
+ // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22229
33
34
  const { amount } = await alpacaApi.validateIntent(
34
35
  transactionToIntent(account, { ...draftTransaction }, alpacaApi.computeIntentType),
35
36
  { value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
36
37
  );
37
- if (["stellar", "tezos"].includes(network)) {
38
+ if (["stellar", "tezos", "evm"].includes(network)) {
38
39
  return amount > 0 ? new BigNumber(amount.toString()) : new BigNumber(0);
39
40
  }
40
41
  const bnFee = BigNumber(fees.toString());
@@ -17,6 +17,10 @@ function isNftCoreOp(operation: Operation): boolean {
17
17
  );
18
18
  }
19
19
 
20
+ function isInternalLiveOp(operation: OperationCommon): boolean {
21
+ return !!operation.extra?.internal;
22
+ }
23
+
20
24
  export function genericGetAccountShape(network: string, kind: string): GetAccountShape {
21
25
  return async (info, syncConfig) => {
22
26
  const { address, initialAccount, currency, derivationMode } = info;
@@ -58,7 +62,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
58
62
 
59
63
  // Calculate minHeight for pagination
60
64
  const minHeight = syncFromScratch ? 0 : (oldOps[0]?.blockHeight ?? 0) + 1;
61
- const paginationParams: Pagination = { minHeight, order: "asc" };
65
+ const paginationParams: Pagination = { minHeight, order: "desc" };
62
66
  if (lastPagingToken && !syncFromScratch) {
63
67
  paginationParams.lastPagingToken = lastPagingToken;
64
68
  }
@@ -74,6 +78,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
74
78
  operation?.extra?.assetOwner &&
75
79
  !["OPT_IN", "OPT_OUT"].includes(operation.type),
76
80
  );
81
+ const newInternalOperations = newOps.filter(isInternalLiveOp);
77
82
  const newSubAccounts = await buildSubAccounts({
78
83
  accountId,
79
84
  allTokenAssetsBalances,
@@ -85,22 +90,29 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
85
90
  ? newSubAccounts
86
91
  : mergeSubAccounts(initialAccount?.subAccounts ?? [], newSubAccounts);
87
92
 
88
- const newOpsWithSubs = newOps.map(op => {
89
- const subOperations = inferSubOperations(op.hash, newSubAccounts);
93
+ const newOpsWithSubs = newOps
94
+ .filter(operation => !isInternalLiveOp(operation))
95
+ .map(op => {
96
+ const subOperations = inferSubOperations(op.hash, newSubAccounts);
97
+ const internalOperations = newInternalOperations.filter(it => it.hash === op.hash);
90
98
 
91
- return cleanedOperation({
92
- ...op,
93
- subOperations,
99
+ return cleanedOperation({
100
+ ...op,
101
+ subOperations,
102
+ internalOperations,
103
+ });
94
104
  });
95
- });
105
+ // Try to refresh known pending operations (if not already updated)
106
+ // Useful for integrations without explorers
107
+ const operationsToRefresh = initialAccount?.pendingOperations.filter(
108
+ pendingOp => !newOpsWithSubs.some(newOp => pendingOp.hash === newOp.hash),
109
+ );
96
110
  const confirmedOperations =
97
- alpacaApi.refreshOperations && initialAccount?.pendingOperations.length
98
- ? await alpacaApi.refreshOperations(initialAccount.pendingOperations)
111
+ alpacaApi.refreshOperations && operationsToRefresh?.length
112
+ ? await alpacaApi.refreshOperations(operationsToRefresh)
99
113
  : [];
100
114
  const newOperations = [...confirmedOperations, ...newOpsWithSubs];
101
- const operations = syncFromScratch
102
- ? newOperations
103
- : (mergeOps(oldOps, newOperations) as OperationCommon[]);
115
+ const operations = mergeOps(syncFromScratch ? [] : oldOps, newOperations) as OperationCommon[];
104
116
 
105
117
  const res: Partial<Account> = {
106
118
  id: accountId,
@@ -26,6 +26,7 @@ export function genericGetTransactionStatus(
26
26
  feesStrategy: transaction.feesStrategy,
27
27
  data: transaction.data,
28
28
  type: transaction.type,
29
+ sponsored: transaction.sponsored,
29
30
  };
30
31
 
31
32
  if (alpacaApi.getChainSpecificRules) {
@@ -37,10 +38,24 @@ export function genericGetTransactionStatus(
37
38
  }
38
39
  }
39
40
 
41
+ const fees = BigInt(transaction.fees?.toString() || "0");
42
+ const feesParameters = {
43
+ ...(transaction.gasLimit ? { gasLimit: BigInt(transaction.gasLimit.toFixed()) } : {}),
44
+ ...(transaction.gasPrice ? { gasPrice: BigInt(transaction.gasPrice.toFixed()) } : {}),
45
+ ...(transaction.maxFeePerGas
46
+ ? { maxFeePerGas: BigInt(transaction.maxFeePerGas.toFixed()) }
47
+ : {}),
48
+ ...(transaction.maxPriorityFeePerGas
49
+ ? { maxPriorityFeePerGas: BigInt(transaction.maxPriorityFeePerGas.toFixed()) }
50
+ : {}),
51
+ ...(transaction.additionalFees
52
+ ? { additionalFees: BigInt(transaction.additionalFees.toFixed()) }
53
+ : {}),
54
+ };
40
55
  const { errors, warnings, estimatedFees, amount, totalSpent, totalFees } =
41
56
  await alpacaApi.validateIntent(
42
57
  transactionToIntent(account, draftTransaction, alpacaApi.computeIntentType),
43
- { value: transaction.fees ? BigInt(transaction.fees.toString()) : 0n },
58
+ { value: fees, parameters: feesParameters },
44
59
  );
45
60
 
46
61
  return {
@@ -31,6 +31,11 @@ function propagateField(estimation: FeeEstimation, field: string, dest: GenericT
31
31
  dest[field] = Number(value.toString());
32
32
  return;
33
33
  case "storageLimit":
34
+ case "gasLimit":
35
+ case "gasPrice":
36
+ case "maxFeePerGas":
37
+ case "maxPriorityFeePerGas":
38
+ case "additionalFees":
34
39
  dest[field] = new BigNumber(value.toString());
35
40
  return;
36
41
  default:
@@ -51,17 +56,37 @@ export function genericPrepareTransaction(
51
56
  ? await getAssetInfos(transaction, account.freshAddress, getAssetFromToken)
52
57
  : assetInfosFallback(transaction);
53
58
  const customParametersFees = transaction.customFees?.parameters?.fees;
59
+
60
+ /**
61
+ * Ticking `useAllAmount` constantly resets the amount to 0. This is problematic
62
+ * because some Blockchain need the actual transaction amount to compute the fees
63
+ * (Example with EVM and ERC20 transactions)
64
+ * In case of `useAllAmount` and token transaction, we read the token account spendable
65
+ * balance instead.
66
+ */
67
+ let amount = transaction.amount;
68
+ if (transaction.useAllAmount && transaction.subAccountId) {
69
+ const subAccount = account.subAccounts?.find(acc => acc.id === transaction.subAccountId);
70
+ amount = subAccount?.spendableBalance ?? amount;
71
+ }
72
+
73
+ // Pass any parameters that help estimating fees
74
+ const intent = transactionToIntent(
75
+ account,
76
+ {
77
+ ...transaction,
78
+ amount,
79
+ },
80
+ computeIntentType,
81
+ );
54
82
  const estimation: FeeEstimation = customParametersFees
55
83
  ? { value: BigInt(customParametersFees.toFixed()) }
56
- : await estimateFees(
57
- transactionToIntent(
58
- account,
59
- {
60
- ...transaction,
61
- },
62
- computeIntentType,
63
- ),
64
- );
84
+ : await estimateFees(intent, {
85
+ gasPrice: transaction.gasPrice,
86
+ maxFeePerGas: transaction.maxFeePerGas,
87
+ maxPriorityFeePerGas: transaction.maxPriorityFeePerGas,
88
+ gasOptions: transaction.gasOptions,
89
+ });
65
90
  const fees = new BigNumber(estimation.value.toString());
66
91
 
67
92
  if (!bnEq(transaction.fees, fees)) {
@@ -78,7 +103,15 @@ export function genericPrepareTransaction(
78
103
  };
79
104
 
80
105
  // Propagate needed fields
81
- const fieldsToPropagate = ["type", "storageLimit"];
106
+ const fieldsToPropagate = [
107
+ "type",
108
+ "storageLimit",
109
+ "gasLimit",
110
+ "gasPrice",
111
+ "maxFeePerGas",
112
+ "maxPriorityFeePerGas",
113
+ "additionalFees",
114
+ ];
82
115
 
83
116
  for (const field of fieldsToPropagate) {
84
117
  propagateField(estimation, field, next);
@@ -86,6 +119,7 @@ export function genericPrepareTransaction(
86
119
 
87
120
  // align with stellar/xrp: when send max (or staking intents), reflect validated amount in UI
88
121
  if (transaction.useAllAmount || ["stake", "unstake"].includes(transaction.mode ?? "")) {
122
+ // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22228
89
123
  const { amount } = await validateIntent(
90
124
  transactionToIntent(
91
125
  account,
@@ -86,6 +86,19 @@ export const genericSignOperation =
86
86
  const alpacaApi = getAlpacaApi(account.currency.id, kind);
87
87
  if (!transaction.fees) throw new FeeNotLoaded();
88
88
  const fees = BigInt(transaction.fees?.toString() || "0");
89
+ const feesParameters = {
90
+ ...(transaction.gasLimit ? { gasLimit: BigInt(transaction.gasLimit.toFixed()) } : {}),
91
+ ...(transaction.gasPrice ? { gasPrice: BigInt(transaction.gasPrice.toFixed()) } : {}),
92
+ ...(transaction.maxFeePerGas
93
+ ? { maxFeePerGas: BigInt(transaction.maxFeePerGas.toFixed()) }
94
+ : {}),
95
+ ...(transaction.maxPriorityFeePerGas
96
+ ? { maxPriorityFeePerGas: BigInt(transaction.maxPriorityFeePerGas.toFixed()) }
97
+ : {}),
98
+ ...(transaction.additionalFees
99
+ ? { additionalFees: BigInt(transaction.additionalFees.toFixed()) }
100
+ : {}),
101
+ };
89
102
  if (transaction.useAllAmount) {
90
103
  const draftTransaction = {
91
104
  mode: transaction.mode,
@@ -98,10 +111,12 @@ export const genericSignOperation =
98
111
  family: transaction.family,
99
112
  feesStrategy: transaction.feesStrategy,
100
113
  data: transaction.data,
114
+ type: transaction.type,
101
115
  };
116
+ // TODO Remove the call to `validateIntent` https://ledgerhq.atlassian.net/browse/LIVE-22227
102
117
  const { amount } = await alpacaApi.validateIntent(
103
118
  transactionToIntent(account, draftTransaction, alpacaApi.computeIntentType),
104
- { value: fees },
119
+ { value: fees, parameters: feesParameters },
105
120
  );
106
121
  transaction.amount = new BigNumber(amount.toString());
107
122
  }
@@ -119,7 +134,7 @@ export const genericSignOperation =
119
134
  // Enrich with memo and asset information
120
135
  transactionIntent = enrichTransactionIntent(transactionIntent, transaction, publicKey);
121
136
 
122
- if (typeof transactionIntent.sequence !== "bigint") {
137
+ if (typeof transactionIntent.sequence !== "bigint" || transactionIntent.sequence < 0n) {
123
138
  // TODO: should compute it and pass it down to craftTransaction (duplicate call right now)
124
139
  const sequenceNumber = await alpacaApi.getSequence(transactionIntent.sender);
125
140
  transactionIntent.sequence = sequenceNumber;
@@ -128,6 +143,7 @@ export const genericSignOperation =
128
143
  /* Craft unsigned blob via Alpaca */
129
144
  const { transaction: unsigned } = await alpacaApi.craftTransaction(transactionIntent, {
130
145
  value: fees,
146
+ parameters: feesParameters,
131
147
  });
132
148
 
133
149
  /* Notify UI that the device is now showing the tx */
@@ -1,6 +1,6 @@
1
1
  import { filter, firstValueFrom } from "rxjs";
2
2
  import { EvmAddress, EvmSignature, EvmSigner } from "@ledgerhq/coin-evm/types/signer";
3
- import { CreateSigner } from "../../setup";
3
+ import { CreateSigner, executeWithSigner } from "../../setup";
4
4
  import { DeviceManagementKit } from "@ledgerhq/device-management-kit";
5
5
  import { DmkSignerEth, LegacySignerEth } from "@ledgerhq/live-signer-evm";
6
6
  import Transport from "@ledgerhq/hw-transport";
@@ -8,6 +8,7 @@ import { getEnv } from "@ledgerhq/live-env";
8
8
  import { ResolutionConfig, LoadConfig } from "@ledgerhq/hw-app-eth/lib/services/types";
9
9
  import { Signature } from "ethers";
10
10
  import type { DomainServiceResolution } from "@ledgerhq/types-live";
11
+ import resolver from "@ledgerhq/coin-evm/hw-getAddress";
11
12
 
12
13
  export type Signer = {
13
14
  getAddress: (path: string) => Promise<EvmAddress>;
@@ -70,3 +71,6 @@ export const createSigner: CreateSigner<Signer> = (transport: Transport) => {
70
71
  },
71
72
  };
72
73
  };
74
+
75
+ export const context = executeWithSigner(createSigner);
76
+ export const getAddress = resolver(context);
@@ -10,6 +10,7 @@ import { AlpacaSigner } from "./types";
10
10
  import { DerivationType, LedgerSigner as TaquitoLedgerSigner } from "@taquito/ledger-signer";
11
11
  import tezosGetAddress from "@ledgerhq/coin-tezos/signer/getAddress";
12
12
  import Tezos from "@ledgerhq/hw-app-tezos";
13
+ import { context as evmContext, getAddress as evmGetAddress } from "./Eth";
13
14
 
14
15
  const createSignerXrp: CreateSigner<Xrp> = (transport: Transport) => {
15
16
  return new Xrp(transport);
@@ -97,6 +98,12 @@ export function getSigner(network: string): AlpacaSigner {
97
98
  context: signerContextTezos,
98
99
  };
99
100
  }
101
+ case "evm": {
102
+ return {
103
+ getAddress: evmGetAddress,
104
+ context: evmContext,
105
+ };
106
+ }
100
107
  }
101
108
  throw new Error(`signer for ${network} not implemented`);
102
109
  }
@@ -71,7 +71,7 @@ describe("genericGetAccountShape", () => {
71
71
  "sync-hash",
72
72
  {
73
73
  minHeight: 11,
74
- order: "asc",
74
+ order: "desc",
75
75
  lastPagingToken: "pt1",
76
76
  },
77
77
  [
@@ -100,7 +100,7 @@ describe("genericGetAccountShape", () => {
100
100
  "outdated-sync-hash",
101
101
  {
102
102
  minHeight: 0,
103
- order: "asc",
103
+ order: "desc",
104
104
  },
105
105
  [
106
106
  {
@@ -2,6 +2,7 @@ import { genericPrepareTransaction } from "../prepareTransaction";
2
2
  import { getAlpacaApi } from "../alpaca";
3
3
  import { transactionToIntent } from "../utils";
4
4
  import BigNumber from "bignumber.js";
5
+ import { GenericTransaction } from "../types";
5
6
 
6
7
  jest.mock("../alpaca", () => ({
7
8
  getAlpacaApi: jest.fn(),
@@ -95,6 +96,11 @@ describe("genericPrepareTransaction", () => {
95
96
  it.each([
96
97
  ["type", 2, 2],
97
98
  ["storageLimit", 300n, new BigNumber(300)],
99
+ ["gasLimit", 300n, new BigNumber(300)],
100
+ ["gasPrice", 300n, new BigNumber(300)],
101
+ ["maxFeePerGas", 300n, new BigNumber(300)],
102
+ ["maxPriorityFeePerGas", 300n, new BigNumber(300)],
103
+ ["additionalFees", 300n, new BigNumber(300)],
98
104
  ])(
99
105
  "propagates %s from estimation parameters",
100
106
  async (parameterName, parameterValue, expectedValue) => {
@@ -122,4 +128,30 @@ describe("genericPrepareTransaction", () => {
122
128
  );
123
129
  },
124
130
  );
131
+
132
+ it("estimates using the token account spendable balance when sending all amount", async () => {
133
+ const estimateFees = jest.fn().mockResolvedValue({ value: new BigNumber(50) });
134
+ (transactionToIntent as jest.Mock).mockImplementation((_, transaction) => ({
135
+ amount: BigInt(transaction.amount.toFixed()),
136
+ }));
137
+ (getAlpacaApi as jest.Mock).mockReturnValue({
138
+ estimateFees,
139
+ validateIntent: intent => Promise.resolve({ amount: intent.amount }),
140
+ });
141
+ const prepareTransaction = genericPrepareTransaction(network, kind);
142
+
143
+ await prepareTransaction(
144
+ {
145
+ ...account,
146
+ subAccounts: [{ id: "test-sub-account", spendableBalance: new BigNumber(100) }],
147
+ },
148
+ {
149
+ subAccountId: "test-sub-account",
150
+ useAllAmount: true,
151
+ amount: new BigNumber(0),
152
+ } as GenericTransaction,
153
+ );
154
+
155
+ expect(estimateFees).toHaveBeenCalledWith(expect.objectContaining({ amount: 100n }), {});
156
+ });
125
157
  });
@@ -70,7 +70,9 @@ export type GenericTransaction = TransactionCommon & {
70
70
  gasPrice?: BigNumber | null;
71
71
  maxFeePerGas?: BigNumber | null;
72
72
  maxPriorityFeePerGas?: BigNumber | null;
73
+ additionalFees?: BigNumber | null;
73
74
  gasOptions?: GasOptions;
75
+ sponsored?: boolean;
74
76
  };
75
77
 
76
78
  export type GenericTransactionRaw = TransactionCommonRaw & {
@@ -104,7 +106,9 @@ export type GenericTransactionRaw = TransactionCommonRaw & {
104
106
  gasPrice?: string | null;
105
107
  maxFeePerGas?: string | null;
106
108
  maxPriorityFeePerGas?: string | null;
109
+ additionalFees?: string | null;
107
110
  gasOptions?: GasOptionsRaw;
111
+ sponsored?: boolean;
108
112
  };
109
113
 
110
114
  export interface OperationCommon extends Operation {
@@ -201,6 +201,7 @@ describe("Alpaca utils", () => {
201
201
  type: expected.subType,
202
202
  senders: ["account-address"],
203
203
  recipients: ["recipient-address"],
204
+ fee: new BigNumber(12),
204
205
  value: new BigNumber(50),
205
206
  blockHash: null,
206
207
  blockHeight: null,
@@ -72,6 +72,7 @@ export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOpe
72
72
  parentRecipients?: string[];
73
73
  ledgerOpType?: string | undefined;
74
74
  memo?: string | undefined;
75
+ internal?: boolean;
75
76
  } = {};
76
77
 
77
78
  if (op.details?.ledgerOpType !== undefined) {
@@ -106,6 +107,11 @@ export function adaptCoreOperationToLiveOperation(accountId: string, op: CoreOpe
106
107
  if (op.details?.memo) {
107
108
  extra.memo = op.details.memo as string;
108
109
  }
110
+
111
+ if (op.details?.internal === true) {
112
+ extra.internal = op.details?.internal;
113
+ }
114
+
109
115
  const bnFees = new BigNumber(op.tx.fees.toString());
110
116
  const hasFailed = op.tx.failed;
111
117
 
@@ -214,6 +220,7 @@ export function transactionToIntent(
214
220
  transaction.nonce !== null && transaction.nonce !== undefined
215
221
  ? BigInt(transaction.nonce.toString())
216
222
  : undefined,
223
+ sponsored: transaction.sponsored,
217
224
  };
218
225
  if (transaction.assetReference && transaction.assetOwner) {
219
226
  const { subAccountId } = transaction;
@@ -265,8 +272,11 @@ function toGenericTransactionRaw(transaction: GenericTransaction): GenericTransa
265
272
  family: transaction.family,
266
273
  };
267
274
 
268
- if ("useAllAmount" in transaction) {
269
- raw.useAllAmount = transaction.useAllAmount;
275
+ const booleanFieldsToPropagate = ["useAllAmount", "sponsored"] as const;
276
+ for (const field of booleanFieldsToPropagate) {
277
+ if (field in transaction) {
278
+ raw[field] = transaction[field];
279
+ }
270
280
  }
271
281
 
272
282
  const stringFieldsToPropagate = [
@@ -296,6 +306,7 @@ function toGenericTransactionRaw(transaction: GenericTransaction): GenericTransa
296
306
  "gasPrice",
297
307
  "maxFeePerGas",
298
308
  "maxPriorityFeePerGas",
309
+ "additionalFees",
299
310
  ] as const;
300
311
  for (const field of bigNumberFieldsToPropagate) {
301
312
  if (field in transaction) {
@@ -407,7 +418,7 @@ export const buildOptimisticOperation = (
407
418
  hash: "",
408
419
  type,
409
420
  value: transaction.useAllAmount ? tokenAccount.balance : transaction.amount,
410
- fee: new BigNumber(0),
421
+ fee: new BigNumber(fees.toString()),
411
422
  blockHash: null,
412
423
  blockHeight: null,
413
424
  senders: [account.freshAddress],