acf9a140f6
The recipient QR gains optional amount/memo query params: nostr:<nprofile>?amount=<decimal GRIN>&memo=<percent-encoded> Scanning a GoblinPay checkout QR now prefills the amount (and the send note) instead of only the recipient. Bare nostr:<nprofile> is unchanged. The parser (src/nostr/payuri.rs) is pure and fail-closed over untrusted scan input: amount is accepted only if the wallet's own amount_from_hr_string parses it strictly positive; memo is percent- decoded, control-stripped and 256-byte capped; only the nostr: scheme unlocks params; 4096-byte cap; embedded NUL rejected; any problem degrades to recipient-only. PREFILL ONLY - the picker resolver and the amount/review confirm still gate every send; nothing auto-advances.
49 lines
1.2 KiB
Rust
49 lines
1.2 KiB
Rust
// Copyright 2026 The Goblin Developers
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
//! Nostr payment-messaging subsystem: contacts are nostr users, slatepacks
|
|
//! travel as NIP-17 private DMs (NIP-44 encrypted, NIP-59 gift-wrapped) over
|
|
//! relays reached through the in-process Nym mixnet client.
|
|
|
|
mod types;
|
|
pub use types::*;
|
|
|
|
pub mod config;
|
|
pub use config::{AcceptPolicy, NostrConfig};
|
|
|
|
pub mod pool;
|
|
pub mod relays;
|
|
|
|
mod store;
|
|
pub use store::NostrStore;
|
|
|
|
mod identity;
|
|
pub use identity::{IdentitySource, NostrIdentity};
|
|
|
|
pub mod protocol;
|
|
pub use protocol::*;
|
|
|
|
pub mod wrapv3;
|
|
|
|
pub mod ingest;
|
|
pub use ingest::*;
|
|
|
|
mod client;
|
|
pub use client::{NostrProfile, NostrService, send_phase};
|
|
|
|
pub mod avatar;
|
|
pub mod nip05;
|
|
|
|
pub mod payuri;
|