/
types.js
48 lines (39 loc) · 1 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// @flow
export type AddressState = 'used' | 'unused';
export type AddressStyle = 'Byron' | 'Shelley' | 'Icarus';
export type StakeReference = 'none' | 'by value' | 'by pointer';
export type GetAddressesRequestQueryParams = {
state: AddressState,
};
export type Address = {
id: string,
state: AddressState,
};
export type Addresses = Array<Address>;
export type GetAddressesRequest = {
walletId: string,
isLegacy: boolean,
queryParams?: GetAddressesRequestQueryParams,
isHardwareWallet?: boolean,
};
export type InspectAddressResponse = {
address_style: AddressStyle,
stake_reference: StakeReference,
network_tag?: number,
spending_key_hash?: string,
stake_key_hash?: string,
script_hash?: string,
pointer?: {
slot_num: number,
transaction_index: number,
output_index: number,
},
address_root?: string,
derivation_path?: string,
};
// Byron related types
export type CreateByronWalletAddressRequest = {
walletId: string,
passphrase: string,
addressIndex?: number,
};