tauri-plugin-nostrnative 0.1.4 → 0.1.6

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.
Files changed (49) hide show
  1. package/LICENSE +21 -674
  2. package/README.md +5 -0
  3. package/dist-js/index.cjs +331 -71
  4. package/dist-js/index.d.ts +185 -5
  5. package/dist-js/index.js +299 -72
  6. package/package.json +1 -1
  7. package/permissions/autogenerated/allow-blossom-delete.toml +4 -0
  8. package/permissions/autogenerated/allow-blossom-list.toml +4 -0
  9. package/permissions/autogenerated/allow-blossom-upload.toml +4 -0
  10. package/permissions/autogenerated/commands/add_note_to_notebook.toml +13 -0
  11. package/permissions/autogenerated/commands/blossom_delete.toml +13 -0
  12. package/permissions/autogenerated/commands/blossom_list.toml +13 -0
  13. package/permissions/autogenerated/commands/compare_routstr_prices.toml +8 -0
  14. package/permissions/autogenerated/commands/create_note.toml +13 -0
  15. package/permissions/autogenerated/commands/create_notebook.toml +13 -0
  16. package/permissions/autogenerated/commands/delete_nfp_data.toml +9 -0
  17. package/permissions/autogenerated/commands/delete_note.toml +13 -0
  18. package/permissions/autogenerated/commands/delete_notebook.toml +13 -0
  19. package/permissions/autogenerated/commands/delete_virtual_fs.toml +12 -0
  20. package/permissions/autogenerated/commands/discover_routstr_providers.toml +8 -0
  21. package/permissions/autogenerated/commands/fetch_calendar_contact_lists.toml +13 -0
  22. package/permissions/autogenerated/commands/fetch_nfp_cycles.toml +9 -0
  23. package/permissions/autogenerated/commands/fetch_nfp_observations.toml +13 -0
  24. package/permissions/autogenerated/commands/fetch_nfp_settings.toml +9 -0
  25. package/permissions/autogenerated/commands/fetch_notebooks.toml +13 -0
  26. package/permissions/autogenerated/commands/fetch_notes.toml +13 -0
  27. package/permissions/autogenerated/commands/fetch_routstr_models.toml +8 -0
  28. package/permissions/autogenerated/commands/fetch_virtual_fs.toml +13 -0
  29. package/permissions/autogenerated/commands/get_nostr_event_counts.toml +4 -0
  30. package/permissions/autogenerated/commands/get_nostr_relay_events.toml +4 -0
  31. package/permissions/autogenerated/commands/get_nostr_relay_status.toml +4 -0
  32. package/permissions/autogenerated/commands/hex_to_npub.toml +13 -0
  33. package/permissions/autogenerated/commands/npub_to_hex.toml +13 -0
  34. package/permissions/autogenerated/commands/publish_calendar_contact_list.toml +13 -0
  35. package/permissions/autogenerated/commands/publish_nfp_cycle.toml +9 -0
  36. package/permissions/autogenerated/commands/publish_nfp_observation.toml +9 -0
  37. package/permissions/autogenerated/commands/publish_nfp_settings.toml +9 -0
  38. package/permissions/autogenerated/commands/publish_virtual_fs.toml +13 -0
  39. package/permissions/autogenerated/commands/remove_note_from_notebook.toml +13 -0
  40. package/permissions/autogenerated/commands/start_nostr_relay.toml +4 -0
  41. package/permissions/autogenerated/commands/stop_nostr_relay.toml +4 -0
  42. package/permissions/autogenerated/commands/update_nfp_cycle.toml +13 -0
  43. package/permissions/autogenerated/commands/update_nfp_observation.toml +13 -0
  44. package/permissions/autogenerated/commands/update_nfp_settings.toml +13 -0
  45. package/permissions/autogenerated/commands/update_note.toml +13 -0
  46. package/permissions/autogenerated/reference.md +1034 -131
  47. package/permissions/default.json +18 -0
  48. package/permissions/default.toml +35 -1
  49. package/permissions/schemas/schema.json +404 -2
