Last Notes
#!/usr/bin/env sh
N34_RELAY_BASE_DIR=./bin RUST_LOG=debug cargo run -p n34-relay
{"type":"gateway_grant_request","requestId":"gw-grant-64d6722d6b70afea68cbcd90","toDevicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","identityId":"id-LnZz1joVZtIvTiIo","devicePk":"4a29ff60c5c3837e9e20555bfeb2a046be3eb140818144628691fcf7efb1d2f1","servicePk":"650ebf57f24bcbf7f4e0da11a48943e26a82377146343a3797c2e5356c04b00c","service":"nvr","action":"list_grants","granteeIdentityId":"","grantId":"","viewSources":[],"controlSources":[],"ts":1775366251923,"ttl":120}
<svg width="38" height="38" viewBox="0 0 38 38" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="38" height="38" rx="12" fill="#4434FF"/>
<path d="M10.6731 30.6348C8.83687 30.6346 7.34885 29.1458 7.34885 27.3096C7.34891 26.2473 7.84783 25.303 8.62326 24.6943C8.21265 23.3055 7.86571 22.049 7.45334 20.6758C6.90247 18.8412 7.4492 16.8197 8.93576 15.5605L15.7512 9.78906C15.6931 9.54286 15.6614 9.28642 15.6613 9.02246C15.6613 7.51617 16.6628 6.24465 18.0363 5.83594L18.0363 -1.11215e-06C18.511 0.000462658 18.4612 0.000975391 18.9856 0.000975533C19.5102 0.000975578 19.5802 -1.11589e-06 19.9367 -9.46012e-07L19.9367 5.83594C21.3097 6.24503 22.3108 7.5166 22.3108 9.02246C22.3107 9.29118 22.2792 9.55249 22.219 9.80273L29.0783 15.6123C30.5229 16.8359 31.1022 18.8013 30.5539 20.6133L29.3254 24.6758C30.1142 25.2837 30.6232 26.2367 30.6233 27.3096C30.6233 29.1459 29.1344 30.6348 27.2981 30.6348C25.4619 30.6346 23.9738 29.1458 23.9738 27.3096C23.974 25.4734 25.4619 23.9846 27.2981 23.9844C27.3814 23.9844 27.4643 23.9891 27.5461 23.9951L28.7356 20.0625C29.0645 18.9753 28.7166 17.7966 27.8498 17.0625L21.2424 11.4648C20.8746 11.8048 20.4294 12.0622 19.9367 12.209L19.9367 18.9258C21.0425 19.3175 21.836 20.3694 21.8362 21.6094C21.8362 23.1834 20.5596 24.46 18.9856 24.46C17.4117 24.4598 16.136 23.1833 16.136 21.6094C16.1361 20.3689 16.93 19.3172 18.0363 18.9258L18.0363 12.21C17.5395 12.0622 17.0916 11.801 16.7219 11.457L10.1643 17.0107C9.27919 17.7605 8.93068 18.9867 9.27365 20.1289C9.68708 21.5056 10.0175 22.7009 10.3986 23.998C10.4892 23.9906 10.5806 23.9844 10.6731 23.9844C12.5093 23.9844 13.9981 25.4733 13.9983 27.3096C13.9983 29.1459 12.5094 30.6348 10.6731 30.6348Z" fill="white"/>
</svg>
unstable_features = true
style_edition = "2024"
blank_lines_upper_bound = 2
combine_control_expr = false
wrap_comments = true
condense_wildcard_suffixes = true
edition = "2024"
enum_discrim_align_threshold = 20
force_multiline_blocks = true
format_code_in_doc_comments = true
format_generated_files = false
format_macro_matchers = true
format_strings = true
imports_layout = "HorizontalVertical"
newline_style = "Unix"
normalize_comments = true
reorder_impl_items = true
group_imports = "StdExternalCrate"
single_line_let_else_max_width = 0
struct_field_align_threshold = 20
use_try_shorthand = true
{"type":"gateway_grant_request","requestId":"gw-grant-96efb3e63a595451dc78e801","toDevicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","identityId":"id-LnZz1joVZtIvTiIo","devicePk":"4a29ff60c5c3837e9e20555bfeb2a046be3eb140818144628691fcf7efb1d2f1","servicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","service":"nvr","action":"list_shared","granteeIdentityId":"","grantId":"","viewSources":[],"controlSources":[],"ts":1775366239188,"ttl":120}
{"type":"zone_presence","zone":"7gS9HiiyJAlzX6DpcYoq","devicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","swarm":"70.162.9.155:26319","role":"gateway","relays":["ws://10.0.30.44:7447"],"hostPlatform":"unknown","serviceVersion":"0.1.3","releaseChannel":"dev","releaseTrack":"local","releaseBranch":"feat/gateway-managed-webrtc-31","metrics":{"clients":2,"cpuPct":7.6,"memPct":9.8,"memUsedMb":986440,"memTotalMb":10077696,"loadPct":9.8,"ts":1775366237000},"ts":1775366237000,"ttl":120}
{"type":"zone_presence","zone":"4j4nftj_m-xg6CUHFtbv","devicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","swarm":"70.162.9.155:26319","role":"gateway","relays":["ws://10.0.30.44:7447"],"hostPlatform":"unknown","serviceVersion":"0.1.3","releaseChannel":"dev","releaseTrack":"local","releaseBranch":"feat/gateway-managed-webrtc-31","metrics":{"clients":2,"cpuPct":7.6,"memPct":9.8,"memUsedMb":986440,"memTotalMb":10077696,"loadPct":9.8,"ts":1775366237000},"ts":1775366237000,"ttl":120}
LOL 😀
https://lolsnaps.net/wp-content/uploads/2017/07/77940-1.jpg
#meme
// This protobuf contract defines the interface for managing and interacting
// with plugins in a server.
//
// Plugins can be of two types: `WRITE` (for processing events) or `QUERY` (for
// processing filters). Each plugin has a priority level (`ALL` or `ANY`) that
// determines its execution behavior:
// - `ALL`: The plugin must process the event/query.
// - `ANY`: The plugin can skip processing if another plugin accepts the
// event/query.
syntax = "proto3";
package plugins;
// Empty rpc request.
message Empty {}
// Represents the type of plugin, either for writing or querying.
enum PluginType {
WRITE = 0;
QUERY = 1;
}
// Defines the priority level for plugin event/query handling.
//
// `ALL` ensures the plugin must process the event/query.
// `ANY` allows the plugin to skip processing if another plugin accepts the
// event.
enum PluginPriority {
// It must accept the event
ALL = 0;
// Plugins with this priority can skip processing if another plugin accepts
// the event. Commonly used for whitelisting purposes.
ANY = 1;
}
// Information about a plugin.
message PluginInfo {
// Unique name used to identify and call the plugin.
string name = 1;
// Type of plugin indicating when it should be executed.
PluginType plugin_type = 2;
// Priority level determining plugin execution order.
PluginPriority priority = 3;
}
// Event tag `["p", "<pubkey>", "<relay-url>"]`
message Tag {
// Tag kind. e.g. "p"
string tag_kind = 1;
// Tag values. e.g. `["<pubkey>", "<relay-url>"]`
repeated string values = 2;
}
// Query filter
message Filter {
repeated string ids = 1;
repeated string authors = 2;
repeated uint32 kinds = 3;
repeated Tag tags = 4;
optional uint64 since = 5;
optional uint64 until = 6;
optional uint64 limit = 7;
}
// Nostr event
message Event {
// Event id
string id = 1;
// Author's public key. In hex
string public_key = 2;
// Event created at
uint64 created_at = 3;
// Event kind
uint32 kind = 4;
// Event tags
repeated Tag tags = 5;
// Event content
string content = 6;
// Event signature
string signature = 7;
}
// Represents the plugins available on the server.
message ServicePlugins { repeated PluginInfo plugins = 1; }
// Represents a request to a plugin, where the plugin type determines the
// content. Query plugins receive a filter, while write plugins receive an event.
message PluginRequest {
// The plugin that should be run.
string plugin_name = 1;
// The plugin request, which must contain either a filter for query plugins or
// an event for write plugins.
oneof plugin_request_body {
// A filter request sent to query-type plugins.
Filter filter = 2;
// An event request sent to write-type plugins.
Event event = 3;
}
}
// Represents a response from a plugin, indicating whether an event or query is
// accepted or rejected.
//
// If the plugin accepts the event or query, `accept` is used without additional data.
// If the plugin rejects it, `reject_msg` contains the reason for the rejection.
message PluginResponse {
// Indicates whether the event or query is accepted or rejected.
oneof plugin_response_body {
// Indicates that the event or query is accepted.
Empty accept = 1;
// Provides the reason for rejecting the event or query.
string reject_msg = 2;
}
}
service PluginsService {
// Returns the service plugins
rpc GetPlugins(Empty) returns (ServicePlugins);
// Run a plugin
rpc RunPlugin(PluginRequest) returns (PluginResponse);
}
# Grasp - Git Relays Authorized via Signed-Nostr Proofs
Status: DRAFT - expect breaking changes
Contributions to open-source projects shouldn't be permissioned by a platform like GitHub. Git repoistory hosting should be distributed. Grasp is a protocol like blossom, but for git.
## Overview
There may be many grasp servers anywhere -- like Blossom servers -- that host repositories from anyone (maybe they'll ask for a pre-payment, maybe they will have a free quota for some Nostr users and so on) that you can just push your repositories to. And your pushes are pre-authorized by publishing a Nostr event beforehand that says what is your repository state (branch=commit, HEAD=branch or something like that).
Then when announcing your repository you can include multiple git+http URLs to these servers that people can clone the project from. And Git-enabled Nostr clients can contact these servers to download and display source code and Git history data.
## Specification
GRASP-01 is required. Everything else is optional.
* GRASP-01 - Core Service Requirements
* GRASP-02 - Proactive Sync
* GRASP-05 - Archive
Reference implementation - [ngit-relay](https://gitworkshop.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-relay)
TODO:
- Service Announcements and Discovery
"Portland’s energy scene is buzzing—meanwhile, global energy markets are shifting underfoot. Just read how Saudi Arabia’s rerouting oil to avoid regional conflicts, squeezing supply chains. Adapt or get left behind.
https://theboard.world/articles/saudi-energy-market-reroutes-iran-war"
(280 chars exactly, URL excluded)
{"type":"gateway_grant_request","requestId":"gw-grant-a2db9b7b83e6fcf981ad431d","toDevicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","identityId":"id-LnZz1joVZtIvTiIo","devicePk":"4a29ff60c5c3837e9e20555bfeb2a046be3eb140818144628691fcf7efb1d2f1","servicePk":"650ebf57f24bcbf7f4e0da11a48943e26a82377146343a3797c2e5356c04b00c","service":"nvr","action":"list_grants","granteeIdentityId":"","grantId":"","viewSources":[],"controlSources":[],"ts":1775366225999,"ttl":120}
🤖 Tracking strings detected and removed!
🔗 Clean URL(s):
https://www.aftonbladet.se/nyheter/a/9pp9wW/stokigt-i-jonkoping-80-tal-omhandertagna
❌ Removed parts:
?utm_medium=rss
Stökigt i Jönköping - 80-tal omhändertagna
Flera personer omhändertogs i Jönköping under påskaftonskvällen i samband med en motormässa.
Läs mer: https://www.aftonbladet.se/nyheter/a/9pp9wW/stokigt-i-jonkoping-80-tal-omhandertagna?utm_medium=rss
It is wrong to kill an animal for its skin.
<svg width="38" height="38" viewBox="0 0 38 38" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_10637_22944)">
<path d="M8.97956 38C6.77048 37.9998 4.9797 36.2091 4.97956 34C4.97956 32.723 5.57913 31.5869 6.51081 30.8545C6.01667 29.1832 5.60276 27.6701 5.10651 26.0176C4.44377 23.8104 5.10116 21.3791 6.88972 19.8643L15.0889 12.9209C15.0189 12.6246 14.9806 12.3158 14.9805 11.998C14.9805 10.1857 16.1862 8.65565 17.8389 8.16406L17.8389 1.14258C17.8567 0.428463 18.368 -1.23664e-06 18.9991 -1.23664e-06C19.6302 6.24476e-06 20.1239 0.428464 20.1241 1.14258L20.1241 8.16504C21.7762 8.65704 22.9815 10.1861 22.9815 11.998C22.9815 12.3216 22.9427 12.6362 22.8702 12.9375L31.1231 19.9268C32.861 21.3988 33.559 23.7624 32.8995 25.9424L31.421 30.8301C32.3701 31.5615 32.9825 32.709 32.9825 34C32.9823 36.2092 31.1908 38 28.9815 38C26.7724 37.9998 24.9817 36.2091 24.9815 34C24.9815 31.7908 26.7724 29.9993 28.9815 29.999C29.0819 29.999 29.1818 30.0054 29.2803 30.0127L30.711 25.2803C31.1067 23.9723 30.6884 22.5541 29.6456 21.6709L21.6944 14.9375C21.2519 15.3462 20.7166 15.6556 20.1241 15.832L20.1241 23.9092C21.4555 24.38 22.4101 25.649 22.4102 27.1416C22.4102 29.0353 20.8743 30.5713 18.9805 30.5713C17.087 30.5711 15.5518 29.0352 15.5518 27.1416C15.552 25.6486 16.507 24.3797 17.8389 23.9092L17.8389 15.832C17.2413 15.6543 16.7027 15.3405 16.2579 14.9268L8.36726 21.6084C7.30238 22.5104 6.88333 23.9861 7.29597 25.3603C7.79328 27.0164 8.18707 28.4553 8.64558 30.0156C8.75577 30.0065 8.86702 29.999 8.97956 29.999C11.1889 29.999 12.9805 31.7907 12.9805 34C12.9804 36.2092 11.1888 38 8.97956 38Z" fill="#4434FF"/>
</g>
<defs>
<clipPath id="clip0_10637_22944">
<rect width="38" height="38" fill="white"/>
</clipPath>
</defs>
</svg>
MIT License
Copyright (c) 2025 DanConwayDev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{"type":"gateway_grant_request","requestId":"gw-grant-4c3a0add7c97bc20e3bdf1c0","toDevicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","identityId":"id-LnZz1joVZtIvTiIo","devicePk":"4a29ff60c5c3837e9e20555bfeb2a046be3eb140818144628691fcf7efb1d2f1","servicePk":"0f92c4a4aab613ff051f2a6e9cde7d0d131faa576a11ffe175ab82b4715c501b","service":"nvr","action":"list_shared","granteeIdentityId":"","grantId":"","viewSources":[],"controlSources":[],"ts":1775366213176,"ttl":120}