@leather.io/analytics 3.15.8 → 3.16.1
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/dist/index.d.ts +370 -312
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +56 -50
- package/dist/index.js.map +1 -1
- package/package.json +14 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,357 +1,415 @@
|
|
|
1
|
-
import { DefaultNetworkConfigurations, StxBalance
|
|
1
|
+
import { CryptoAssetProtocol, DefaultNetworkConfigurations, StxBalance } from "@leather.io/models";
|
|
2
2
|
|
|
3
|
+
//#region src/events.d.ts
|
|
3
4
|
interface Events extends HistoricalEvents {
|
|
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
|
-
|
|
5
|
+
balance_updated: {
|
|
6
|
+
walletAccountId: string;
|
|
7
|
+
platform: 'mobile' | 'extension';
|
|
8
|
+
stxAvailableBalance: number;
|
|
9
|
+
stxLockedBalance: number;
|
|
10
|
+
usdBalance: number;
|
|
11
|
+
btcBalance: number;
|
|
12
|
+
};
|
|
13
|
+
user_setting_updated: UserSettingValue;
|
|
14
|
+
wallet_created: WalletCreatedValue;
|
|
15
|
+
wallet_restored: WalletCreatedValue;
|
|
16
|
+
app_unlocked: undefined;
|
|
17
|
+
app_locked: undefined;
|
|
18
|
+
submit_feature_waitlist: SubmitWaitlist;
|
|
19
|
+
legacy_request_initiated: {
|
|
20
|
+
method: string;
|
|
21
|
+
};
|
|
22
|
+
application_first_opened: {
|
|
23
|
+
timestamp: string;
|
|
24
|
+
};
|
|
25
|
+
pooled_stacking_started: {
|
|
26
|
+
amount: number;
|
|
27
|
+
provider: string;
|
|
28
|
+
poolAddress: string;
|
|
29
|
+
delegationDurationType?: string;
|
|
30
|
+
numberOfCycles: number;
|
|
31
|
+
};
|
|
32
|
+
liquid_stacking_started: {
|
|
33
|
+
amount: number;
|
|
34
|
+
provider?: string;
|
|
35
|
+
};
|
|
36
|
+
liquid_stacking_increased: {
|
|
37
|
+
amount: number;
|
|
38
|
+
};
|
|
39
|
+
stx_balance_updated: StxBalance;
|
|
40
|
+
in_app_browser_opened: {
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
add_wallet_sheet_opened: undefined;
|
|
44
|
+
browser_sheet_opened: undefined;
|
|
45
|
+
send_sheet_opened: {
|
|
46
|
+
asset?: string;
|
|
47
|
+
};
|
|
48
|
+
send_sheet_dismissed: undefined;
|
|
49
|
+
swap_sheet_opened: {
|
|
50
|
+
asset?: string;
|
|
51
|
+
};
|
|
52
|
+
swap_sheet_dismissed: undefined;
|
|
53
|
+
swap_base_asset_selected: {
|
|
54
|
+
symbol: string;
|
|
55
|
+
protocol: string;
|
|
56
|
+
};
|
|
57
|
+
swap_target_asset_selected: {
|
|
58
|
+
symbol: string;
|
|
59
|
+
protocol: string;
|
|
60
|
+
};
|
|
61
|
+
swap_amount_preset_selected: {
|
|
62
|
+
preset: '25%' | '50%' | '75%' | 'max';
|
|
63
|
+
};
|
|
64
|
+
swap_assets_flipped: undefined;
|
|
65
|
+
swap_currency_mode_toggled: {
|
|
66
|
+
mode: 'crypto' | 'quote';
|
|
67
|
+
};
|
|
68
|
+
swap_slippage_changed: {
|
|
69
|
+
slippage: number;
|
|
70
|
+
};
|
|
71
|
+
swap_fee_tier_selected: {
|
|
72
|
+
tier: string;
|
|
73
|
+
};
|
|
74
|
+
swap_custom_fee_entered: {
|
|
75
|
+
fee: number;
|
|
76
|
+
};
|
|
77
|
+
swap_review_initiated: {
|
|
78
|
+
baseSymbol: string;
|
|
79
|
+
targetSymbol: string;
|
|
80
|
+
baseAmount: number;
|
|
81
|
+
provider: string;
|
|
82
|
+
};
|
|
83
|
+
swap_execution_started: {
|
|
84
|
+
baseSymbol: string;
|
|
85
|
+
targetSymbol: string;
|
|
86
|
+
baseAmount: number;
|
|
87
|
+
targetAmount: number;
|
|
88
|
+
provider: string;
|
|
89
|
+
};
|
|
90
|
+
swap_execution_success: {
|
|
91
|
+
baseSymbol: string;
|
|
92
|
+
targetSymbol: string;
|
|
93
|
+
baseAmount: number;
|
|
94
|
+
targetAmount: number;
|
|
95
|
+
provider: string;
|
|
96
|
+
};
|
|
97
|
+
swap_execution_failure: {
|
|
98
|
+
baseSymbol: string;
|
|
99
|
+
targetSymbol: string;
|
|
100
|
+
errorMessage: string;
|
|
101
|
+
provider: string;
|
|
102
|
+
};
|
|
103
|
+
receive_sheet_opened: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
receive_sheet_dismissed: undefined;
|
|
107
|
+
send_asset_selected: {
|
|
108
|
+
asset?: string;
|
|
109
|
+
};
|
|
110
|
+
send_account_selected: undefined;
|
|
111
|
+
send_back_button_pressed: {
|
|
112
|
+
screen: string;
|
|
113
|
+
};
|
|
114
|
+
send_inline_asset_picker_opened: undefined;
|
|
115
|
+
send_max_selected: undefined;
|
|
116
|
+
send_amount_entered: {
|
|
117
|
+
amount: string;
|
|
118
|
+
};
|
|
119
|
+
send_recipient_sheet_opened: undefined;
|
|
120
|
+
send_recipient_selected: {
|
|
121
|
+
type: 'internal' | 'external';
|
|
122
|
+
};
|
|
123
|
+
send_qr_scanner_opened: {
|
|
124
|
+
source: 'toggle' | 'input';
|
|
125
|
+
};
|
|
126
|
+
send_transaction_review_initiated: {
|
|
127
|
+
asset: string;
|
|
128
|
+
amount: number;
|
|
129
|
+
};
|
|
130
|
+
token_details_opened: {
|
|
131
|
+
assetId: string;
|
|
132
|
+
source: 'all_account_balances' | 'account_balances';
|
|
133
|
+
};
|
|
134
|
+
receive_address_copied: {
|
|
135
|
+
asset: string;
|
|
136
|
+
location: string;
|
|
137
|
+
};
|
|
138
|
+
receive_share_button_pressed: {
|
|
139
|
+
asset: string;
|
|
140
|
+
};
|
|
141
|
+
token_portfolio_summary: TokenPortfolioSummary;
|
|
142
|
+
collectibles_summary: CollectiblesSummary;
|
|
143
|
+
token_details_viewed: TokenCollectibleDetailsViewed;
|
|
144
|
+
collectible_details_viewed: TokenCollectibleDetailsViewed;
|
|
94
145
|
}
|
|
95
146
|
interface HistoricalEvents {
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
147
|
+
add_network: undefined;
|
|
148
|
+
bitcoin_rbf_fee_increase_error: {
|
|
149
|
+
outputDiff: number;
|
|
150
|
+
};
|
|
151
|
+
broadcast_retrieve_taproot_to_native_segwit: undefined;
|
|
152
|
+
broadcast_ordinal_transaction: undefined;
|
|
153
|
+
broadcast_ordinal_error: {
|
|
154
|
+
error: any;
|
|
155
|
+
};
|
|
156
|
+
broadcast_transaction: {
|
|
157
|
+
symbol: string;
|
|
158
|
+
amount?: number;
|
|
159
|
+
fee?: number;
|
|
160
|
+
inputs?: number;
|
|
161
|
+
outputs?: number;
|
|
162
|
+
};
|
|
163
|
+
broadcast_btc_error: {
|
|
164
|
+
error: any;
|
|
165
|
+
};
|
|
166
|
+
copy_btc_address_to_clipboard: {
|
|
167
|
+
type: string;
|
|
168
|
+
};
|
|
169
|
+
copy_secret_key_to_clipboard: undefined;
|
|
170
|
+
copy_address_to_add_new_inscription: undefined;
|
|
171
|
+
copy_stx_address_to_clipboard: undefined;
|
|
172
|
+
copy_recipient_bns_address_to_clipboard: undefined;
|
|
173
|
+
create_new_account: undefined;
|
|
174
|
+
change_network: {
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
177
|
+
click_open_in_new_tab_menu_item: undefined;
|
|
178
|
+
click_change_network_menu_item: undefined;
|
|
179
|
+
click_change_theme_menu_item: undefined;
|
|
180
|
+
click_toggle_privacy: undefined;
|
|
181
|
+
request_psbt_cancel: undefined;
|
|
182
|
+
request_sign_psbt_submit: undefined;
|
|
183
|
+
request_update_profile_submit: undefined;
|
|
184
|
+
request_update_profile_cancel: undefined;
|
|
185
|
+
request_signature_cancel: undefined;
|
|
186
|
+
requesting_origin_tab_closed_with_pending_action: undefined;
|
|
187
|
+
select_add_new_collectible: undefined;
|
|
188
|
+
select_buy_option: {
|
|
189
|
+
provider: string;
|
|
190
|
+
};
|
|
191
|
+
select_theme: {
|
|
192
|
+
theme: string;
|
|
193
|
+
};
|
|
194
|
+
select_inscription_to_add_new_collectible: undefined;
|
|
195
|
+
select_maximum_amount_for_send: undefined;
|
|
196
|
+
submit_valid_password: undefined;
|
|
197
|
+
submit_invalid_password: undefined;
|
|
198
|
+
submit_fee_for_transaction: {
|
|
199
|
+
calculation: string;
|
|
200
|
+
fee: number | string;
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
user_approved_send_transfer: {
|
|
204
|
+
origin: string;
|
|
205
|
+
};
|
|
206
|
+
user_approved_sign_and_broadcast_psbt: {
|
|
207
|
+
origin: string;
|
|
208
|
+
};
|
|
209
|
+
user_clicked_feedback_button: undefined;
|
|
210
|
+
unable_to_read_fee_in_stx_validator: undefined;
|
|
211
|
+
unable_to_read_available_balance_in_stx_validator: undefined;
|
|
212
|
+
view_bitcoin_transaction: undefined;
|
|
213
|
+
view_transaction: undefined;
|
|
214
|
+
view_collectibles: {
|
|
215
|
+
ordinals_count?: number;
|
|
216
|
+
stamps_count?: number;
|
|
217
|
+
stacks_nfts_count?: number;
|
|
218
|
+
};
|
|
219
|
+
view_rpc_send_transfer_confirmation: {
|
|
220
|
+
symbol: string;
|
|
221
|
+
};
|
|
222
|
+
view_rpc_sign_and_broadcast_psbt_confirmation: {
|
|
223
|
+
symbol: string;
|
|
224
|
+
};
|
|
225
|
+
view_transaction_confirmation: {
|
|
226
|
+
symbol: string;
|
|
227
|
+
};
|
|
228
|
+
view_transaction_signing: undefined;
|
|
229
|
+
view_transaction_signing_error: {
|
|
230
|
+
reason: string;
|
|
231
|
+
};
|
|
232
|
+
start_unlock: undefined;
|
|
233
|
+
complete_unlock: {
|
|
234
|
+
durationMs: number;
|
|
235
|
+
};
|
|
236
|
+
background_analytics_schema_fail: undefined;
|
|
237
|
+
new_brand_reveal_name: undefined;
|
|
238
|
+
new_brand_accept_terms: undefined;
|
|
239
|
+
new_brand_reject_terms: undefined;
|
|
240
|
+
lock_session: undefined;
|
|
241
|
+
remove_network: undefined;
|
|
242
|
+
generate_new_secret_key: undefined;
|
|
243
|
+
bitcoin_contract_error: {
|
|
244
|
+
msg: string;
|
|
245
|
+
};
|
|
246
|
+
ordinals_dot_com_unavailable: {
|
|
247
|
+
error: any;
|
|
248
|
+
};
|
|
249
|
+
schema_fail: {
|
|
250
|
+
query: any;
|
|
251
|
+
hash: string;
|
|
252
|
+
error: string;
|
|
253
|
+
};
|
|
254
|
+
request_signature_cannot_sign_message_no_account: undefined;
|
|
255
|
+
request_signature_sign: {
|
|
256
|
+
type: 'software' | 'ledger';
|
|
257
|
+
};
|
|
258
|
+
switch_account: {
|
|
259
|
+
index: number;
|
|
260
|
+
hasStxBalance: boolean;
|
|
261
|
+
};
|
|
262
|
+
non_compliant_entity_detected: {
|
|
263
|
+
address: string | string[];
|
|
264
|
+
};
|
|
265
|
+
ledger_transaction_publish_error: {
|
|
266
|
+
error: {
|
|
267
|
+
message: string;
|
|
268
|
+
error: any;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
native_segwit_tx_hex_to_ledger_tx: {
|
|
272
|
+
success: boolean;
|
|
273
|
+
};
|
|
274
|
+
psbt_sign_request_p2tr_missing_taproot_internal_key: undefined;
|
|
275
|
+
ledger_nativesegwit_add_nonwitnessutxo: {
|
|
276
|
+
action: 'add_nonwitness_utxo' | 'skip_add_nonwitness_utxo';
|
|
277
|
+
};
|
|
278
|
+
submit_invalid_secret_key: undefined;
|
|
279
|
+
submit_valid_secret_key: undefined;
|
|
280
|
+
increase_fee_transaction: {
|
|
281
|
+
symbol: string;
|
|
282
|
+
txid: string;
|
|
283
|
+
};
|
|
284
|
+
finalize_tx_signature_error_thrown: {
|
|
285
|
+
data: unknown;
|
|
286
|
+
};
|
|
287
|
+
auth_response_with_illegal_redirect_uri: undefined;
|
|
288
|
+
redux_persist_migration_to_no_serialization: undefined;
|
|
289
|
+
sign_out: undefined;
|
|
290
|
+
ledger_app_version_info: {
|
|
291
|
+
info: object;
|
|
292
|
+
};
|
|
293
|
+
ledger_transaction_signed_approved: undefined;
|
|
294
|
+
ledger_transaction_signed_rejected: undefined;
|
|
295
|
+
ledger_message_signed_approved: undefined;
|
|
296
|
+
ledger_message_signed_rejected: undefined;
|
|
297
|
+
ledger_public_keys_pulled_from_device: undefined;
|
|
298
|
+
user_clicked_requested_by_link: {
|
|
299
|
+
endpoint: string;
|
|
300
|
+
};
|
|
301
|
+
user_approved_get_addresses: {
|
|
302
|
+
origin: string;
|
|
303
|
+
};
|
|
304
|
+
user_approved_message_signing: {
|
|
305
|
+
origin: string;
|
|
306
|
+
};
|
|
256
307
|
}
|
|
257
308
|
type EventName = keyof Events;
|
|
258
309
|
type UserSettingValue = {
|
|
259
|
-
|
|
310
|
+
account_display: 'stacks' | 'native-segwit' | 'taproot' | 'bns';
|
|
260
311
|
} | {
|
|
261
|
-
|
|
312
|
+
analytics: 'consent-given' | 'rejects-tracking';
|
|
262
313
|
} | {
|
|
263
|
-
|
|
314
|
+
bitcoin_unit: 'bitcoin' | 'satoshi';
|
|
264
315
|
} | {
|
|
265
|
-
|
|
316
|
+
email_address: string;
|
|
266
317
|
} | {
|
|
267
|
-
|
|
318
|
+
fiat_currency: string;
|
|
268
319
|
} | {
|
|
269
|
-
|
|
320
|
+
quote_currency: string;
|
|
270
321
|
} | {
|
|
271
|
-
|
|
322
|
+
network: DefaultNetworkConfigurations;
|
|
272
323
|
} | {
|
|
273
|
-
|
|
324
|
+
privacy_mode: 'hidden' | 'visible';
|
|
274
325
|
} | {
|
|
275
|
-
|
|
326
|
+
haptics: 'disabled' | 'enabled';
|
|
276
327
|
} | {
|
|
277
|
-
|
|
328
|
+
theme: 'light' | 'dark' | 'system';
|
|
278
329
|
} | {
|
|
279
|
-
|
|
330
|
+
language: string;
|
|
280
331
|
} | {
|
|
281
|
-
|
|
332
|
+
security_level: 'insecure' | 'secure' | 'not-selected';
|
|
282
333
|
} | {
|
|
283
|
-
|
|
334
|
+
notifications: 'disabled' | 'enabled' | 'not-selected';
|
|
284
335
|
};
|
|
285
336
|
interface WalletCreatedValue {
|
|
286
|
-
|
|
337
|
+
type: 'software' | 'ledger';
|
|
287
338
|
}
|
|
288
339
|
interface SubmitWaitlist {
|
|
289
|
-
|
|
340
|
+
feature: string;
|
|
290
341
|
}
|
|
291
342
|
interface TokenPortfolioSummary {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
343
|
+
walletAccountId: string;
|
|
344
|
+
platform: 'mobile' | 'extension';
|
|
345
|
+
sip10TokenCount: number;
|
|
346
|
+
runeTokenCount: number;
|
|
347
|
+
totalTokenCount: number;
|
|
348
|
+
sip10TokenValue: number;
|
|
349
|
+
runeTokenValue: number;
|
|
350
|
+
totalTokenValue: number;
|
|
351
|
+
fiatCurrency?: string;
|
|
301
352
|
}
|
|
302
353
|
interface CollectiblesSummary {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
354
|
+
walletAccountId: string;
|
|
355
|
+
platform: 'mobile' | 'extension';
|
|
356
|
+
totalCollectibles: number;
|
|
357
|
+
byProtocol: Partial<Record<CryptoAssetProtocol, CollectibleProtocolBreakdown>>;
|
|
307
358
|
}
|
|
308
359
|
interface TokenCollectibleDetailsViewed {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
360
|
+
assetId: string;
|
|
361
|
+
protocol: CryptoAssetProtocol;
|
|
362
|
+
platform: 'mobile' | 'extension';
|
|
363
|
+
walletAccountId: string;
|
|
313
364
|
}
|
|
314
365
|
interface CollectibleProtocolBreakdown {
|
|
315
|
-
|
|
316
|
-
|
|
366
|
+
total: number;
|
|
367
|
+
byContentType?: Record<string, number>;
|
|
317
368
|
}
|
|
318
|
-
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/types.d.ts
|
|
319
371
|
interface DefaultProperties {
|
|
320
|
-
|
|
321
|
-
|
|
372
|
+
platform: 'web' | 'extension' | 'mobile' | 'earn';
|
|
373
|
+
[key: string]: JsonValue;
|
|
322
374
|
}
|
|
323
375
|
interface AnalyticsClientInterface {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
376
|
+
screen(name: string, ...args: any[]): Promise<any>;
|
|
377
|
+
track(event: string, ...args: any[]): Promise<any>;
|
|
378
|
+
group(groupId: string, traits?: any, ...args: any[]): Promise<any>;
|
|
379
|
+
identify(...args: any[]): Promise<any>;
|
|
380
|
+
page?(category?: string, name?: string, ...args: any[]): Promise<any>;
|
|
329
381
|
}
|
|
330
382
|
interface AnalyticsClientConfig<T extends AnalyticsClientInterface> {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
383
|
+
client: T;
|
|
384
|
+
defaultProperties?: DefaultProperties;
|
|
385
|
+
defaultTraits?: JsonMap;
|
|
334
386
|
}
|
|
335
387
|
type JsonList = JsonValue[];
|
|
336
388
|
type JsonValue = boolean | number | string | undefined | null | JsonList | JsonMap | Error;
|
|
337
389
|
interface JsonMap {
|
|
338
|
-
|
|
339
|
-
|
|
390
|
+
[key: string]: JsonValue;
|
|
391
|
+
[index: number]: JsonValue;
|
|
340
392
|
}
|
|
341
393
|
type OptionalIfUndefined<T> = T extends undefined ? undefined : T;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/index.d.ts
|
|
396
|
+
declare function configureAnalyticsClient<T extends AnalyticsClientInterface>({
|
|
397
|
+
client,
|
|
398
|
+
defaultProperties,
|
|
399
|
+
defaultTraits
|
|
400
|
+
}: {
|
|
401
|
+
client: T;
|
|
402
|
+
defaultProperties: DefaultProperties;
|
|
403
|
+
defaultTraits?: JsonMap;
|
|
347
404
|
}): {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
405
|
+
track<K extends keyof Events>(event: K, ...[properties]: Events[K] extends undefined ? [] : [Events[K]]): Promise<any>;
|
|
406
|
+
untypedTrack(event: string, properties?: JsonMap | Record<string, unknown>): Promise<any>;
|
|
407
|
+
screen(name: string, properties?: JsonMap | Record<string, unknown>): Promise<any>;
|
|
408
|
+
group(groupId: string, traits?: JsonMap | Record<string, unknown>): Promise<any>;
|
|
409
|
+
identify(userId?: string, traits?: JsonMap | Record<string, unknown>): Promise<any>;
|
|
410
|
+
page(category?: string, name?: string, properties?: JsonMap | Record<string, unknown>): Promise<any>;
|
|
411
|
+
readonly client: T;
|
|
355
412
|
};
|
|
356
|
-
|
|
357
|
-
export {
|
|
413
|
+
//#endregion
|
|
414
|
+
export { AnalyticsClientConfig, AnalyticsClientInterface, DefaultProperties, EventName, Events, JsonList, JsonMap, JsonValue, OptionalIfUndefined, configureAnalyticsClient };
|
|
415
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/events.ts","../src/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;UAIiB,MAAA,SAAe;;IAAf,e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AA,SAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,SAAA,CAAA,GAAA,CAAA;EACA,QAAA,CAAA,MAAA,CAAA,EAAA,MAAA,EAAA,MAAA,CAAA,SAAA,SAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,SAAA,CAAA,GAAA,CAAA;EACM,IAAA,CAAA,QAAA,CAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,UAAA,CAAA,SAAA,SAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,SAAA,CAAA,GAAA,CAAA;EA3FE,SAAA,MAAA,GAAA;CAAgB"}
|
package/dist/index.js
CHANGED
|
@@ -1,55 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/client.ts
|
|
2
2
|
function AnalyticsClient(config) {
|
|
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
|
-
|
|
3
|
+
const { client: analyticsClient, defaultProperties = {}, defaultTraits = {} } = config;
|
|
4
|
+
return {
|
|
5
|
+
async track(event, ...[properties]) {
|
|
6
|
+
return analyticsClient.track(event, {
|
|
7
|
+
...properties,
|
|
8
|
+
...defaultProperties
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
async untypedTrack(event, properties) {
|
|
12
|
+
if (event.match(/^[a-zA-Z0-9\s][a-zA-Z0-9\s]*$/)) throw new Error("Event must be snake_case");
|
|
13
|
+
return analyticsClient.track(event, {
|
|
14
|
+
...properties,
|
|
15
|
+
...defaultProperties
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
async screen(name, properties) {
|
|
19
|
+
return analyticsClient.screen(name, {
|
|
20
|
+
...properties,
|
|
21
|
+
...defaultProperties
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
group(groupId, traits) {
|
|
25
|
+
return analyticsClient.group(groupId, {
|
|
26
|
+
...traits,
|
|
27
|
+
...defaultTraits
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
async identify(userId, traits) {
|
|
31
|
+
return await analyticsClient.identify(userId, {
|
|
32
|
+
...traits,
|
|
33
|
+
...defaultTraits
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
page(category, name, properties) {
|
|
37
|
+
if (typeof analyticsClient.page === "function") return analyticsClient.page(category, name, {
|
|
38
|
+
...properties,
|
|
39
|
+
...defaultProperties
|
|
40
|
+
});
|
|
41
|
+
return Promise.resolve();
|
|
42
|
+
},
|
|
43
|
+
get client() {
|
|
44
|
+
return analyticsClient;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
42
47
|
}
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/index.ts
|
|
51
|
+
function configureAnalyticsClient({ client, defaultProperties, defaultTraits }) {
|
|
52
|
+
return AnalyticsClient({
|
|
53
|
+
client,
|
|
54
|
+
defaultProperties,
|
|
55
|
+
defaultTraits
|
|
56
|
+
});
|
|
51
57
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { configureAnalyticsClient };
|
|
55
61
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts","../src/index.ts"],"sourcesContent":["import { AnalyticsClientConfig, AnalyticsClientInterface, Events, JsonMap } from './types';\n\nexport function AnalyticsClient<T extends AnalyticsClientInterface>(\n config: AnalyticsClientConfig<T>\n) {\n const { client: analyticsClient, defaultProperties = {}, defaultTraits = {} } = config;\n\n return {\n async track<K extends keyof Events>(\n event: K,\n ...[properties]: Events[K] extends undefined ? [] : [Events[K]]\n ) {\n return analyticsClient.track(event, { ...properties, ...defaultProperties });\n },\n\n async untypedTrack(event: string, properties?: JsonMap | Record<string, unknown>) {\n if (event.match(/^[a-zA-Z0-9\\s][a-zA-Z0-9\\s]*$/)) {\n throw new Error('Event must be snake_case');\n }\n return analyticsClient.track(event as any, {\n ...properties,\n ...defaultProperties,\n });\n },\n\n async screen(name: string, properties?: JsonMap | Record<string, unknown>) {\n return analyticsClient.screen(name, { ...properties, ...defaultProperties });\n },\n\n group(groupId: string, traits?: JsonMap | Record<string, unknown>) {\n return analyticsClient.group(groupId, { ...traits, ...defaultTraits });\n },\n\n async identify(userId?: string, traits?: JsonMap | Record<string, unknown>) {\n return await analyticsClient.identify(userId, {\n ...traits,\n ...defaultTraits,\n });\n },\n\n page(category?: string, name?: string, properties?: JsonMap | Record<string, unknown>) {\n if (typeof analyticsClient.page === 'function') {\n return analyticsClient.page(category, name, {\n ...properties,\n ...defaultProperties,\n });\n }\n return Promise.resolve();\n },\n\n get client() {\n return analyticsClient;\n },\n };\n}\n","import { AnalyticsClient } from './client';\nimport { AnalyticsClientInterface, DefaultProperties, JsonMap } from './types';\n\nexport * from './types';\n\nexport function configureAnalyticsClient<T extends AnalyticsClientInterface>({\n client,\n defaultProperties,\n defaultTraits,\n}: {\n client: T;\n defaultProperties: DefaultProperties;\n defaultTraits?: JsonMap;\n}) {\n return AnalyticsClient<T>({ client, defaultProperties, defaultTraits });\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/client.ts","../src/index.ts"],"sourcesContent":["import { AnalyticsClientConfig, AnalyticsClientInterface, Events, JsonMap } from './types';\n\nexport function AnalyticsClient<T extends AnalyticsClientInterface>(\n config: AnalyticsClientConfig<T>\n) {\n const { client: analyticsClient, defaultProperties = {}, defaultTraits = {} } = config;\n\n return {\n async track<K extends keyof Events>(\n event: K,\n ...[properties]: Events[K] extends undefined ? [] : [Events[K]]\n ) {\n return analyticsClient.track(event, { ...properties, ...defaultProperties });\n },\n\n async untypedTrack(event: string, properties?: JsonMap | Record<string, unknown>) {\n if (event.match(/^[a-zA-Z0-9\\s][a-zA-Z0-9\\s]*$/)) {\n throw new Error('Event must be snake_case');\n }\n return analyticsClient.track(event as any, {\n ...properties,\n ...defaultProperties,\n });\n },\n\n async screen(name: string, properties?: JsonMap | Record<string, unknown>) {\n return analyticsClient.screen(name, { ...properties, ...defaultProperties });\n },\n\n group(groupId: string, traits?: JsonMap | Record<string, unknown>) {\n return analyticsClient.group(groupId, { ...traits, ...defaultTraits });\n },\n\n async identify(userId?: string, traits?: JsonMap | Record<string, unknown>) {\n return await analyticsClient.identify(userId, {\n ...traits,\n ...defaultTraits,\n });\n },\n\n page(category?: string, name?: string, properties?: JsonMap | Record<string, unknown>) {\n if (typeof analyticsClient.page === 'function') {\n return analyticsClient.page(category, name, {\n ...properties,\n ...defaultProperties,\n });\n }\n return Promise.resolve();\n },\n\n get client() {\n return analyticsClient;\n },\n };\n}\n","import { AnalyticsClient } from './client';\nimport { AnalyticsClientInterface, DefaultProperties, JsonMap } from './types';\n\nexport * from './types';\n\nexport function configureAnalyticsClient<T extends AnalyticsClientInterface>({\n client,\n defaultProperties,\n defaultTraits,\n}: {\n client: T;\n defaultProperties: DefaultProperties;\n defaultTraits?: JsonMap;\n}) {\n return AnalyticsClient<T>({ client, defaultProperties, defaultTraits });\n}\n"],"mappings":";AAEA,SAAgB,gBACd,QACA;CACA,MAAM,EAAE,QAAQ,iBAAiB,oBAAoB,EAAE,EAAE,gBAAgB,EAAE,KAAK;AAEhF,QAAO;EACL,MAAM,MACJ,OACA,GAAG,CAAC,aACJ;AACA,UAAO,gBAAgB,MAAM,OAAO;IAAE,GAAG;IAAY,GAAG;IAAmB,CAAC;;EAG9E,MAAM,aAAa,OAAe,YAAgD;AAChF,OAAI,MAAM,MAAM,gCAAgC,CAC9C,OAAM,IAAI,MAAM,2BAA2B;AAE7C,UAAO,gBAAgB,MAAM,OAAc;IACzC,GAAG;IACH,GAAG;IACJ,CAAC;;EAGJ,MAAM,OAAO,MAAc,YAAgD;AACzE,UAAO,gBAAgB,OAAO,MAAM;IAAE,GAAG;IAAY,GAAG;IAAmB,CAAC;;EAG9E,MAAM,SAAiB,QAA4C;AACjE,UAAO,gBAAgB,MAAM,SAAS;IAAE,GAAG;IAAQ,GAAG;IAAe,CAAC;;EAGxE,MAAM,SAAS,QAAiB,QAA4C;AAC1E,UAAO,MAAM,gBAAgB,SAAS,QAAQ;IAC5C,GAAG;IACH,GAAG;IACJ,CAAC;;EAGJ,KAAK,UAAmB,MAAe,YAAgD;AACrF,OAAI,OAAO,gBAAgB,SAAS,WAClC,QAAO,gBAAgB,KAAK,UAAU,MAAM;IAC1C,GAAG;IACH,GAAG;IACJ,CAAC;AAEJ,UAAO,QAAQ,SAAS;;EAG1B,IAAI,SAAS;AACX,UAAO;;EAEV;;;;;AChDH,SAAgB,yBAA6D,EAC3E,QACA,mBACA,iBAKC;AACD,QAAO,gBAAmB;EAAE;EAAQ;EAAmB;EAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@leather.io/analytics",
|
|
3
3
|
"author": "Leather.io contact@leather.io",
|
|
4
4
|
"description": "Analytics package for Leather using Segment",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.16.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/leather.io/mono/tree/dev/packages/analytics",
|
|
8
8
|
"repository": {
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
"@types/node": "24.0.8",
|
|
23
23
|
"concurrently": "8.2.2",
|
|
24
24
|
"prettier": "3.5.1",
|
|
25
|
-
"
|
|
26
|
-
"typescript": "5.
|
|
25
|
+
"tsdown": "0.16.5",
|
|
26
|
+
"typescript": "5.9.3",
|
|
27
27
|
"vitest": "2.1.9",
|
|
28
|
-
"@leather.io/models": "0.50.
|
|
28
|
+
"@leather.io/models": "0.50.2",
|
|
29
|
+
"@leather.io/test-config": "0.1.2",
|
|
30
|
+
"@leather.io/prettier-config": "0.9.0"
|
|
29
31
|
},
|
|
30
32
|
"files": [
|
|
31
33
|
"dist"
|
|
@@ -35,14 +37,18 @@
|
|
|
35
37
|
"leather",
|
|
36
38
|
"leather wallet"
|
|
37
39
|
],
|
|
40
|
+
"prettier": "@leather.io/prettier-config",
|
|
38
41
|
"publishConfig": {
|
|
39
42
|
"access": "public"
|
|
40
43
|
},
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
41
45
|
"scripts": {
|
|
42
|
-
"build": "
|
|
43
|
-
"build:watch": "
|
|
44
|
-
"format": "prettier . --write
|
|
45
|
-
"format:check": "prettier . --check
|
|
46
|
+
"build": "tsdown",
|
|
47
|
+
"build:watch": "tsdown --watch",
|
|
48
|
+
"format": "prettier . --write --ignore-path ../../.prettierignore",
|
|
49
|
+
"format:check": "prettier . --check --ignore-path ../../.prettierignore",
|
|
50
|
+
"lint": "eslint --cache --max-warnings 0",
|
|
51
|
+
"lint:fix": "pnpm lint --fix",
|
|
46
52
|
"test": "vitest run",
|
|
47
53
|
"test:watch": "vitest watch",
|
|
48
54
|
"typecheck": "tsc --noEmit"
|