@covalenthq/client-sdk 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/services/BalanceService.js.map +1 -1
- package/dist/services/BaseService.d.ts +26 -2
- package/dist/services/BaseService.js +75 -1
- package/dist/services/BaseService.js.map +1 -1
- package/dist/services/Client.d.ts +2 -2
- package/dist/services/Client.js +1 -1
- package/dist/services/NftService.d.ts +11 -11
- package/dist/services/NftService.js +7 -7
- package/dist/services/NftService.js.map +1 -1
- package/dist/services/TransactionService.d.ts +197 -0
- package/dist/services/TransactionService.js +123 -0
- package/dist/services/TransactionService.js.map +1 -1
- package/dist/services/XykService.d.ts +126 -29
- package/dist/services/XykService.js +186 -17
- package/dist/services/XykService.js.map +1 -1
- package/dist/util/types/BalanceServiceTypes.d.ts +259 -0
- package/dist/util/types/BalanceServiceTypes.js +3 -0
- package/dist/util/types/BalanceServiceTypes.js.map +1 -0
- package/dist/util/types/BaseServiceTypes.d.ts +172 -0
- package/dist/util/types/BaseServiceTypes.js +3 -0
- package/dist/util/types/BaseServiceTypes.js.map +1 -0
- package/dist/util/types/GenericTypes.d.ts +75 -0
- package/dist/util/types/GenericTypes.js +3 -0
- package/dist/util/types/GenericTypes.js.map +1 -0
- package/dist/util/types/NftServiceTypes.d.ts +213 -0
- package/dist/util/types/NftServiceTypes.js +3 -0
- package/dist/util/types/NftServiceTypes.js.map +1 -0
- package/dist/util/types/PricingServiceTypes.d.ts +44 -0
- package/dist/util/types/PricingServiceTypes.js +3 -0
- package/dist/util/types/PricingServiceTypes.js.map +1 -0
- package/dist/util/types/SecurityServiceTypes.d.ts +70 -0
- package/dist/util/types/SecurityServiceTypes.js +3 -0
- package/dist/util/types/SecurityServiceTypes.js.map +1 -0
- package/dist/util/types/TransactionServiceTypes.d.ts +314 -0
- package/dist/util/types/TransactionServiceTypes.js +3 -0
- package/dist/util/types/TransactionServiceTypes.js.map +1 -0
- package/dist/util/types/XykServiceTypes.d.ts +465 -0
- package/dist/util/types/XykServiceTypes.js +3 -0
- package/dist/util/types/XykServiceTypes.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface Pagination {
|
|
2
|
+
/** * True is there is another page. */
|
|
3
|
+
has_more: boolean;
|
|
4
|
+
/** * The requested page number. */
|
|
5
|
+
page_number: number;
|
|
6
|
+
/** * The requested number of items on the current page. */
|
|
7
|
+
page_size: number;
|
|
8
|
+
/** * The total number of items across all pages for this request. */
|
|
9
|
+
total_count: number;
|
|
10
|
+
}
|
|
11
|
+
export interface NftCollectionAttribute {
|
|
12
|
+
trait_type: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export interface NftData {
|
|
16
|
+
/** * The token's id. */
|
|
17
|
+
token_id: bigint | null;
|
|
18
|
+
token_url: string;
|
|
19
|
+
/** * The original minter. */
|
|
20
|
+
original_owner: string;
|
|
21
|
+
external_data: NftExternalData;
|
|
22
|
+
/** * If `true`, the asset data is available from the Covalent CDN. */
|
|
23
|
+
asset_cached: boolean;
|
|
24
|
+
/** * If `true`, the image data is available from the Covalent CDN. */
|
|
25
|
+
image_cached: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface NftExternalData {
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
asset_url: string;
|
|
31
|
+
asset_file_extension: string;
|
|
32
|
+
asset_mime_type: string;
|
|
33
|
+
asset_size_bytes: string;
|
|
34
|
+
image: string;
|
|
35
|
+
image_256: string;
|
|
36
|
+
image_512: string;
|
|
37
|
+
image_1024: string;
|
|
38
|
+
animation_url: string;
|
|
39
|
+
external_url: string;
|
|
40
|
+
attributes: NftCollectionAttribute[];
|
|
41
|
+
}
|
|
42
|
+
export interface DecodedItem {
|
|
43
|
+
name: string;
|
|
44
|
+
signature: string;
|
|
45
|
+
params: Param[];
|
|
46
|
+
}
|
|
47
|
+
export interface Param {
|
|
48
|
+
name: string;
|
|
49
|
+
type: string;
|
|
50
|
+
indexed: boolean;
|
|
51
|
+
decoded: boolean;
|
|
52
|
+
value: string;
|
|
53
|
+
}
|
|
54
|
+
export interface LogEvent {
|
|
55
|
+
/** * The block signed timestamp in UTC. */
|
|
56
|
+
block_signed_at: Date;
|
|
57
|
+
/** * The height of the block. */
|
|
58
|
+
block_height: number;
|
|
59
|
+
/** * The offset is the position of the tx in the block. */
|
|
60
|
+
tx_offset: number;
|
|
61
|
+
log_offset: number;
|
|
62
|
+
/** * The requested transaction hash. */
|
|
63
|
+
tx_hash: string;
|
|
64
|
+
raw_log_topics: string;
|
|
65
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
66
|
+
sender_contract_decimals: number;
|
|
67
|
+
sender_name: string;
|
|
68
|
+
sender_contract_ticker_symbol: string;
|
|
69
|
+
sender_address: string;
|
|
70
|
+
sender_address_label: string;
|
|
71
|
+
/** * The contract logo URL. */
|
|
72
|
+
sender_logo_url: string;
|
|
73
|
+
raw_log_data: string;
|
|
74
|
+
decoded: DecodedItem;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericTypes.js","sourceRoot":"","sources":["../../../src/util/types/GenericTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { LogEvent, NftData, Pagination } from "./GenericTypes";
|
|
2
|
+
export interface ChainCollectionResponse {
|
|
3
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
4
|
+
updated_at: Date;
|
|
5
|
+
/** * The requested chain ID eg: `1`. */
|
|
6
|
+
chain_id: number;
|
|
7
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
8
|
+
chain_name: string;
|
|
9
|
+
/** * List of response items. */
|
|
10
|
+
items: ChainCollectionItem[];
|
|
11
|
+
/** * Pagination metadata. */
|
|
12
|
+
pagination: Pagination;
|
|
13
|
+
}
|
|
14
|
+
export interface ChainCollectionItem {
|
|
15
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
16
|
+
contract_address: string;
|
|
17
|
+
/** * The string returned by the `name()` method. */
|
|
18
|
+
contract_name: string;
|
|
19
|
+
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
20
|
+
is_spam: boolean;
|
|
21
|
+
token_total_supply: number;
|
|
22
|
+
cached_metadata_count: number;
|
|
23
|
+
cached_asset_count: number;
|
|
24
|
+
last_scraped_at: Date;
|
|
25
|
+
}
|
|
26
|
+
export interface NftAddressBalanceNftResponse {
|
|
27
|
+
/** * The requested address. */
|
|
28
|
+
address: string;
|
|
29
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
30
|
+
updated_at: Date;
|
|
31
|
+
/** * List of response items. */
|
|
32
|
+
items: NftTokenContractBalanceItem[];
|
|
33
|
+
}
|
|
34
|
+
export interface NftTokenContractBalanceItem {
|
|
35
|
+
/** * The string returned by the `name()` method. */
|
|
36
|
+
contract_name: string;
|
|
37
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
38
|
+
contract_ticker_symbol: string;
|
|
39
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
40
|
+
contract_address: string;
|
|
41
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
42
|
+
supports_erc: string;
|
|
43
|
+
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
44
|
+
is_spam: boolean;
|
|
45
|
+
last_transfered_at: Date;
|
|
46
|
+
/** * The asset balance. Use `contract_decimals` to scale this balance for display purposes. */
|
|
47
|
+
balance: bigint | null;
|
|
48
|
+
balance24h: number;
|
|
49
|
+
type: string;
|
|
50
|
+
nft_data: NftData[];
|
|
51
|
+
}
|
|
52
|
+
export interface NftMetadataResponse {
|
|
53
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
54
|
+
updated_at: Date;
|
|
55
|
+
/** * List of response items. */
|
|
56
|
+
items: NftTokenContract[];
|
|
57
|
+
/** * Pagination metadata. */
|
|
58
|
+
pagination: Pagination;
|
|
59
|
+
}
|
|
60
|
+
export interface NftTokenContract {
|
|
61
|
+
/** * The string returned by the `name()` method. */
|
|
62
|
+
contract_name: string;
|
|
63
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
64
|
+
contract_ticker_symbol: string;
|
|
65
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
66
|
+
contract_address: string;
|
|
67
|
+
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
68
|
+
is_spam: boolean;
|
|
69
|
+
type: string;
|
|
70
|
+
nft_data: NftData;
|
|
71
|
+
}
|
|
72
|
+
export interface NftTransactionsResponse {
|
|
73
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
74
|
+
updated_at: Date;
|
|
75
|
+
/** * The requested chain ID eg: `1`. */
|
|
76
|
+
chain_id: number;
|
|
77
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
78
|
+
chain_name: string;
|
|
79
|
+
/** * List of response items. */
|
|
80
|
+
items: NftTransaction[];
|
|
81
|
+
}
|
|
82
|
+
export interface NftTransaction {
|
|
83
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
84
|
+
contract_decimals: number;
|
|
85
|
+
/** * The string returned by the `name()` method. */
|
|
86
|
+
contract_name: string;
|
|
87
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
88
|
+
contract_ticker_symbol: string;
|
|
89
|
+
/** * The contract logo URL. */
|
|
90
|
+
logo_url: string;
|
|
91
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
92
|
+
contract_address: string;
|
|
93
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
94
|
+
supports_erc: string;
|
|
95
|
+
nft_transactions: NftTransactionItem[];
|
|
96
|
+
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
97
|
+
is_spam: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface NftTransactionItem {
|
|
100
|
+
/** * The block signed timestamp in UTC. */
|
|
101
|
+
block_signed_at: Date;
|
|
102
|
+
/** * The height of the block. */
|
|
103
|
+
block_height: number;
|
|
104
|
+
/** * The requested transaction hash. */
|
|
105
|
+
tx_hash: string;
|
|
106
|
+
/** * The offset is the position of the tx in the block. */
|
|
107
|
+
tx_offset: number;
|
|
108
|
+
successful: boolean;
|
|
109
|
+
from_address: string;
|
|
110
|
+
from_address_label: string;
|
|
111
|
+
to_address: string;
|
|
112
|
+
to_address_label: string;
|
|
113
|
+
/** * The value attached to this tx. */
|
|
114
|
+
value: bigint | null;
|
|
115
|
+
/** * The value attached in `quote-currency` to this tx. */
|
|
116
|
+
value_quote: number;
|
|
117
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
118
|
+
pretty_value_quote: string;
|
|
119
|
+
gas_offered: string;
|
|
120
|
+
gas_spent: string;
|
|
121
|
+
gas_price: string;
|
|
122
|
+
/** * The total transaction fees (gas_price * gas_spent) paid for this tx, denoted in wei. */
|
|
123
|
+
fees_paid: bigint | null;
|
|
124
|
+
/** * The gas spent in `quote-currency` denomination. */
|
|
125
|
+
gas_quote: number;
|
|
126
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
127
|
+
pretty_gas_quote: string;
|
|
128
|
+
gas_quote_rate: number;
|
|
129
|
+
log_events: LogEvent[];
|
|
130
|
+
}
|
|
131
|
+
export interface NftCollectionTraitsResponse {
|
|
132
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
133
|
+
updated_at: Date;
|
|
134
|
+
/** * List of response items. */
|
|
135
|
+
items: NftTrait[];
|
|
136
|
+
}
|
|
137
|
+
export interface NftTrait {
|
|
138
|
+
name: string;
|
|
139
|
+
}
|
|
140
|
+
export interface NftCollectionAttributesForTraitResponse {
|
|
141
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
142
|
+
updated_at: Date;
|
|
143
|
+
/** * List of response items. */
|
|
144
|
+
items: NftSummaryAttribute[];
|
|
145
|
+
}
|
|
146
|
+
export interface NftSummaryAttribute {
|
|
147
|
+
trait_type: string;
|
|
148
|
+
values: NftAttribute[];
|
|
149
|
+
unique_values: number;
|
|
150
|
+
}
|
|
151
|
+
export interface NftAttribute {
|
|
152
|
+
value: string;
|
|
153
|
+
count: number;
|
|
154
|
+
}
|
|
155
|
+
export interface NftCollectionTraitSummaryResponse {
|
|
156
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
157
|
+
updated_at: Date;
|
|
158
|
+
/** * List of response items. */
|
|
159
|
+
items: NftTraitSummary[];
|
|
160
|
+
}
|
|
161
|
+
export interface NftTraitSummary {
|
|
162
|
+
/** * Trait name */
|
|
163
|
+
name: string;
|
|
164
|
+
/** * Type of the value of the trait. */
|
|
165
|
+
value_type: string;
|
|
166
|
+
/** * Populated for `numeric` traits. */
|
|
167
|
+
value_numeric: NftTraitNumeric;
|
|
168
|
+
/** * Populated for `string` traits. */
|
|
169
|
+
value_string: NftTraitString;
|
|
170
|
+
attributes: NftSummaryAttribute[];
|
|
171
|
+
}
|
|
172
|
+
export interface NftTraitNumeric {
|
|
173
|
+
min: number;
|
|
174
|
+
max: number;
|
|
175
|
+
}
|
|
176
|
+
export interface NftTraitString {
|
|
177
|
+
/** * String value */
|
|
178
|
+
value: string;
|
|
179
|
+
/** * Number of distinct tokens that have this trait value. */
|
|
180
|
+
token_count: number;
|
|
181
|
+
/** * Percentage of tokens in the collection that have this trait. */
|
|
182
|
+
trait_percentage: number;
|
|
183
|
+
}
|
|
184
|
+
export interface NftOwnershipForCollectionResponse {
|
|
185
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
186
|
+
updated_at: Date;
|
|
187
|
+
/** * The requested address. */
|
|
188
|
+
address: string;
|
|
189
|
+
/** * The requested collection. */
|
|
190
|
+
collection: string;
|
|
191
|
+
/** * Denotes whether the token is suspected spam. Supports `eth-mainnet` and `matic-mainnet`. */
|
|
192
|
+
is_spam: boolean;
|
|
193
|
+
/** * List of response items. */
|
|
194
|
+
items: NftOwnershipForCollectionItem[];
|
|
195
|
+
}
|
|
196
|
+
export interface NftOwnershipForCollectionItem {
|
|
197
|
+
/** * The string returned by the `name()` method. */
|
|
198
|
+
contract_name: string;
|
|
199
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
200
|
+
contract_ticker_symbol: string;
|
|
201
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
202
|
+
contract_address: string;
|
|
203
|
+
/** * The token's id. */
|
|
204
|
+
token_id: bigint | null;
|
|
205
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
206
|
+
supports_erc: string;
|
|
207
|
+
last_transfered_at: Date;
|
|
208
|
+
/** * Nft balance. */
|
|
209
|
+
balance: bigint | null;
|
|
210
|
+
balance24h: number;
|
|
211
|
+
type: string;
|
|
212
|
+
nft_data: NftData;
|
|
213
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NftServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/NftServiceTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface TokenPricesResponse {
|
|
2
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
3
|
+
contract_decimals: number;
|
|
4
|
+
/** * The string returned by the `name()` method. */
|
|
5
|
+
contract_name: string;
|
|
6
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
7
|
+
contract_ticker_symbol: string;
|
|
8
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
9
|
+
contract_address: string;
|
|
10
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
11
|
+
supports_erc: string;
|
|
12
|
+
/** * The contract logo URL. */
|
|
13
|
+
logo_url: string;
|
|
14
|
+
update_at: Date;
|
|
15
|
+
/** * The requested quote currency eg: `USD`. */
|
|
16
|
+
quote_currency: string;
|
|
17
|
+
/** * List of response items. */
|
|
18
|
+
prices: Price[];
|
|
19
|
+
/** * List of response items. */
|
|
20
|
+
items: Price[];
|
|
21
|
+
}
|
|
22
|
+
export interface Price {
|
|
23
|
+
contract_metadata: ContractMetadata;
|
|
24
|
+
/** * The date of the price capture. */
|
|
25
|
+
date: Date;
|
|
26
|
+
/** * The price in the requested `quote-currency`. */
|
|
27
|
+
price: number;
|
|
28
|
+
/** * A prettier version of the price for rendering purposes. */
|
|
29
|
+
pretty_price: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ContractMetadata {
|
|
32
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
33
|
+
contract_decimals: number;
|
|
34
|
+
/** * The string returned by the `name()` method. */
|
|
35
|
+
contract_name: string;
|
|
36
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
37
|
+
contract_ticker_symbol: string;
|
|
38
|
+
/** * Use the relevant `contract_address` to lookup prices, logos, token transfers, etc. */
|
|
39
|
+
contract_address: string;
|
|
40
|
+
/** * A list of supported standard ERC interfaces, eg: `ERC20` and `ERC721`. */
|
|
41
|
+
supports_erc: string;
|
|
42
|
+
/** * The contract logo URL. */
|
|
43
|
+
logo_url: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PricingServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/PricingServiceTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export interface ApprovalsResponse {
|
|
2
|
+
/** * The requested address. */
|
|
3
|
+
address: string;
|
|
4
|
+
/** * The timestamp when the response was generated. Useful to show data staleness to users. */
|
|
5
|
+
updated_at: Date;
|
|
6
|
+
/** * The requested quote currency eg: `USD`. */
|
|
7
|
+
quote_currency: string;
|
|
8
|
+
/** * The requested chain ID eg: `1`. */
|
|
9
|
+
chain_id: number;
|
|
10
|
+
/** * The requested chain name eg: `eth-mainnet`. */
|
|
11
|
+
chain_name: string;
|
|
12
|
+
/** * List of response items. */
|
|
13
|
+
items: TokensApprovalItem[];
|
|
14
|
+
}
|
|
15
|
+
export interface TokensApprovalItem {
|
|
16
|
+
/** * The address for the token that has approvals. */
|
|
17
|
+
token_address: string;
|
|
18
|
+
/** * The name for the token that has approvals. */
|
|
19
|
+
token_address_label: string;
|
|
20
|
+
/** * The ticker symbol for this contract. This field is set by a developer and non-unique across a network. */
|
|
21
|
+
ticker_symbol: string;
|
|
22
|
+
/** * Use contract decimals to format the token balance for display purposes - divide the balance by `10^{contract_decimals}`. */
|
|
23
|
+
contract_decimals: number;
|
|
24
|
+
/** * The contract logo URL. */
|
|
25
|
+
logo_url: string;
|
|
26
|
+
/** * The exchange rate for the requested quote currency. */
|
|
27
|
+
quote_rate: number;
|
|
28
|
+
/** * Wallet balance of the token. */
|
|
29
|
+
balance: bigint | null;
|
|
30
|
+
/** * Value of the wallet balance of the token. */
|
|
31
|
+
balance_quote: number;
|
|
32
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
33
|
+
pretty_balance_quote: string;
|
|
34
|
+
/** * Total amount at risk across all spenders. */
|
|
35
|
+
value_at_risk: string;
|
|
36
|
+
/** * Value of total amount at risk across all spenders. */
|
|
37
|
+
value_at_risk_quote: number;
|
|
38
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
39
|
+
pretty_value_at_risk_quote: string;
|
|
40
|
+
/** * Contracts with non-zero approvals for this token. */
|
|
41
|
+
spenders: TokenSpenderItem[];
|
|
42
|
+
}
|
|
43
|
+
export interface TokenSpenderItem {
|
|
44
|
+
/** * The height of the block. */
|
|
45
|
+
block_height: number;
|
|
46
|
+
/** * The offset is the position of the tx in the block. */
|
|
47
|
+
tx_offset: number;
|
|
48
|
+
log_offset: number;
|
|
49
|
+
/** * The block signed timestamp in UTC. */
|
|
50
|
+
block_signed_at: Date;
|
|
51
|
+
/** * Most recent transaction that updated approval amounts for the token. */
|
|
52
|
+
tx_hash: string;
|
|
53
|
+
/** * Address of the contract with approval for the token. */
|
|
54
|
+
spender_address: string;
|
|
55
|
+
/** * Name of the contract with approval for the token. */
|
|
56
|
+
spender_address_label: string;
|
|
57
|
+
/** * Remaining number of tokens granted to the spender by the approval. */
|
|
58
|
+
allowance: string;
|
|
59
|
+
/** * Value of the remaining allowance specified by the approval. */
|
|
60
|
+
allowance_quote: number;
|
|
61
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
62
|
+
pretty_allowance_quote: string;
|
|
63
|
+
/** * Amount at risk for spender. */
|
|
64
|
+
value_at_risk: string;
|
|
65
|
+
/** * Value of amount at risk for spender. */
|
|
66
|
+
value_at_risk_quote: number;
|
|
67
|
+
/** * A prettier version of the quote for rendering purposes. */
|
|
68
|
+
pretty_value_at_risk_quote: string;
|
|
69
|
+
risk_factor: string;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityServiceTypes.js","sourceRoot":"","sources":["../../../src/util/types/SecurityServiceTypes.ts"],"names":[],"mappings":""}
|