@ledgerhq/types-live
Advanced tools
Comparing version 6.47.0 to 6.48.0-next.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,9 +25,4 @@ import type { DerivationMode } from "./derivation"; | ||
pendingOperations: Operation[]; | ||
starred: boolean; | ||
balanceHistoryCache: BalanceHistoryCache; | ||
swapHistory: SwapOperation[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -61,5 +56,2 @@ /** */ | ||
freshAddressPath: string; | ||
freshAddresses: Address[]; | ||
name: string; | ||
starred: boolean; | ||
used: boolean; | ||
@@ -71,4 +63,3 @@ balance: BigNumber; | ||
currency: CryptoCurrency; | ||
feesCurrency?: CryptoCurrency | TokenCurrency; | ||
unit: Unit; | ||
feesCurrency?: CryptoCurrency | TokenCurrency | undefined; | ||
operationsCount: number; | ||
@@ -81,3 +72,3 @@ operations: Operation[]; | ||
swapHistory: SwapOperation[]; | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
nfts?: ProtoNFT[]; | ||
@@ -90,3 +81,3 @@ }; | ||
/** One of the Account type */ | ||
export type AccountLike = Account | TokenAccount; | ||
export type AccountLike<A extends Account = Account> = A | TokenAccount; | ||
/** | ||
@@ -111,6 +102,2 @@ * An array of AccountLikes | ||
swapHistory?: SwapOperationRaw[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -126,4 +113,3 @@ /** */ | ||
freshAddressPath: string; | ||
freshAddresses: Address[]; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -140,3 +126,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -146,3 +131,3 @@ subAccounts?: TokenAccountRaw[]; | ||
swapHistory?: SwapOperationRaw[]; | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
nfts?: ProtoNFTRaw[]; | ||
@@ -160,2 +145,11 @@ }; | ||
}; | ||
/** | ||
* 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 |
@@ -34,4 +34,4 @@ import { BigNumber } from "bignumber.js"; | ||
*/ | ||
export type BroadcastArg = { | ||
account: Account; | ||
export type BroadcastArg<A extends Account> = { | ||
account: A; | ||
signedOperation: SignedOperation; | ||
@@ -42,4 +42,4 @@ }; | ||
*/ | ||
export type SignOperationArg0<T> = { | ||
account: Account; | ||
export type SignOperationArg0<T extends TransactionCommon, A extends Account> = { | ||
account: A; | ||
transaction: T; | ||
@@ -51,7 +51,7 @@ deviceId: DeviceId; | ||
*/ | ||
export type SignOperationFnSignature<T> = (arg0: SignOperationArg0<T>) => Observable<SignOperationEvent>; | ||
export type BroadcastFnSignature = (arg0: BroadcastArg) => Promise<Operation>; | ||
export type Bridge<T extends TransactionCommon> = { | ||
export type SignOperationFnSignature<T extends TransactionCommon, A extends Account> = (arg0: SignOperationArg0<T, A>) => Observable<SignOperationEvent>; | ||
export type BroadcastFnSignature<A extends Account = Account> = (arg0: BroadcastArg<A>) => Promise<Operation>; | ||
export type Bridge<T extends TransactionCommon, A extends Account = Account, U extends TransactionStatusCommon = TransactionStatusCommon, R extends AccountRaw = AccountRaw> = { | ||
currencyBridge: CurrencyBridge; | ||
accountBridge: AccountBridge<T>; | ||
accountBridge: AccountBridge<T, A, U, R>; | ||
}; | ||
@@ -90,5 +90,5 @@ export type ScanInfo = { | ||
*/ | ||
export interface AccountBridge<T extends TransactionCommon> { | ||
sync(initialAccount: Account, syncConfig: SyncConfig): Observable<(arg0: Account) => Account>; | ||
receive(account: Account, arg1: { | ||
export interface AccountBridge<T extends TransactionCommon, A extends Account = Account, U extends TransactionStatusCommon = TransactionStatusCommon, R extends AccountRaw = AccountRaw> { | ||
sync(initialAccount: A, syncConfig: SyncConfig): Observable<(arg0: A) => A>; | ||
receive(account: A, arg1: { | ||
verify?: boolean; | ||
@@ -102,9 +102,9 @@ deviceId: string; | ||
}>; | ||
createTransaction(account: AccountLike): T; | ||
createTransaction(account: AccountLike<A>): T; | ||
updateTransaction(t: T, patch: Partial<T>): T; | ||
prepareTransaction(account: Account, transaction: T): Promise<T>; | ||
getTransactionStatus(account: Account, transaction: T): Promise<TransactionStatusCommon>; | ||
prepareTransaction(account: A, transaction: T): Promise<T>; | ||
getTransactionStatus(account: A, transaction: T): Promise<U>; | ||
estimateMaxSpendable(arg0: { | ||
account: AccountLike; | ||
parentAccount?: Account | null | undefined; | ||
account: AccountLike<A>; | ||
parentAccount?: A | null | undefined; | ||
transaction?: T | null | undefined; | ||
@@ -119,3 +119,3 @@ }): Promise<BigNumber>; | ||
*/ | ||
assignToAccountRaw?: (account: Account, accountRaw: AccountRaw) => void; | ||
assignToAccountRaw?: (account: A, accountRaw: R) => void; | ||
/** | ||
@@ -128,3 +128,3 @@ * This function mutates the 'account' object in-place to add any extra fields that the coin may need to set. | ||
*/ | ||
assignFromAccountRaw?: (accountRaw: AccountRaw, account: Account) => void; | ||
assignFromAccountRaw?: (accountRaw: R, account: A) => void; | ||
/** | ||
@@ -136,5 +136,5 @@ * This function mutates the 'account' object to extend it with any extra fields of the coin. | ||
*/ | ||
initAccount?: (account: Account) => void; | ||
signOperation: SignOperationFnSignature<T>; | ||
broadcast: BroadcastFnSignature; | ||
initAccount?: (account: A) => void; | ||
signOperation: SignOperationFnSignature<T, A>; | ||
broadcast: BroadcastFnSignature<A>; | ||
fromOperationExtraRaw?: (extraRaw: OperationExtraRaw) => OperationExtra; | ||
@@ -184,3 +184,10 @@ toOperationExtraRaw?: (extra: OperationExtra) => OperationExtraRaw; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=bridge.d.ts.map |
@@ -103,3 +103,7 @@ import { ABTestingVariants } from "./ABTesting"; | ||
currencyLinea: DefaultFeature; | ||
currencyLineaTesnet: DefaultFeature; | ||
currencyLineaSepolia: DefaultFeature; | ||
currencyBlast: DefaultFeature; | ||
currencyBlastSepolia: DefaultFeature; | ||
currencyScroll: DefaultFeature; | ||
currencyScrollSepolia: DefaultFeature; | ||
}; | ||
@@ -121,2 +125,3 @@ /** | ||
buySellUi: Feature_BuySellUiManifest; | ||
buySellShortcut: DefaultFeature; | ||
multibuyNavigation: Feature_MultibuyNavigation; | ||
@@ -131,3 +136,2 @@ referralProgramDesktopSidebar: Feature_ReferralProgramDesktopSidebar; | ||
storyly: Feature_Storyly; | ||
staxWelcomeScreen: Feature_StaxWelcomeScreen; | ||
postOnboardingAssetsTransfer: Feature_PostOnboardingAssetsTransfer; | ||
@@ -155,2 +159,4 @@ firebaseEnvironmentReadOnly: Feature_FirebaseEnvironmentReadOnly; | ||
ptxSwapMoonpayProvider: Feature_PtxSwapMoonpayProvider; | ||
ptxSwapExodusProvider: Feature_PtxSwapExodusProvider; | ||
ptxSwapThorswapProvider: Feature_PtxSwapThorswapProvider; | ||
flexibleContentCards: Feature_FlexibleContentCards; | ||
@@ -165,6 +171,9 @@ llmAnalyticsOptInPrompt: Feature_LlmAnalyticsOptInPrompt; | ||
marketperformanceWidgetDesktop: Feature_MarketperformanceWidgetDesktop; | ||
supportDeviceStax: Feature_SupportDeviceStax; | ||
supportDeviceEuropa: Feature_SupportDeviceEuropa; | ||
lldRefreshMarketData: Feature_LldRefreshMarketData; | ||
llmRefreshMarketData: Feature_LlmRefreshMarketData; | ||
spamReportNfts: Feature_SpamReportNfts; | ||
lldWalletSync: Feature_LldWalletSync; | ||
llmWalletSync: Feature_LlmWalletSync; | ||
lldNftsGalleryNewArch: DefaultFeature; | ||
}; | ||
@@ -424,2 +433,5 @@ /** | ||
}>; | ||
export type Feature_LlmRefreshMarketData = Feature<{ | ||
refreshTime: number; | ||
}>; | ||
export type Feature_BuySellUiManifest = Feature<{ | ||
@@ -434,3 +446,2 @@ manifestId: string; | ||
export type Feature_DisableNftRaribleOpensea = DefaultFeature; | ||
export type Feature_StaxWelcomeScreen = DefaultFeature; | ||
export type Feature_PostOnboardingAssetsTransfer = DefaultFeature; | ||
@@ -444,8 +455,11 @@ export type Feature_PtxServiceCtaExchangeDrawer = DefaultFeature; | ||
export type Feature_PtxSwapMoonpayProvider = DefaultFeature; | ||
export type Feature_PtxSwapExodusProvider = DefaultFeature; | ||
export type Feature_PtxSwapThorswapProvider = DefaultFeature; | ||
export type Feature_FlexibleContentCards = DefaultFeature; | ||
export type Feature_MyLedgerDisplayAppDeveloperName = DefaultFeature; | ||
export type Feature_SupportDeviceStax = DefaultFeature; | ||
export type Feature_SupportDeviceEuropa = DefaultFeature; | ||
export type Feature_LldChatbotSupport = DefaultFeature; | ||
export type Feature_LlmChatbotSupport = DefaultFeature; | ||
export type Feature_LldWalletSync = DefaultFeature; | ||
export type Feature_LlmWalletSync = DefaultFeature; | ||
export type Feature_SpamReportNfts = DefaultFeature; | ||
@@ -452,0 +466,0 @@ /** |
@@ -228,3 +228,3 @@ /// <reference types="node" /> | ||
export declare enum AppType { | ||
app = "app", | ||
app = "app",// NB Legacy from v1, drop after we default to v2. | ||
currency = "currency", | ||
@@ -231,0 +231,0 @@ plugin = "plugin", |
@@ -46,3 +46,3 @@ import type BigNumber from "bignumber.js"; | ||
currencyId: CryptoCurrencyIds; | ||
metadata?: NFTMetadata; | ||
metadata?: NFTMetadata | undefined; | ||
}; | ||
@@ -49,0 +49,0 @@ /** |
@@ -22,3 +22,3 @@ import type { BigNumber } from "bignumber.js"; | ||
blockHash: string | null | undefined; | ||
transactionSequenceNumber?: number; | ||
transactionSequenceNumber?: number | undefined; | ||
accountId: string; | ||
@@ -25,0 +25,0 @@ standard?: NFTStandard | string; |
@@ -130,2 +130,7 @@ import { DeviceModelId } from "@ledgerhq/types-devices"; | ||
/** | ||
* Date of when the PostOnboarding banner was first displayed to the user | ||
* Used to dismiss it automatically after some time | ||
*/ | ||
entryPointFirstDisplayedDate: Date | null; | ||
/** | ||
* List of all actions that have to be completed in this post onboarding | ||
@@ -132,0 +137,0 @@ * (whether they are completed or). |
@@ -65,3 +65,3 @@ import type { BigNumber } from "bignumber.js"; | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -77,3 +77,3 @@ /** | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -107,3 +107,3 @@ /** | ||
totalSpent: BigNumber; | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; | ||
@@ -120,4 +120,4 @@ /** | ||
useAllAmount?: boolean; | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; | ||
//# sourceMappingURL=transaction.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,9 +25,4 @@ import type { DerivationMode } from "./derivation"; | ||
pendingOperations: Operation[]; | ||
starred: boolean; | ||
balanceHistoryCache: BalanceHistoryCache; | ||
swapHistory: SwapOperation[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -61,5 +56,2 @@ /** */ | ||
freshAddressPath: string; | ||
freshAddresses: Address[]; | ||
name: string; | ||
starred: boolean; | ||
used: boolean; | ||
@@ -71,4 +63,3 @@ balance: BigNumber; | ||
currency: CryptoCurrency; | ||
feesCurrency?: CryptoCurrency | TokenCurrency; | ||
unit: Unit; | ||
feesCurrency?: CryptoCurrency | TokenCurrency | undefined; | ||
operationsCount: number; | ||
@@ -81,3 +72,3 @@ operations: Operation[]; | ||
swapHistory: SwapOperation[]; | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
nfts?: ProtoNFT[]; | ||
@@ -90,3 +81,3 @@ }; | ||
/** One of the Account type */ | ||
export type AccountLike = Account | TokenAccount; | ||
export type AccountLike<A extends Account = Account> = A | TokenAccount; | ||
/** | ||
@@ -111,6 +102,2 @@ * An array of AccountLikes | ||
swapHistory?: SwapOperationRaw[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -126,4 +113,3 @@ /** */ | ||
freshAddressPath: string; | ||
freshAddresses: Address[]; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -140,3 +126,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -146,3 +131,3 @@ subAccounts?: TokenAccountRaw[]; | ||
swapHistory?: SwapOperationRaw[]; | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
nfts?: ProtoNFTRaw[]; | ||
@@ -160,2 +145,11 @@ }; | ||
}; | ||
/** | ||
* 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 |
@@ -34,4 +34,4 @@ import { BigNumber } from "bignumber.js"; | ||
*/ | ||
export type BroadcastArg = { | ||
account: Account; | ||
export type BroadcastArg<A extends Account> = { | ||
account: A; | ||
signedOperation: SignedOperation; | ||
@@ -42,4 +42,4 @@ }; | ||
*/ | ||
export type SignOperationArg0<T> = { | ||
account: Account; | ||
export type SignOperationArg0<T extends TransactionCommon, A extends Account> = { | ||
account: A; | ||
transaction: T; | ||
@@ -51,7 +51,7 @@ deviceId: DeviceId; | ||
*/ | ||
export type SignOperationFnSignature<T> = (arg0: SignOperationArg0<T>) => Observable<SignOperationEvent>; | ||
export type BroadcastFnSignature = (arg0: BroadcastArg) => Promise<Operation>; | ||
export type Bridge<T extends TransactionCommon> = { | ||
export type SignOperationFnSignature<T extends TransactionCommon, A extends Account> = (arg0: SignOperationArg0<T, A>) => Observable<SignOperationEvent>; | ||
export type BroadcastFnSignature<A extends Account = Account> = (arg0: BroadcastArg<A>) => Promise<Operation>; | ||
export type Bridge<T extends TransactionCommon, A extends Account = Account, U extends TransactionStatusCommon = TransactionStatusCommon, R extends AccountRaw = AccountRaw> = { | ||
currencyBridge: CurrencyBridge; | ||
accountBridge: AccountBridge<T>; | ||
accountBridge: AccountBridge<T, A, U, R>; | ||
}; | ||
@@ -90,5 +90,5 @@ export type ScanInfo = { | ||
*/ | ||
export interface AccountBridge<T extends TransactionCommon> { | ||
sync(initialAccount: Account, syncConfig: SyncConfig): Observable<(arg0: Account) => Account>; | ||
receive(account: Account, arg1: { | ||
export interface AccountBridge<T extends TransactionCommon, A extends Account = Account, U extends TransactionStatusCommon = TransactionStatusCommon, R extends AccountRaw = AccountRaw> { | ||
sync(initialAccount: A, syncConfig: SyncConfig): Observable<(arg0: A) => A>; | ||
receive(account: A, arg1: { | ||
verify?: boolean; | ||
@@ -102,9 +102,9 @@ deviceId: string; | ||
}>; | ||
createTransaction(account: AccountLike): T; | ||
createTransaction(account: AccountLike<A>): T; | ||
updateTransaction(t: T, patch: Partial<T>): T; | ||
prepareTransaction(account: Account, transaction: T): Promise<T>; | ||
getTransactionStatus(account: Account, transaction: T): Promise<TransactionStatusCommon>; | ||
prepareTransaction(account: A, transaction: T): Promise<T>; | ||
getTransactionStatus(account: A, transaction: T): Promise<U>; | ||
estimateMaxSpendable(arg0: { | ||
account: AccountLike; | ||
parentAccount?: Account | null | undefined; | ||
account: AccountLike<A>; | ||
parentAccount?: A | null | undefined; | ||
transaction?: T | null | undefined; | ||
@@ -119,3 +119,3 @@ }): Promise<BigNumber>; | ||
*/ | ||
assignToAccountRaw?: (account: Account, accountRaw: AccountRaw) => void; | ||
assignToAccountRaw?: (account: A, accountRaw: R) => void; | ||
/** | ||
@@ -128,3 +128,3 @@ * This function mutates the 'account' object in-place to add any extra fields that the coin may need to set. | ||
*/ | ||
assignFromAccountRaw?: (accountRaw: AccountRaw, account: Account) => void; | ||
assignFromAccountRaw?: (accountRaw: R, account: A) => void; | ||
/** | ||
@@ -136,5 +136,5 @@ * This function mutates the 'account' object to extend it with any extra fields of the coin. | ||
*/ | ||
initAccount?: (account: Account) => void; | ||
signOperation: SignOperationFnSignature<T>; | ||
broadcast: BroadcastFnSignature; | ||
initAccount?: (account: A) => void; | ||
signOperation: SignOperationFnSignature<T, A>; | ||
broadcast: BroadcastFnSignature<A>; | ||
fromOperationExtraRaw?: (extraRaw: OperationExtraRaw) => OperationExtra; | ||
@@ -184,3 +184,10 @@ toOperationExtraRaw?: (extra: OperationExtra) => OperationExtraRaw; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=bridge.d.ts.map |
@@ -103,3 +103,7 @@ import { ABTestingVariants } from "./ABTesting"; | ||
currencyLinea: DefaultFeature; | ||
currencyLineaTesnet: DefaultFeature; | ||
currencyLineaSepolia: DefaultFeature; | ||
currencyBlast: DefaultFeature; | ||
currencyBlastSepolia: DefaultFeature; | ||
currencyScroll: DefaultFeature; | ||
currencyScrollSepolia: DefaultFeature; | ||
}; | ||
@@ -121,2 +125,3 @@ /** | ||
buySellUi: Feature_BuySellUiManifest; | ||
buySellShortcut: DefaultFeature; | ||
multibuyNavigation: Feature_MultibuyNavigation; | ||
@@ -131,3 +136,2 @@ referralProgramDesktopSidebar: Feature_ReferralProgramDesktopSidebar; | ||
storyly: Feature_Storyly; | ||
staxWelcomeScreen: Feature_StaxWelcomeScreen; | ||
postOnboardingAssetsTransfer: Feature_PostOnboardingAssetsTransfer; | ||
@@ -155,2 +159,4 @@ firebaseEnvironmentReadOnly: Feature_FirebaseEnvironmentReadOnly; | ||
ptxSwapMoonpayProvider: Feature_PtxSwapMoonpayProvider; | ||
ptxSwapExodusProvider: Feature_PtxSwapExodusProvider; | ||
ptxSwapThorswapProvider: Feature_PtxSwapThorswapProvider; | ||
flexibleContentCards: Feature_FlexibleContentCards; | ||
@@ -165,6 +171,9 @@ llmAnalyticsOptInPrompt: Feature_LlmAnalyticsOptInPrompt; | ||
marketperformanceWidgetDesktop: Feature_MarketperformanceWidgetDesktop; | ||
supportDeviceStax: Feature_SupportDeviceStax; | ||
supportDeviceEuropa: Feature_SupportDeviceEuropa; | ||
lldRefreshMarketData: Feature_LldRefreshMarketData; | ||
llmRefreshMarketData: Feature_LlmRefreshMarketData; | ||
spamReportNfts: Feature_SpamReportNfts; | ||
lldWalletSync: Feature_LldWalletSync; | ||
llmWalletSync: Feature_LlmWalletSync; | ||
lldNftsGalleryNewArch: DefaultFeature; | ||
}; | ||
@@ -424,2 +433,5 @@ /** | ||
}>; | ||
export type Feature_LlmRefreshMarketData = Feature<{ | ||
refreshTime: number; | ||
}>; | ||
export type Feature_BuySellUiManifest = Feature<{ | ||
@@ -434,3 +446,2 @@ manifestId: string; | ||
export type Feature_DisableNftRaribleOpensea = DefaultFeature; | ||
export type Feature_StaxWelcomeScreen = DefaultFeature; | ||
export type Feature_PostOnboardingAssetsTransfer = DefaultFeature; | ||
@@ -444,8 +455,11 @@ export type Feature_PtxServiceCtaExchangeDrawer = DefaultFeature; | ||
export type Feature_PtxSwapMoonpayProvider = DefaultFeature; | ||
export type Feature_PtxSwapExodusProvider = DefaultFeature; | ||
export type Feature_PtxSwapThorswapProvider = DefaultFeature; | ||
export type Feature_FlexibleContentCards = DefaultFeature; | ||
export type Feature_MyLedgerDisplayAppDeveloperName = DefaultFeature; | ||
export type Feature_SupportDeviceStax = DefaultFeature; | ||
export type Feature_SupportDeviceEuropa = DefaultFeature; | ||
export type Feature_LldChatbotSupport = DefaultFeature; | ||
export type Feature_LlmChatbotSupport = DefaultFeature; | ||
export type Feature_LldWalletSync = DefaultFeature; | ||
export type Feature_LlmWalletSync = DefaultFeature; | ||
export type Feature_SpamReportNfts = DefaultFeature; | ||
@@ -452,0 +466,0 @@ /** |
@@ -228,3 +228,3 @@ /// <reference types="node" /> | ||
export declare enum AppType { | ||
app = "app", | ||
app = "app",// NB Legacy from v1, drop after we default to v2. | ||
currency = "currency", | ||
@@ -231,0 +231,0 @@ plugin = "plugin", |
@@ -46,3 +46,3 @@ import type BigNumber from "bignumber.js"; | ||
currencyId: CryptoCurrencyIds; | ||
metadata?: NFTMetadata; | ||
metadata?: NFTMetadata | undefined; | ||
}; | ||
@@ -49,0 +49,0 @@ /** |
@@ -22,3 +22,3 @@ import type { BigNumber } from "bignumber.js"; | ||
blockHash: string | null | undefined; | ||
transactionSequenceNumber?: number; | ||
transactionSequenceNumber?: number | undefined; | ||
accountId: string; | ||
@@ -25,0 +25,0 @@ standard?: NFTStandard | string; |
@@ -130,2 +130,7 @@ import { DeviceModelId } from "@ledgerhq/types-devices"; | ||
/** | ||
* Date of when the PostOnboarding banner was first displayed to the user | ||
* Used to dismiss it automatically after some time | ||
*/ | ||
entryPointFirstDisplayedDate: Date | null; | ||
/** | ||
* List of all actions that have to be completed in this post onboarding | ||
@@ -132,0 +137,0 @@ * (whether they are completed or). |
@@ -65,3 +65,3 @@ import type { BigNumber } from "bignumber.js"; | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -77,3 +77,3 @@ /** | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -107,3 +107,3 @@ /** | ||
totalSpent: BigNumber; | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; | ||
@@ -120,4 +120,4 @@ /** | ||
useAllAmount?: boolean; | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; | ||
//# sourceMappingURL=transaction.d.ts.map |
{ | ||
"name": "@ledgerhq/types-live", | ||
"version": "6.47.0", | ||
"version": "6.48.0-next.0", | ||
"description": "Ledger Live main types.", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"ts-node": "^10.4.0", | ||
"@ledgerhq/types-cryptoassets": "^7.12.0", | ||
"@ledgerhq/types-devices": "^6.24.0" | ||
"@ledgerhq/types-cryptoassets": "^7.13.0-next.0", | ||
"@ledgerhq/types-devices": "^6.25.0-next.0" | ||
}, | ||
@@ -45,3 +45,2 @@ "scripts": { | ||
"watch": "tsc --watch", | ||
"doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", | ||
"lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", | ||
@@ -48,0 +47,0 @@ "lint:fix": "pnpm lint --fix", |
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. | ||
@@ -46,6 +45,2 @@ // currently there are no "raw" version of it because no need to at this stage. | ||
swapHistory: SwapOperation[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -92,15 +87,6 @@ | ||
// next receive address. to be used to display to user. | ||
// (deprecated - corresponds to freshAddresses[0].address) | ||
freshAddress: string; | ||
// The path linked to freshAddress. to be used to validate with the device if it corresponds to freshAddress. | ||
// example: 44'/0'/0'/0/0 | ||
// (deprecated - corresponds to freshAddresses[0].derivationPath) | ||
freshAddressPath: string; | ||
// an array containing all fresh addresses and paths | ||
// may be empty if no sync has occurred | ||
freshAddresses: Address[]; | ||
// 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,..) | ||
@@ -121,5 +107,3 @@ used: boolean; | ||
// Some blockchains may use a different currency than the main one to pay fees | ||
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; | ||
feesCurrency?: CryptoCurrency | TokenCurrency | undefined; | ||
// The total number of operations (operations[] can be partial) | ||
@@ -159,3 +143,3 @@ operationsCount: number; | ||
// Hash used to discard tx history on sync | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
// Array of NFTs computed by diffing NFTOperations ordered from newest to oldest | ||
@@ -171,3 +155,3 @@ nfts?: ProtoNFT[]; | ||
/** One of the Account type */ | ||
export type AccountLike = Account | TokenAccount; | ||
export type AccountLike<A extends Account = Account> = A | TokenAccount; | ||
@@ -194,6 +178,2 @@ /** | ||
swapHistory?: SwapOperationRaw[]; | ||
approvals?: Array<{ | ||
sender: string; | ||
value: string; | ||
}>; | ||
}; | ||
@@ -210,4 +190,3 @@ | ||
freshAddressPath: string; | ||
freshAddresses: Address[]; | ||
name: string; | ||
name?: string; | ||
starred?: boolean; | ||
@@ -226,3 +205,2 @@ used?: boolean; | ||
pendingOperations: OperationRaw[]; | ||
unitMagnitude: number; | ||
lastSyncDate: string; | ||
@@ -232,3 +210,3 @@ subAccounts?: TokenAccountRaw[]; | ||
swapHistory?: SwapOperationRaw[]; | ||
syncHash?: string; | ||
syncHash?: string | undefined; | ||
nfts?: ProtoNFTRaw[]; | ||
@@ -248,1 +226,14 @@ }; | ||
}; | ||
/** | ||
* 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[]; | ||
}; |
@@ -54,4 +54,4 @@ // NB this new "bridge" is a re-take of live-desktop bridge ideas | ||
*/ | ||
export type BroadcastArg = { | ||
account: Account; | ||
export type BroadcastArg<A extends Account> = { | ||
account: A; | ||
signedOperation: SignedOperation; | ||
@@ -63,4 +63,4 @@ }; | ||
*/ | ||
export type SignOperationArg0<T> = { | ||
account: Account; | ||
export type SignOperationArg0<T extends TransactionCommon, A extends Account> = { | ||
account: A; | ||
transaction: T; | ||
@@ -73,11 +73,18 @@ deviceId: DeviceId; | ||
*/ | ||
export type SignOperationFnSignature<T> = ( | ||
arg0: SignOperationArg0<T>, | ||
export type SignOperationFnSignature<T extends TransactionCommon, A extends Account> = ( | ||
arg0: SignOperationArg0<T, A>, | ||
) => Observable<SignOperationEvent>; | ||
export type BroadcastFnSignature = (arg0: BroadcastArg) => Promise<Operation>; | ||
export type BroadcastFnSignature<A extends Account = Account> = ( | ||
arg0: BroadcastArg<A>, | ||
) => Promise<Operation>; | ||
export type Bridge<T extends TransactionCommon> = { | ||
export type Bridge< | ||
T extends TransactionCommon, | ||
A extends Account = Account, | ||
U extends TransactionStatusCommon = TransactionStatusCommon, | ||
R extends AccountRaw = AccountRaw, | ||
> = { | ||
currencyBridge: CurrencyBridge; | ||
accountBridge: AccountBridge<T>; | ||
accountBridge: AccountBridge<T, A, U, R>; | ||
}; | ||
@@ -126,3 +133,8 @@ | ||
*/ | ||
export interface AccountBridge<T extends TransactionCommon> { | ||
export interface AccountBridge< | ||
T extends TransactionCommon, | ||
A extends Account = Account, | ||
U extends TransactionStatusCommon = TransactionStatusCommon, | ||
R extends AccountRaw = AccountRaw, | ||
> { | ||
// synchronizes an account continuously to update with latest blochchains state. | ||
@@ -133,5 +145,5 @@ // The function emits updater functions each time there are data changes (e.g. blockchains updates) | ||
// the sync can be stopped at any time using Observable's subscription.unsubscribe() | ||
sync(initialAccount: Account, syncConfig: SyncConfig): Observable<(arg0: Account) => Account>; | ||
sync(initialAccount: A, syncConfig: SyncConfig): Observable<(arg0: A) => A>; | ||
receive( | ||
account: Account, | ||
account: A, | ||
arg1: { | ||
@@ -150,3 +162,3 @@ verify?: boolean; | ||
// it needs to be a serializable JS object | ||
createTransaction(account: AccountLike): T; | ||
createTransaction(account: AccountLike<A>): T; | ||
// NOTE: because of a dependency to React at the moment, if updateTransaction doesn't modify the transaction | ||
@@ -160,5 +172,5 @@ // it must return the unmodified input transaction object (reference stability) | ||
// it must return the unmodified input transaction object (reference stability) | ||
prepareTransaction(account: Account, transaction: T): Promise<T>; | ||
prepareTransaction(account: A, transaction: T): Promise<T>; | ||
// calculate derived state of the Transaction, useful to display summary / errors / warnings. tells if the transaction is ready. | ||
getTransactionStatus(account: Account, transaction: T): Promise<TransactionStatusCommon>; | ||
getTransactionStatus(account: A, transaction: T): Promise<U>; | ||
// heuristic that provides the estimated max amount that can be set to a send. | ||
@@ -172,4 +184,4 @@ // this is usually the balance minus the fees, but it really depends between coins (reserve, burn, frozen part of the balance,...). | ||
estimateMaxSpendable(arg0: { | ||
account: AccountLike; | ||
parentAccount?: Account | null | undefined; | ||
account: AccountLike<A>; | ||
parentAccount?: A | null | undefined; | ||
transaction?: T | null | undefined; | ||
@@ -184,3 +196,3 @@ }): Promise<BigNumber>; | ||
*/ | ||
assignToAccountRaw?: (account: Account, accountRaw: AccountRaw) => void; | ||
assignToAccountRaw?: (account: A, accountRaw: R) => void; | ||
/** | ||
@@ -193,3 +205,3 @@ * This function mutates the 'account' object in-place to add any extra fields that the coin may need to set. | ||
*/ | ||
assignFromAccountRaw?: (accountRaw: AccountRaw, account: Account) => void; | ||
assignFromAccountRaw?: (accountRaw: R, account: A) => void; | ||
/** | ||
@@ -201,10 +213,10 @@ * This function mutates the 'account' object to extend it with any extra fields of the coin. | ||
*/ | ||
initAccount?: (account: Account) => void; | ||
initAccount?: (account: A) => void; | ||
// finalizing a transaction by signing it with the ledger device | ||
// This results of a "signed" event with a signedOperation | ||
// than can be locally saved and later broadcasted | ||
signOperation: SignOperationFnSignature<T>; | ||
signOperation: SignOperationFnSignature<T, A>; | ||
// broadcasting a signed transaction to network | ||
// returns an optimistic Operation that this transaction is likely to create in the future | ||
broadcast: BroadcastFnSignature; | ||
broadcast: BroadcastFnSignature<A>; | ||
fromOperationExtraRaw?: (extraRaw: OperationExtraRaw) => OperationExtra; | ||
@@ -272,1 +284,9 @@ toOperationExtraRaw?: (extra: OperationExtra) => OperationExtraRaw; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export type BridgeCacheSystem = { | ||
hydrateCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
prepareCurrency: (currency: CryptoCurrency) => Promise<unknown | null | undefined>; | ||
}; |
@@ -115,3 +115,7 @@ import { ABTestingVariants } from "./ABTesting"; | ||
currencyLinea: DefaultFeature; | ||
currencyLineaTesnet: DefaultFeature; | ||
currencyLineaSepolia: DefaultFeature; | ||
currencyBlast: DefaultFeature; | ||
currencyBlastSepolia: DefaultFeature; | ||
currencyScroll: DefaultFeature; | ||
currencyScrollSepolia: DefaultFeature; | ||
}; | ||
@@ -134,2 +138,3 @@ | ||
buySellUi: Feature_BuySellUiManifest; | ||
buySellShortcut: DefaultFeature; | ||
multibuyNavigation: Feature_MultibuyNavigation; | ||
@@ -144,3 +149,2 @@ referralProgramDesktopSidebar: Feature_ReferralProgramDesktopSidebar; | ||
storyly: Feature_Storyly; | ||
staxWelcomeScreen: Feature_StaxWelcomeScreen; | ||
postOnboardingAssetsTransfer: Feature_PostOnboardingAssetsTransfer; | ||
@@ -168,2 +172,4 @@ firebaseEnvironmentReadOnly: Feature_FirebaseEnvironmentReadOnly; | ||
ptxSwapMoonpayProvider: Feature_PtxSwapMoonpayProvider; | ||
ptxSwapExodusProvider: Feature_PtxSwapExodusProvider; | ||
ptxSwapThorswapProvider: Feature_PtxSwapThorswapProvider; | ||
flexibleContentCards: Feature_FlexibleContentCards; | ||
@@ -178,6 +184,9 @@ llmAnalyticsOptInPrompt: Feature_LlmAnalyticsOptInPrompt; | ||
marketperformanceWidgetDesktop: Feature_MarketperformanceWidgetDesktop; | ||
supportDeviceStax: Feature_SupportDeviceStax; | ||
supportDeviceEuropa: Feature_SupportDeviceEuropa; | ||
lldRefreshMarketData: Feature_LldRefreshMarketData; | ||
llmRefreshMarketData: Feature_LlmRefreshMarketData; | ||
spamReportNfts: Feature_SpamReportNfts; | ||
lldWalletSync: Feature_LldWalletSync; | ||
llmWalletSync: Feature_LlmWalletSync; | ||
lldNftsGalleryNewArch: DefaultFeature; | ||
}; | ||
@@ -467,2 +476,5 @@ | ||
}>; | ||
export type Feature_LlmRefreshMarketData = Feature<{ | ||
refreshTime: number; | ||
}>; | ||
@@ -479,3 +491,2 @@ export type Feature_BuySellUiManifest = Feature<{ | ||
export type Feature_DisableNftRaribleOpensea = DefaultFeature; | ||
export type Feature_StaxWelcomeScreen = DefaultFeature; | ||
export type Feature_PostOnboardingAssetsTransfer = DefaultFeature; | ||
@@ -489,9 +500,13 @@ export type Feature_PtxServiceCtaExchangeDrawer = DefaultFeature; | ||
export type Feature_PtxSwapMoonpayProvider = DefaultFeature; | ||
export type Feature_PtxSwapExodusProvider = DefaultFeature; | ||
export type Feature_PtxSwapThorswapProvider = DefaultFeature; | ||
export type Feature_FlexibleContentCards = DefaultFeature; | ||
export type Feature_MyLedgerDisplayAppDeveloperName = DefaultFeature; | ||
export type Feature_SupportDeviceStax = DefaultFeature; | ||
export type Feature_SupportDeviceEuropa = DefaultFeature; | ||
export type Feature_LldChatbotSupport = DefaultFeature; | ||
export type Feature_LlmChatbotSupport = DefaultFeature; | ||
export type Feature_LldWalletSync = DefaultFeature; | ||
export type Feature_LlmWalletSync = DefaultFeature; | ||
export type Feature_SpamReportNfts = DefaultFeature; | ||
/** | ||
@@ -498,0 +513,0 @@ * Utils types. |
@@ -59,3 +59,3 @@ import type BigNumber from "bignumber.js"; | ||
currencyId: CryptoCurrencyIds; | ||
metadata?: NFTMetadata; | ||
metadata?: NFTMetadata | undefined; | ||
}; | ||
@@ -62,0 +62,0 @@ |
@@ -84,3 +84,3 @@ import type { BigNumber } from "bignumber.js"; | ||
// if available, this is the sequence number of the transaction in blockchains (aka "nonce" in Ethereum) | ||
transactionSequenceNumber?: number; | ||
transactionSequenceNumber?: number | undefined; | ||
// the account id. available for convenient reason | ||
@@ -87,0 +87,0 @@ accountId: string; |
@@ -146,2 +146,8 @@ import { DeviceModelId } from "@ledgerhq/types-devices"; | ||
/** | ||
* Date of when the PostOnboarding banner was first displayed to the user | ||
* Used to dismiss it automatically after some time | ||
*/ | ||
entryPointFirstDisplayedDate: Date | null; | ||
/** | ||
* List of all actions that have to be completed in this post onboarding | ||
@@ -148,0 +154,0 @@ * (whether they are completed or). |
@@ -85,3 +85,3 @@ import type { BigNumber } from "bignumber.js"; | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -98,3 +98,3 @@ | ||
subAccountId?: string | null | undefined; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null; | ||
feesStrategy?: "slow" | "medium" | "fast" | "custom" | null | undefined; | ||
}; | ||
@@ -138,3 +138,3 @@ | ||
// should the recipient be non editable | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; | ||
@@ -151,3 +151,3 @@ /** | ||
useAllAmount?: boolean; | ||
recipientIsReadOnly?: boolean; | ||
recipientIsReadOnly?: boolean | undefined; | ||
}; |
Sorry, the diff of this file is too big to display
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 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 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 not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39826
6050
251
19
38
114
359406
1
6