Phase B: identifier+key on the wire, JCS envelope signing (FRX/0.5), registry binding
This commit is contained in:
+11
-2
@@ -59,9 +59,18 @@ pub fn free_port() -> u16 {
|
||||
listener.local_addr().unwrap().port()
|
||||
}
|
||||
|
||||
pub fn query_envelope(key: &Keypair, text: &str, max_results: usize) -> Envelope {
|
||||
pub fn query_envelope(key: &Keypair, identifier: &str, text: &str, max_results: usize) -> Envelope {
|
||||
let body = QueryBody::new(text, max_results);
|
||||
Envelope::new(key, TYPE_QUERY, serde_json::to_value(&body).unwrap())
|
||||
Envelope::new(
|
||||
key,
|
||||
identifier,
|
||||
TYPE_QUERY,
|
||||
serde_json::to_value(&body).unwrap(),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_envelope(key: &Keypair, msg_type: &str, body: Value) -> Envelope {
|
||||
Envelope::new(key, &key.public_hex(), msg_type, body)
|
||||
}
|
||||
|
||||
pub async fn challenge(client: &reqwest::Client, relay_url: &str, member: &str) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user