package/dist-js/index.js CHANGED
@@ -1,253 +1,480 @@
1
1
  import { invoke } from '@tauri-apps/api/core';
2
2
 
3
3
  // Keys
4
+ async function hexToNpub(hex) {
5
+ return await invoke("plugin:nostrnative|hex_to_npub", { hex });
6
+ }
7
+ async function npubToHex(npub) {
8
+ return await invoke("plugin:nostrnative|npub_to_hex", { npub });
9
+ }
4
10
  async function generateNewNsec() {
5
- return await invoke('plugin:nostrnative|generate_new_nsec');
11
+ return await invoke("plugin:nostrnative|generate_new_nsec");
6
12
  }
7
13
  async function parsePubkey(pubkey) {
8
- return await invoke('plugin:nostrnative|parse_pubkey', { pubkey });
14
+ return await invoke("plugin:nostrnative|parse_pubkey", { pubkey });
9
15
  }
10
16
  async function verifyNsec(nsec) {
11
- return await invoke('plugin:nostrnative|verify_nsec', { nsec });
17
+ return await invoke("plugin:nostrnative|verify_nsec", { nsec });
12
18
  }
13
19
  // Calendar
14
20
  async function fetchCalendarEvents(pubkey, relays, options) {
15
- return await invoke('plugin:nostrnative|fetch_calendar_events', {
21
+ return await invoke("plugin:nostrnative|fetch_calendar_events", {
16
22
  pubkey,
17
23
  nsec: options?.nsec,
18
24
  relays,
19
25
  rangeStart: options?.rangeStart,
20
26
  rangeEnd: options?.rangeEnd,
21
27
  authors: options?.authors,
22
- clientNsec: options?.clientNsec
28
+ clientNsec: options?.clientNsec,
29
+ filters: options?.filters,
23
30
  });
24
31
  }
25
32
  async function publishBatchCalendarEvents(nsec, relays, events, clientNsec) {
26
- return await invoke('plugin:nostrnative|publish_batch_calendar_events', {
33
+ return await invoke("plugin:nostrnative|publish_batch_calendar_events", {
27
34
  nsec,
28
35
  relays,
29
36
  events,
30
- clientNsec
37
+ clientNsec,
31
38
  });
32
39
  }
40
+ // Relay
41
+ async function startNostrRelay(port, dbPath) {
42
+ return await invoke("plugin:nostrnative|start_nostr_relay", { port, dbPath });
43
+ }
44
+ async function stopNostrRelay() {
45
+ return await invoke("plugin:nostrnative|stop_nostr_relay");
46
+ }
47
+ async function getNostrRelayStatus() {
48
+ return await invoke("plugin:nostrnative|get_nostr_relay_status");
49
+ }
50
+ async function getNostrEventCounts() {
51
+ return await invoke("plugin:nostrnative|get_nostr_event_counts");
52
+ }
53
+ async function getNostrRelayEvents() {
54
+ return await invoke("plugin:nostrnative|get_nostr_relay_events");
55
+ }
33
56
  async function publishCalendarEvent(nsec, relays, eventData, clientNsec) {
34
- return await invoke('plugin:nostrnative|publish_calendar_event', {
57
+ return await invoke("plugin:nostrnative|publish_calendar_event", {
35
58
  nsec,
36
59
  relays,
37
60
  eventData,
38
- clientNsec
61
+ clientNsec,
39
62
  });
40
63
  }
41
64
  async function deleteCalendarEvent(nsec, relays, eventIds, clientNsec) {
42
- return await invoke('plugin:nostrnative|delete_calendar_event', {
65
+ return await invoke("plugin:nostrnative|delete_calendar_event", {
43
66
  nsec,
44
67
  relays,
45
68
  eventIds,
46
- clientNsec
69
+ clientNsec,
47
70
  });
48
71
  }
49
72
  async function fetchCalendars(pubkey, relays) {
50
- return await invoke('plugin:nostrnative|fetch_calendars', {
73
+ return await invoke("plugin:nostrnative|fetch_calendars", {
51
74
  pubkey,
52
- relays
75
+ relays,
53
76
  });
54
77
  }
55
78
  async function publishCalendar(nsec, relays, calendar, clientNsec) {
56
- return await invoke('plugin:nostrnative|publish_calendar', {
79
+ return await invoke("plugin:nostrnative|publish_calendar", {
57
80
  nsec,
58
81
  relays,
59
82
  calendar,
60
- clientNsec
83
+ clientNsec,
61
84
  });
62
85
  }
63
86
  async function deleteCalendar(nsec, relays, identifier, clientNsec) {
64
- return await invoke('plugin:nostrnative|delete_calendar', {
87
+ return await invoke("plugin:nostrnative|delete_calendar", {
65
88
  nsec,
66
89
  relays,
67
90
  identifier,
68
- clientNsec
91
+ clientNsec,
92
+ });
93
+ }
94
+ async function fetchCalendarContactLists(pubkey, relays, options) {
95
+ return await invoke("plugin:nostrnative|fetch_calendar_contact_lists", {
96
+ pubkey,
97
+ relays,
98
+ nsec: options?.nsec,
99
+ clientNsec: options?.clientNsec,
100
+ });
101
+ }
102
+ async function publishCalendarContactList(nsec, relays, request, clientNsec) {
103
+ return await invoke("plugin:nostrnative|publish_calendar_contact_list", {
104
+ nsec,
105
+ relays,
106
+ request,
107
+ clientNsec,
69
108
  });
70
109
  }
71
110
  // RSVP
72
111
  async function fetchRsvps(eventCoordinate, relays) {
73
- return await invoke('plugin:nostrnative|fetch_rsvps', {
112
+ return await invoke("plugin:nostrnative|fetch_rsvps", {
74
113
  eventCoordinate,
75
- relays
114
+ relays,
76
115
  });
77
116
  }
78
117
  async function fetchUserRsvps(pubkey, relays) {
79
- return await invoke('plugin:nostrnative|fetch_user_rsvps', {
118
+ return await invoke("plugin:nostrnative|fetch_user_rsvps", {
80
119
  pubkey,
81
- relays
120
+ relays,
82
121
  });
83
122
  }
84
123
  async function fetchReceivedRsvps(pubkey, relays) {
85
- return await invoke('plugin:nostrnative|fetch_received_rsvps', {
124
+ return await invoke("plugin:nostrnative|fetch_received_rsvps", {
86
125
  pubkey,
87
- relays
126
+ relays,
88
127
  });
89
128
  }
90
- async function publishRsvp(nsec, relays, eventCoordinate, status, eventAuthor, clientNsec) {
91
- return await invoke('plugin:nostrnative|publish_rsvp', {
129
+ async function publishRsvp(nsec, relays, eventCoordinate, status, eventAuthor, clientNsec, fb, content) {
130
+ return await invoke("plugin:nostrnative|publish_rsvp", {
92
131
  nsec,
93
132
  relays,
94
133
  eventCoordinate,
95
134
  status,
96
135
  eventAuthor,
97
- clientNsec
136
+ clientNsec,
137
+ fb,
138
+ content,
98
139
  });
99
140
  }
100
141
  // Profile
101
142
  async function fetchProfiles(pubkeys, relays) {
102
- return await invoke('plugin:nostrnative|fetch_profiles', { pubkeys, relays });
143
+ return await invoke("plugin:nostrnative|fetch_profiles", { pubkeys, relays });
103
144
  }
104
145
  async function fetchContactList(pubkey, relays) {
105
- return await invoke('plugin:nostrnative|fetch_contact_list', {
146
+ return await invoke("plugin:nostrnative|fetch_contact_list", {
106
147
  pubkey,
107
- relays
148
+ relays,
108
149
  });
109
150
  }
110
151
  async function updateContactList(nsec, relays, contacts, clientNsec) {
111
- return await invoke('plugin:nostrnative|update_contact_list', {
152
+ return await invoke("plugin:nostrnative|update_contact_list", {
112
153
  nsec,
113
154
  relays,
114
155
  contacts,
115
- clientNsec
156
+ clientNsec,
116
157
  });
117
158
  }
118
159
  // Messages
119
160
  async function sendDirectMessage(nsec, receiverPubkey, message, relays, clientNsec) {
120
- return await invoke('plugin:nostrnative|send_direct_message', {
161
+ return await invoke("plugin:nostrnative|send_direct_message", {
121
162
  nsec,
122
163
  receiverPubkey,
123
164
  message,
124
165
  relays,
125
- clientNsec
166
+ clientNsec,
126
167
  });
127
168
  }
128
169
  // Bookmarks
129
170
  async function fetchBookmarks(pubkey, relays, nsec, clientNsec) {
130
- return await invoke('plugin:nostrnative|fetch_bookmarks', {
171
+ return await invoke("plugin:nostrnative|fetch_bookmarks", {
131
172
  pubkey,
132
173
  nsec,
133
174
  relays,
134
- clientNsec
175
+ clientNsec,
135
176
  });
136
177
  }
137
178
  async function fetchEventDetails(identifiers, relays) {
138
- return await invoke('plugin:nostrnative|fetch_event_details', {
179
+ return await invoke("plugin:nostrnative|fetch_event_details", {
139
180
  identifiers,
140
- relays
181
+ relays,
141
182
  });
142
183
  }
143
184
  async function saveBookmark(nsec, relays, eventId, source, clientNsec) {
144
- return await invoke('plugin:nostrnative|save_bookmark', {
185
+ return await invoke("plugin:nostrnative|save_bookmark", {
145
186
  nsec,
146
187
  relays,
147
188
  eventId,
148
189
  source,
149
- clientNsec
190
+ clientNsec,
150
191
  });
151
192
  }
152
193
  async function removeBookmark(nsec, relays, eventId, source, clientNsec) {
153
- return await invoke('plugin:nostrnative|remove_bookmark', {
194
+ return await invoke("plugin:nostrnative|remove_bookmark", {
154
195
  nsec,
155
196
  relays,
156
197
  eventId,
157
198
  source,
158
- clientNsec
199
+ clientNsec,
200
+ });
201
+ }
202
+ // Notes
203
+ async function createNote(nsec, relays, note, clientNsec) {
204
+ return await invoke("plugin:nostrnative|create_note", {
205
+ nsec,
206
+ relays,
207
+ note,
208
+ clientNsec,
209
+ });
210
+ }
211
+ async function updateNote(nsec, relays, identifier, note, clientNsec) {
212
+ return await invoke("plugin:nostrnative|update_note", {
213
+ nsec,
214
+ relays,
215
+ identifier,
216
+ note,
217
+ clientNsec,
218
+ });
219
+ }
220
+ async function deleteNote(nsec, relays, noteId, clientNsec) {
221
+ return await invoke("plugin:nostrnative|delete_note", {
222
+ nsec,
223
+ relays,
224
+ noteId,
225
+ clientNsec,
226
+ });
227
+ }
228
+ async function fetchNotes(pubkey, relays, options) {
229
+ return await invoke("plugin:nostrnative|fetch_notes", {
230
+ pubkey,
231
+ relays,
232
+ nsec: options?.nsec,
233
+ note_type: options?.noteType,
234
+ clientNsec: options?.clientNsec,
235
+ });
236
+ }
237
+ async function createNotebook(nsec, relays, notebook, clientNsec) {
238
+ return await invoke("plugin:nostrnative|create_notebook", {
239
+ nsec,
240
+ relays,
241
+ notebook,
242
+ clientNsec,
243
+ });
244
+ }
245
+ async function fetchNotebooks(pubkey, relays, options) {
246
+ return await invoke("plugin:nostrnative|fetch_notebooks", {
247
+ pubkey,
248
+ relays,
249
+ nsec: options?.nsec,
250
+ clientNsec: options?.clientNsec,
251
+ });
252
+ }
253
+ async function addNoteToNotebook(nsec, relays, notebookId, noteId, clientNsec) {
254
+ return await invoke("plugin:nostrnative|add_note_to_notebook", {
255
+ nsec,
256
+ relays,
257
+ notebook_id: notebookId,
258
+ note_id: noteId,
259
+ clientNsec,
260
+ });
261
+ }
262
+ async function removeNoteFromNotebook(nsec, relays, notebookId, noteId, clientNsec) {
263
+ return await invoke("plugin:nostrnative|remove_note_from_notebook", {
264
+ nsec,
265
+ relays,
266
+ notebook_id: notebookId,
267
+ note_id: noteId,
268
+ clientNsec,
269
+ });
270
+ }
271
+ async function deleteNotebook(nsec, relays, notebookId, clientNsec) {
272
+ return await invoke("plugin:nostrnative|delete_notebook", {
273
+ nsec,
274
+ relays,
275
+ notebook_id: notebookId,
276
+ clientNsec,
159
277
  });
160
278
  }
161
279
  // Blossom
162
- async function blossomMirror(serverUrl, nsec, url, clientNsec) {
163
- return await invoke('plugin:nostrnative|blossom_mirror', {
280
+ async function blossomMirror(serverUrl, authHeader, url) {
281
+ return await invoke("plugin:nostrnative|blossom_mirror", {
164
282
  serverUrl,
165
- nsec,
283
+ authHeader,
166
284
  url,
167
- clientNsec
168
285
  });
169
286
  }
170
- async function blossomUpload(serverUrl, nsec, filePath, clientNsec) {
171
- return await invoke('plugin:nostrnative|blossom_upload', {
287
+ async function blossomUpload(serverUrl, authHeader, filePath) {
288
+ return await invoke("plugin:nostrnative|blossom_upload", {
172
289
  serverUrl,
173
- nsec,
290
+ authHeader,
174
291
  filePath,
175
- clientNsec
176
292
  });
177
293
  }
178
- async function blossomUploadContent(serverUrl, nsec, content, filename, mediaType, clientNsec) {
179
- return await invoke('plugin:nostrnative|blossom_upload_content', {
294
+ async function blossomUploadContent(serverUrl, authHeader, content, filename, mediaType) {
295
+ return await invoke("plugin:nostrnative|blossom_upload_content", {
180
296
  serverUrl,
181
- nsec,
297
+ authHeader,
182
298
  content,
183
299
  filename,
184
300
  mediaType,
185
- clientNsec
186
301
  });
187
302
  }
188
303
  async function blossomGetBlob(serverUrl, hash) {
189
- return await invoke('plugin:nostrnative|blossom_get_blob', {
304
+ return await invoke("plugin:nostrnative|blossom_get_blob", {
305
+ serverUrl,
306
+ hash,
307
+ });
308
+ }
309
+ async function blossomDelete(serverUrl, authHeader, hash) {
310
+ return await invoke("plugin:nostrnative|blossom_delete", {
311
+ serverUrl,
312
+ authHeader,
313
+ hash,
314
+ });
315
+ }
316
+ async function blossomList(serverUrl, pubkey, authHeader) {
317
+ return await invoke("plugin:nostrnative|blossom_list", {
190
318
  serverUrl,
191
- hash
319
+ pubkey,
320
+ authHeader,
192
321
  });
193
322
  }
194
323
  // Chat
195
324
  async function derivePnsKeys(deviceKeyHex) {
196
- return await invoke('plugin:nostrnative|derive_pns_keys', {
197
- deviceKeyHex
325
+ return await invoke("plugin:nostrnative|derive_pns_keys", {
326
+ deviceKeyHex,
198
327
  });
199
328
  }
200
329
  async function createDiscoveryEvent(nsec, deviceKeyToStore, relays, clientNsec) {
201
- return await invoke('plugin:nostrnative|create_discovery_event', {
330
+ return await invoke("plugin:nostrnative|create_discovery_event", {
202
331
  nsec,
203
332
  deviceKeyToStore,
204
333
  relays,
205
- clientNsec
334
+ clientNsec,
206
335
  });
207
336
  }
208
337
  async function decryptDiscoveryEvent(nsec, content, clientNsec) {
209
- return await invoke('plugin:nostrnative|decrypt_discovery_event', {
338
+ return await invoke("plugin:nostrnative|decrypt_discovery_event", {
210
339
  nsec,
211
340
  content,
212
- clientNsec
341
+ clientNsec,
213
342
  });
214
343
  }
215
344
  async function publishChatMessage(pnsNsec, mainPubkey, msg, relays, clientNsec) {
216
- return await invoke('plugin:nostrnative|publish_chat_message', {
345
+ return await invoke("plugin:nostrnative|publish_chat_message", {
217
346
  pnsNsec,
218
347
  mainPubkey,
219
348
  msg,
220
349
  relays,
221
- clientNsec
350
+ clientNsec,
222
351
  });
223
352
  }
224
353
  async function decryptPnsEvent(pnsNsec, content, clientNsec) {
225
- return await invoke('plugin:nostrnative|decrypt_pns_event', {
354
+ return await invoke("plugin:nostrnative|decrypt_pns_event", {
226
355
  pnsNsec,
227
356
  content,
228
- clientNsec
357
+ clientNsec,
229
358
  });
230
359
  }
231
360
  async function fetchPnsEvents(pnsPubkey, relays, eventId) {
232
- return await invoke('plugin:nostrnative|fetch_pns_events', {
361
+ return await invoke("plugin:nostrnative|fetch_pns_events", {
233
362
  pnsPubkey,
234
363
  relays,
235
- eventId
364
+ eventId,
236
365
  });
237
366
  }
238
367
  async function deleteChatMessages(pnsNsec, relays, eventIds, clientNsec) {
239
- return await invoke('plugin:nostrnative|delete_chat_messages', {
368
+ return await invoke("plugin:nostrnative|delete_chat_messages", {
240
369
  pnsNsec,
241
370
  relays,
242
371
  eventIds,
243
- clientNsec
372
+ clientNsec,
244
373
  });
245
374
  }
246
375
  async function fetchDiscoveryEvents(pubkey, relays) {
247
- return await invoke('plugin:nostrnative|fetch_discovery_events', {
376
+ return await invoke("plugin:nostrnative|fetch_discovery_events", {
377
+ pubkey,
378
+ relays,
379
+ });
380
+ }
381
+ // Routstr
382
+ async function discoverRoutstrProviders(relays) {
383
+ return await invoke("plugin:nostrnative|discover_routstr_providers", {
384
+ relays,
385
+ });
386
+ }
387
+ async function compareRoutstrPrices(providerUrls) {
388
+ return await invoke("plugin:nostrnative|compare_routstr_prices", {
389
+ providerUrls,
390
+ });
391
+ }
392
+ // NFP Functions
393
+ async function fetchNfpObservations(pubkey, nsec, relays, rangeStart, rangeEnd, clientNsec) {
394
+ return await invoke("plugin:nostrnative|fetch_nfp_observations", {
395
+ pubkey,
396
+ nsec,
397
+ relays,
398
+ rangeStart,
399
+ rangeEnd,
400
+ clientNsec,
401
+ });
402
+ }
403
+ async function publishNfpObservation(nsec, relays, observation, clientNsec) {
404
+ return await invoke("plugin:nostrnative|publish_nfp_observation", {
405
+ nsec,
406
+ relays,
407
+ observation,
408
+ clientNsec,
409
+ });
410
+ }
411
+ async function fetchNfpCycles(pubkey, nsec, relays, clientNsec) {
412
+ return await invoke("plugin:nostrnative|fetch_nfp_cycles", {
248
413
  pubkey,
249
- relays
414
+ nsec,
415
+ relays,
416
+ clientNsec,
417
+ });
418
+ }
419
+ async function publishNfpCycle(nsec, relays, cycle, clientNsec) {
420
+ return await invoke("plugin:nostrnative|publish_nfp_cycle", {
421
+ nsec,
422
+ relays,
423
+ cycle,
424
+ clientNsec,
425
+ });
426
+ }
427
+ async function fetchNfpSettings(pubkey, nsec, relays, clientNsec) {
428
+ return await invoke("plugin:nostrnative|fetch_nfp_settings", {
429
+ pubkey,
430
+ nsec,
431
+ relays,
432
+ clientNsec,
433
+ });
434
+ }
435
+ async function publishNfpSettings(nsec, relays, settings, clientNsec) {
436
+ return await invoke("plugin:nostrnative|publish_nfp_settings", {
437
+ nsec,
438
+ relays,
439
+ settings,
440
+ clientNsec,
441
+ });
442
+ }
443
+ async function deleteNfpData(nsec, relays, eventIds, clientNsec) {
444
+ return await invoke("plugin:nostrnative|delete_nfp_data", {
445
+ nsec,
446
+ relays,
447
+ eventIds,
448
+ clientNsec,
449
+ });
450
+ }
451
+ // Virtual FS
452
+ async function publishVirtualFs(nsec, relays, req, clientNsec) {
453
+ return await invoke("plugin:nostrnative|publish_virtual_fs", {
454
+ nsec,
455
+ relays,
456
+ req,
457
+ clientNsec,
458
+ });
459
+ }
460
+ async function fetchVirtualFs(pubkey, relays) {
461
+ return await invoke("plugin:nostrnative|fetch_virtual_fs", {
462
+ pubkey,
463
+ relays,
464
+ });
465
+ }
466
+ async function deleteVirtualFs(nsec, relays, identifier, clientNsec) {
467
+ return await invoke("plugin:nostrnative|delete_virtual_fs", {
468
+ nsec,
469
+ relays,
470
+ identifier,
471
+ clientNsec,
472
+ });
473
+ }
474
+ async function fetchRoutstrModels(providerUrl) {
475
+ return await invoke("plugin:nostrnative|fetch_routstr_models", {
476
+ providerUrl,
250
477
  });
251
478
  }
252
479
 
253
- export { blossomGetBlob, blossomMirror, blossomUpload, blossomUploadContent, createDiscoveryEvent, decryptDiscoveryEvent, decryptPnsEvent, deleteCalendar, deleteCalendarEvent, deleteChatMessages, derivePnsKeys, fetchBookmarks, fetchCalendarEvents, fetchCalendars, fetchContactList, fetchDiscoveryEvents, fetchEventDetails, fetchPnsEvents, fetchProfiles, fetchReceivedRsvps, fetchRsvps, fetchUserRsvps, generateNewNsec, parsePubkey, publishBatchCalendarEvents, publishCalendar, publishCalendarEvent, publishChatMessage, publishRsvp, removeBookmark, saveBookmark, sendDirectMessage, updateContactList, verifyNsec };
480
+ export { addNoteToNotebook, blossomDelete, blossomGetBlob, blossomList, blossomMirror, blossomUpload, blossomUploadContent, compareRoutstrPrices, createDiscoveryEvent, createNote, createNotebook, decryptDiscoveryEvent, decryptPnsEvent, deleteCalendar, deleteCalendarEvent, deleteChatMessages, deleteNfpData, deleteNote, deleteNotebook, deleteVirtualFs, derivePnsKeys, discoverRoutstrProviders, fetchBookmarks, fetchCalendarContactLists, fetchCalendarEvents, fetchCalendars, fetchContactList, fetchDiscoveryEvents, fetchEventDetails, fetchNfpCycles, fetchNfpObservations, fetchNfpSettings, fetchNotebooks, fetchNotes, fetchPnsEvents, fetchProfiles, fetchReceivedRsvps, fetchRoutstrModels, fetchRsvps, fetchUserRsvps, fetchVirtualFs, generateNewNsec, getNostrEventCounts, getNostrRelayEvents, getNostrRelayStatus, hexToNpub, npubToHex, parsePubkey, publishBatchCalendarEvents, publishCalendar, publishCalendarContactList, publishCalendarEvent, publishChatMessage, publishNfpCycle, publishNfpObservation, publishNfpSettings, publishRsvp, publishVirtualFs, removeBookmark, removeNoteFromNotebook, saveBookmark, sendDirectMessage, startNostrRelay, stopNostrRelay, updateContactList, updateNote, verifyNsec };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-plugin-nostrnative",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Nostr native capabilities for Tauri.",
5
5
  "type": "module",
6
6
  "types": "./dist-js/index.d.ts",
@@ -0,0 +1,4 @@
1
+ [[permission]]
2
+ identifier = "allow-blossom-delete"
3
+ description = "Allows deleting blobs"
4
+ commands = [["blossom_delete"]]
@@ -0,0 +1,4 @@
1
+ [[permission]]
2
+ identifier = "allow-blossom-list"
3
+ description = "Allows listing blobs"
4
+ commands = [["blossom_list"]]
@@ -0,0 +1,4 @@
1
+ [[permission]]
2
+ identifier = "allow-blossom-upload"
3
+ description = "Allows uploading blobs"
4
+ commands = [["blossom_upload"]]
@@ -0,0 +1,13 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-add-note-to-notebook"
7
+ description = "Enables the add_note_to_notebook command without any pre-configured scope."
8
+ commands.allow = ["add_note_to_notebook"]
9
+
10
+ [[permission]]
11
+ identifier = "deny-add-note-to-notebook"
12
+ description = "Denies the add_note_to_notebook command without any pre-configured scope."
13
+ commands.deny = ["add_note_to_notebook"]
@@ -0,0 +1,13 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-blossom-delete"
7
+ description = "Enables the blossom_delete command without any pre-configured scope."
8
+ commands.allow = ["blossom_delete"]
9
+
10
+ [[permission]]
11
+ identifier = "deny-blossom-delete"
12
+ description = "Denies the blossom_delete command without any pre-configured scope."
13
+ commands.deny = ["blossom_delete"]
@@ -0,0 +1,13 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-blossom-list"
7
+ description = "Enables the blossom_list command without any pre-configured scope."
8
+ commands.allow = ["blossom_list"]
9
+
10
+ [[permission]]
11
+ identifier = "deny-blossom-list"
12
+ description = "Denies the blossom_list command without any pre-configured scope."
13
+ commands.deny = ["blossom_list"]
@@ -0,0 +1,8 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-compare-routstr-prices"
7
+ description = "Enables the compare_routstr_prices command."
8
+ commands.allow = ["compare_routstr_prices"]
@@ -0,0 +1,13 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-create-note"
7
+ description = "Enables the create_note command without any pre-configured scope."
8
+ commands.allow = ["create_note"]
9
+
10
+ [[permission]]
11
+ identifier = "deny-create-note"
12
+ description = "Denies the create_note command without any pre-configured scope."
13
+ commands.deny = ["create_note"]
@@ -0,0 +1,13 @@
1
+ # Automatically generated - DO NOT EDIT!
2
+
3
+ "$schema" = "../../schemas/schema.json"
4
+
5
+ [[permission]]
6
+ identifier = "allow-create-notebook"
7
+ description = "Enables the create_notebook command without any pre-configured scope."
8
+ commands.allow = ["create_notebook"]
9
+
10
+ [[permission]]
11
+ identifier = "deny-create-notebook"
12
+ description = "Denies the create_notebook command without any pre-configured scope."
13
+ commands.deny = ["create_notebook"]
@@ -0,0 +1,9 @@
1
+ "$schema" = "../../schemas/schema.json"
2
+ [[permission]]
3
+ identifier = "allow-delete-nfp-data"
4
+ description = "Enables the delete_nfp_data command."
5
+ commands.allow = ["delete_nfp_data"]
6
+ [[permission]]
7
+ identifier = "deny-delete-nfp-data"
8
+ description = "Denies the delete_nfp_data command."
9
+ commands.deny = ["delete_nfp_data"]