You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.2 KiB

7 years ago
// @flow
import type { Unit, Currency } from '@ledgerhq/currencies'
7 years ago
export type Device = {
vendorId: string,
productId: string,
path: string,
}
export type Devices = Array<Device>
// -------------------- Transactions
export type Transaction = {
account?: Account,
address: string,
balance: number,
hash: string,
receivedAt: string,
confirmations: number,
}
export type Transactions = Array<Transaction>
// -------------------- Accounts
export type AccountSettings = {
minConfirmations: number,
}
export type Account = {
address: string,
addresses: Array<string>,
archived?: boolean,
balance: number,
balanceByDay: Object,
coinType: number,
currency: Currency,
id: string,
index: number,
name: string,
path: string,
rootPath: string,
transactions: Transactions,
unit: Unit,
settings: AccountSettings,
}
export type Accounts = Array<Account>
// -------------------- Settings
export type SettingsProfile = {
password: {
state: boolean,
value: string,
},
}
export type SettingsDisplay = {
language: string,
}
export type Settings = SettingsProfile & SettingsDisplay
export type T = (string, ?Object) => string