Repository navigation
Expand file tree
/
Copy pathnoves.ts
More file actions
125 lines (109 loc) · 2.4 KB
/
Copy pathnoves.ts
File metadata and controls
125 lines (109 loc) · 2.4 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
export interface NovesResponseData {
txTypeVersion: number;
chain: string;
accountAddress: string;
classificationData: NovesClassificationData;
rawTransactionData: NovesRawTransactionData;
}
export interface NovesClassificationData {
type: string;
typeFormatted?: string;
description: string;
sent: Array<NovesSentReceived>;
received: Array<NovesSentReceived>;
approved?: Approved;
protocol?: {
name: string | null;
};
source: {
type: string | null;
};
message?: string;
deployedContractAddress?: string;
}
export interface Approved {
amount: string;
spender: string;
token?: NovesToken;
nft?: NovesNft;
}
export interface NovesSentReceived {
action: string;
actionFormatted?: string;
amount: string;
to: NovesTo;
from: NovesFrom;
token?: NovesToken;
nft?: NovesNft;
}
export interface NovesToken {
symbol: string;
name: string;
decimals: number;
address: string;
id?: string;
}
export interface NovesNft {
name: string;
id: string;
symbol: string;
address: string;
}
export interface NovesFrom {
name: string | null;
address: string;
}
export interface NovesTo {
name: string | null;
address: string | null;
}
export interface NovesRawTransactionData {
transactionHash: string;
fromAddress: string;
toAddress: string;
blockNumber: number;
gas: number;
gasPrice: number;
transactionFee: NovesTransactionFee | number;
timestamp: number;
}
export interface NovesTransactionFee {
amount: string;
currency?: string;
token?: {
decimals: number;
symbol: string;
};
}
export interface NovesAccountHistoryResponse {
hasNextPage: boolean;
items: Array<NovesResponseData>;
pageNumber: number;
pageSize: number;
next_page_params?: {
startBlock: string;
endBlock: string;
pageNumber: number;
pageSize: number;
ignoreTransactions: string;
viewAsAccountAddress: string;
};
}
export const NovesHistoryFilterValues = [ 'received', 'sent' ] as const;
export type NovesHistoryFilterValue = typeof NovesHistoryFilterValues[number] | undefined;
export interface NovesHistoryFilters {
filter?: NovesHistoryFilterValue;
}
export interface NovesDescribeResponse {
type: string;
description: string;
}
export type NovesDescribeTxsResponse = {
txHash: string;
type: string;
description: string;
};
export interface NovesTxTranslation {
data?: NovesDescribeTxsResponse;
isLoading: boolean;
}