@ledgerhq/types-live
Advanced tools
Comparing version 6.47.0-nightly.3 to 6.47.0-nightly.4
# @ledgerhq/types-live | ||
## 6.47.0-nightly.4 | ||
### Minor Changes | ||
- [#6796](https://github.com/LedgerHQ/ledger-live/pull/6796) [`6552679`](https://github.com/LedgerHQ/ledger-live/commit/65526794bb4d1fbc7e286c0e1c0b6d021413fc8c) Thanks [@gre](https://github.com/gre)! - Drop technical Account#name and Account#starred fields and replace it with a new architecture: a wallet store that contains all user's data. | ||
## 6.47.0-nightly.3 | ||
@@ -4,0 +10,0 @@ |
import type { BigNumber } from "bignumber.js"; | ||
import type { CryptoCurrency, TokenCurrency, Unit } from "@ledgerhq/types-cryptoassets"; | ||
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; | ||
import type { OperationRaw, Operation } from "./operation"; | ||
@@ -25,3 +25,2 @@ import type { DerivationMode } from "./derivation"; | ||
pendingOperations: Operation[]; | ||
starred: boolean; | ||
balanceHistoryCache: BalanceHistoryCache; | ||
@@ -61,4 +60,2 @@ swapHistory: SwapOperation[]; | ||
freshAddressPath: string; | ||
name: string; | ||
starred: boolean; | ||
used: boolean; | ||
@@ -71,3 +68,2 @@ balance: BigNumber; | ||
feesCurrency?: CryptoCurrency | TokenCurrency; | ||
unit: Unit; | ||
operationsCount: number; | ||
@@ -122,3 +118,3 @@ operations: Operation[]; | ||
freshAddressPath: string; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -135,3 +131,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -154,2 +149,11 @@ subAccounts?: TokenAccountRaw[]; | ||
}; | ||
/** | ||
* This represent the user's data part of an account which contains all user's custom information that aren't part of on-chain data | ||
* The object is serializable. | ||
*/ | ||
export type AccountUserData = { | ||
id: string; | ||
name: string; | ||
starredIds: string[]; | ||
}; | ||
//# sourceMappingURL=account.d.ts.map |
@@ -176,3 +176,10 @@ import { BigNumber } from "bignumber.js"; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=bridge.d.ts.map |
import type { BigNumber } from "bignumber.js"; | ||
import type { CryptoCurrency, TokenCurrency, Unit } from "@ledgerhq/types-cryptoassets"; | ||
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; | ||
import type { OperationRaw, Operation } from "./operation"; | ||
@@ -25,3 +25,2 @@ import type { DerivationMode } from "./derivation"; | ||
pendingOperations: Operation[]; | ||
starred: boolean; | ||
balanceHistoryCache: BalanceHistoryCache; | ||
@@ -61,4 +60,2 @@ swapHistory: SwapOperation[]; | ||
freshAddressPath: string; | ||
name: string; | ||
starred: boolean; | ||
used: boolean; | ||
@@ -71,3 +68,2 @@ balance: BigNumber; | ||
feesCurrency?: CryptoCurrency | TokenCurrency; | ||
unit: Unit; | ||
operationsCount: number; | ||
@@ -122,3 +118,3 @@ operations: Operation[]; | ||
freshAddressPath: string; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -135,3 +131,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -154,2 +149,11 @@ subAccounts?: TokenAccountRaw[]; | ||
}; | ||
/** | ||
* This represent the user's data part of an account which contains all user's custom information that aren't part of on-chain data | ||
* The object is serializable. | ||
*/ | ||
export type AccountUserData = { | ||
id: string; | ||
name: string; | ||
starredIds: string[]; | ||
}; | ||
//# sourceMappingURL=account.d.ts.map |
@@ -176,3 +176,10 @@ import { BigNumber } from "bignumber.js"; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=bridge.d.ts.map |
{ | ||
"name": "@ledgerhq/types-live", | ||
"version": "6.47.0-nightly.3", | ||
"version": "6.47.0-nightly.4", | ||
"description": "Ledger Live main types.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import type { BigNumber } from "bignumber.js"; | ||
import type { CryptoCurrency, TokenCurrency, Unit } from "@ledgerhq/types-cryptoassets"; | ||
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; | ||
import type { OperationRaw, Operation } from "./operation"; | ||
@@ -38,3 +38,2 @@ import type { DerivationMode } from "./derivation"; | ||
pendingOperations: Operation[]; | ||
starred: boolean; | ||
// Cache of balance history that allows a performant portfolio calculation. | ||
@@ -95,6 +94,2 @@ // currently there are no "raw" version of it because no need to at this stage. | ||
freshAddressPath: string; | ||
// account name | ||
name: string; | ||
// starred | ||
starred: boolean; | ||
// says if the account essentially "exists". an account has been used in the past, but for some reason the blockchain finds it empty (no ops, no balance,..) | ||
@@ -116,4 +111,2 @@ used: boolean; | ||
feesCurrency?: CryptoCurrency | TokenCurrency; | ||
// user preferred unit to use. unit is coming from currency.units. You can assume currency.units.indexOf(unit) will work. (make sure to preserve reference) | ||
unit: Unit; | ||
// The total number of operations (operations[] can be partial) | ||
@@ -201,3 +194,3 @@ operationsCount: number; | ||
freshAddressPath: string; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -216,3 +209,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -237,1 +229,14 @@ subAccounts?: TokenAccountRaw[]; | ||
}; | ||
/** | ||
* This represent the user's data part of an account which contains all user's custom information that aren't part of on-chain data | ||
* The object is serializable. | ||
*/ | ||
export type AccountUserData = { | ||
// the Account#id | ||
id: string; | ||
// user's name for this account | ||
name: string; | ||
// user's starred account ids: it can be more than the account.id because token accounts can also be starred | ||
starredIds: string[]; | ||
}; |
@@ -261,1 +261,9 @@ // NB this new "bridge" is a re-take of live-desktop bridge ideas | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
736017
6029
3921