@ledgerhq/coin-tezos 6.10.0-nightly.20251209144712 → 6.10.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 (74) hide show
  1. package/.eslintrc.js +0 -14
  2. package/.turbo/turbo-build.log +1 -1
  3. package/CHANGELOG.md +47 -9
  4. package/lib/api/index.d.ts.map +1 -1
  5. package/lib/api/index.js +4 -4
  6. package/lib/api/index.js.map +1 -1
  7. package/lib/logic/craftTransaction.js +2 -2
  8. package/lib/logic/craftTransaction.js.map +1 -1
  9. package/lib/logic/estimateFees.d.ts.map +1 -1
  10. package/lib/logic/estimateFees.js +1 -1
  11. package/lib/logic/estimateFees.js.map +1 -1
  12. package/lib/logic/listOperations.d.ts.map +1 -1
  13. package/lib/logic/listOperations.js +1 -1
  14. package/lib/logic/listOperations.js.map +1 -1
  15. package/lib/logic/validateIntent.js +1 -1
  16. package/lib/logic/validateIntent.js.map +1 -1
  17. package/lib/network/bakers.d.ts.map +1 -1
  18. package/lib/network/bakers.js +1 -1
  19. package/lib/network/bakers.js.map +1 -1
  20. package/lib/test/bot-deviceActions.d.ts.map +1 -1
  21. package/lib/test/bot-deviceActions.js.map +1 -1
  22. package/lib/test/bot-specs.d.ts.map +1 -1
  23. package/lib/test/bot-specs.js.map +1 -1
  24. package/lib/transaction.d.ts +1 -1
  25. package/lib/transaction.d.ts.map +1 -1
  26. package/lib/transaction.js.map +1 -1
  27. package/lib/types/bridge.fixture.d.ts.map +1 -1
  28. package/lib/types/bridge.fixture.js.map +1 -1
  29. package/lib-es/api/index.d.ts.map +1 -1
  30. package/lib-es/api/index.js +4 -4
  31. package/lib-es/api/index.js.map +1 -1
  32. package/lib-es/logic/craftTransaction.js +2 -2
  33. package/lib-es/logic/craftTransaction.js.map +1 -1
  34. package/lib-es/logic/estimateFees.d.ts.map +1 -1
  35. package/lib-es/logic/estimateFees.js +1 -1
  36. package/lib-es/logic/estimateFees.js.map +1 -1
  37. package/lib-es/logic/listOperations.d.ts.map +1 -1
  38. package/lib-es/logic/listOperations.js +1 -1
  39. package/lib-es/logic/listOperations.js.map +1 -1
  40. package/lib-es/logic/validateIntent.js +1 -1
  41. package/lib-es/logic/validateIntent.js.map +1 -1
  42. package/lib-es/network/bakers.d.ts.map +1 -1
  43. package/lib-es/network/bakers.js +1 -1
  44. package/lib-es/network/bakers.js.map +1 -1
  45. package/lib-es/test/bot-deviceActions.d.ts.map +1 -1
  46. package/lib-es/test/bot-deviceActions.js.map +1 -1
  47. package/lib-es/test/bot-specs.d.ts.map +1 -1
  48. package/lib-es/test/bot-specs.js.map +1 -1
  49. package/lib-es/transaction.d.ts +1 -1
  50. package/lib-es/transaction.d.ts.map +1 -1
  51. package/lib-es/transaction.js.map +1 -1
  52. package/lib-es/types/bridge.fixture.d.ts.map +1 -1
  53. package/lib-es/types/bridge.fixture.js.map +1 -1
  54. package/package.json +10 -10
  55. package/src/api/index-mainnet.integ.test.ts +3 -2
  56. package/src/api/index.integ.test.ts +8 -11
  57. package/src/api/index.test.ts +1 -1
  58. package/src/api/index.ts +6 -6
  59. package/src/logic/craftTransaction.integ.test.ts +1 -1
  60. package/src/logic/craftTransaction.test.ts +3 -3
  61. package/src/logic/craftTransaction.ts +2 -2
  62. package/src/logic/estimateFees.integ.test.ts +1 -1
  63. package/src/logic/estimateFees.ts +1 -1
  64. package/src/logic/getBalance.test.ts +2 -2
  65. package/src/logic/listOperations.test.ts +1 -1
  66. package/src/logic/listOperations.ts +2 -2
  67. package/src/logic/validateIntent.test.ts +4 -4
  68. package/src/logic/validateIntent.ts +1 -1
  69. package/src/network/bakers.test.ts +1 -1
  70. package/src/network/bakers.ts +1 -1
  71. package/src/test/bot-deviceActions.ts +1 -1
  72. package/src/test/bot-specs.ts +1 -1
  73. package/src/transaction.ts +1 -1
  74. package/src/types/bridge.fixture.ts +3 -3
@@ -1,6 +1,7 @@
1
1
  import { COST_PER_BYTE, getRevealFee, ORIGINATION_SIZE, Estimate } from "@taquito/taquito";
2
2
  import { validatePublicKey, ValidationResult } from "@taquito/utils";
3
3
  import { log } from "@ledgerhq/logs";
4
+ import { getTezosToolkit } from "./tezosToolkit";
4
5
  import { TezosOperationMode } from "../types/model";
5
6
  import { UnsupportedTransactionMode } from "../types/errors";
6
7
  import {
@@ -11,7 +12,6 @@ import {
11
12
  OP_SIZE_XTZ_TRANSFER,
12
13
  normalizePublicKeyForAddress,
13
14
  } from "../utils";
14
- import { getTezosToolkit } from "./tezosToolkit";
15
15
 
16
16
  export type CoreAccountInfo = {
17
17
  address: string;
@@ -1,7 +1,7 @@
1
+ import { getBalance } from "./getBalance";
1
2
  import { setupServer } from "msw/node";
2
- import { HttpResponse, http } from "msw";
3
3
  import coinConfig, { TezosCoinConfig } from "../config";
4
- import { getBalance } from "./getBalance";
4
+ import { HttpResponse, http } from "msw";
5
5
 
6
6
  describe("getBalance", () => {
7
7
  const mockServer = setupServer();
@@ -1,5 +1,5 @@
1
- import type { APIDelegationType, APIRevealType, APITransactionType } from "../network/types";
2
1
  import { listOperations } from "./listOperations";
2
+ import type { APIDelegationType, APIRevealType, APITransactionType } from "../network/types";
3
3
 
4
4
  const mockNetworkGetTransactions = jest.fn();
5
5
  jest.mock("../network", () => ({
@@ -1,6 +1,5 @@
1
- import { log } from "@ledgerhq/logs";
2
- import { Operation } from "@ledgerhq/coin-framework/api/types";
3
1
  import { tzkt } from "../network";
2
+ import { log } from "@ledgerhq/logs";
4
3
  import {
5
4
  type APIDelegationType,
6
5
  type APIRevealType,
@@ -10,6 +9,7 @@ import {
10
9
  isAPIRevealType,
11
10
  isAPITransactionType,
12
11
  } from "../network/types";
12
+ import { Operation } from "@ledgerhq/coin-framework/api/types";
13
13
 
14
14
  /**
15
15
  * Returns list of "Transfer", "Delegate" and "Undelegate" Operations associated to an account.
@@ -1,3 +1,7 @@
1
+ import { validateIntent } from "./validateIntent";
2
+ import * as estimateFeesModule from "./estimateFees";
3
+ import tzktApi from "../network/tzkt";
4
+ import coinConfig from "../config";
1
5
  import {
2
6
  RecipientRequired,
3
7
  InvalidAddress,
@@ -5,10 +9,6 @@ import {
5
9
  AmountRequired,
6
10
  NotEnoughBalance,
7
11
  } from "@ledgerhq/errors";
8
- import tzktApi from "../network/tzkt";
9
- import coinConfig from "../config";
10
- import { validateIntent } from "./validateIntent";
11
- import * as estimateFeesModule from "./estimateFees";
12
12
 
13
13
  describe("validateIntent", () => {
14
14
  const senderAddress = "tz1TzrmTBSuiVHV2VfMnGRMYvTEPCP42oSM8";
@@ -10,9 +10,9 @@ import {
10
10
  } from "@ledgerhq/errors";
11
11
  import { validateAddress, ValidationResult } from "@taquito/utils";
12
12
  import api from "../network/tzkt";
13
+ import { estimateFees } from "./estimateFees";
13
14
  import { InvalidAddressBecauseAlreadyDelegated } from "../types/errors";
14
15
  import { mapIntentTypeToTezosMode } from "../utils";
15
- import { estimateFees } from "./estimateFees";
16
16
 
17
17
  /**
18
18
  * Validates basic recipient and amount for send transactions
@@ -1,7 +1,7 @@
1
1
  import network from "@ledgerhq/live-network/network";
2
+ import { asBaker, cache, type TezosApiBaker } from "./bakers";
2
3
  import coinConfig, { TezosCoinConfig } from "../config";
3
4
  import { mockConfig } from "../test/config";
4
- import { asBaker, cache, type TezosApiBaker } from "./bakers";
5
5
 
6
6
  jest.mock("@ledgerhq/live-network/network");
7
7
  const mockedNetwork = jest.mocked(network);
@@ -2,9 +2,9 @@ import { makeLRUCache } from "@ledgerhq/live-network/cache";
2
2
  import network from "@ledgerhq/live-network/network";
3
3
  import { log } from "@ledgerhq/logs";
4
4
  import type { AccountLike } from "@ledgerhq/types-live";
5
+ import { ledgerValidatorAddress } from "./bakers.whitelist-default";
5
6
  import { Baker, Delegation } from "../types";
6
7
  import coinConfig from "../config";
7
- import { ledgerValidatorAddress } from "./bakers.whitelist-default";
8
8
 
9
9
  export type TezosApiBaker = {
10
10
  address: string;
@@ -1,10 +1,10 @@
1
1
  import type { DeviceAction } from "@ledgerhq/coin-framework/bot/types";
2
+ import type { Transaction } from "../types";
2
3
  import {
3
4
  deviceActionFlow,
4
5
  formatDeviceAmount,
5
6
  SpeculosButton,
6
7
  } from "@ledgerhq/coin-framework/bot/specs";
7
- import type { Transaction } from "../types";
8
8
 
9
9
  export const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
10
10
  steps: [
@@ -5,11 +5,11 @@ import { parseCurrencyUnit } from "@ledgerhq/coin-framework/currencies/index";
5
5
  import { genericTestDestination, pickSiblings } from "@ledgerhq/coin-framework/bot/specs";
6
6
  import type { AppSpec } from "@ledgerhq/coin-framework/bot/types";
7
7
  import { DeviceModelId } from "@ledgerhq/devices";
8
- import { Account } from "@ledgerhq/types-live";
9
8
  import { isTezosAccount, type Transaction } from "../types";
10
9
  import { getAccountDelegationSync, isAccountDelegating } from "../network/bakers";
11
10
  import whitelist from "../network/bakers.whitelist-default";
12
11
  import { acceptTransaction } from "./bot-deviceActions";
12
+ import { Account } from "@ledgerhq/types-live";
13
13
 
14
14
  const maxAccount = 12;
15
15
 
@@ -1,4 +1,5 @@
1
1
  import { BigNumber } from "bignumber.js";
2
+ import type { Transaction, TransactionRaw } from "./types";
2
3
  import { formatTransactionStatus } from "@ledgerhq/coin-framework/formatters";
3
4
  import {
4
5
  fromTransactionCommonRaw,
@@ -9,7 +10,6 @@ import {
9
10
  import type { Account } from "@ledgerhq/types-live";
10
11
  import { getAccountCurrency } from "@ledgerhq/coin-framework/account/index";
11
12
  import { formatCurrencyUnit } from "@ledgerhq/coin-framework/currencies/index";
12
- import type { Transaction, TransactionRaw } from "./types";
13
13
 
14
14
  export const formatTransaction = (
15
15
  {
@@ -1,8 +1,5 @@
1
1
  import BigNumber from "bignumber.js";
2
2
  import { faker } from "@faker-js/faker";
3
- import { getAbandonSeedAddress } from "@ledgerhq/cryptoassets/abandonseed";
4
- import { listCryptoCurrencies } from "@ledgerhq/cryptoassets/currencies";
5
- import { emptyHistoryCache } from "@ledgerhq/coin-framework/account/index";
6
3
  import type {
7
4
  TezosAccount,
8
5
  TezosOperation,
@@ -10,6 +7,9 @@ import type {
10
7
  TezosResources,
11
8
  Transaction,
12
9
  } from "./bridge";
10
+ import { getAbandonSeedAddress } from "@ledgerhq/cryptoassets/abandonseed";
11
+ import { listCryptoCurrencies } from "@ledgerhq/cryptoassets/currencies";
12
+ import { emptyHistoryCache } from "@ledgerhq/coin-framework/account/index";
13
13
 
14
14
  const currency = listCryptoCurrencies(true).find(c => c.id === "tezos")!;
15
15