-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathopenapi.yaml
More file actions
1266 lines (1213 loc) · 38.9 KB
/
Copy pathopenapi.yaml
File metadata and controls
1266 lines (1213 loc) · 38.9 KB
1
2
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
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
94
95
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: Keycast HTTP API
version: 1.0.0
description: |
# Keycast HTTP Signing API
Fast HTTP signing for Nostr events without NIP-46 relay overhead. Keycast provides both traditional NIP-46 remote signing and a high-performance HTTP API for low-latency signing operations.
## Authentication
Most endpoints require a UCAN token obtained from the `/auth/login` or `/auth/register` endpoints. Include the token in the `Authorization` header:
```
Authorization: Bearer <your-jwt-token>
```
## Performance
- **Fast Path**: ~10ms signing using cached handlers (unified mode)
- **Slow Path**: ~50-100ms signing using database + KMS decryption
## Security Notes
⚠️ **Current Limitations**:
- No permission validation on HTTP signing endpoint
- No rate limiting (endpoints can be called unlimited times)
- UCAN tokens valid for 24 hours
These limitations are being addressed in upcoming releases.
contact:
name: Keycast Support
url: https://github.com/rabble/keycast
license:
name: MIT
servers:
- url: https://entryway.divine.video/api
description: Production ATProto Authorization Server
- url: https://login.divine.video/api
description: Production Divine and Nostr login server
- url: http://localhost:3000/api
description: Local development
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: UCAN token from /auth/register or /auth/login
ServiceToken:
type: http
scheme: bearer
description: KEYCAST_SERVICE_TOKEN for trusted service-to-service callers (e.g. the AP gateway)
schemas:
Error:
type: object
properties:
error:
type: string
description: Error message
code:
type: string
description: Stable application error code, when available
error_description:
type: string
description: Human-readable detail accompanying an RFC 6749 OAuth error code, when available
required:
- error
ApCreateKeyRequest:
type: object
properties:
pubkey:
type: string
description: Hex Nostr pubkey of the actor. For service-token callers, either pubkey or actor is required; for UCAN callers it defaults to the token's pubkey and, if present, must match it.
example: "e1ff3bfdd4e40315959b08b4fcc8245eaa514637e1d4ec2ae166b743341be1af"
actor:
type: string
description: ActivityPub actor URL. Alternative to pubkey for the gateway; resolves /ap/users/{username} against the tenant selected by the Keycast request Host.
example: "https://divine.video/ap/users/alice"
ApKeyResponse:
type: object
properties:
pubkey:
type: string
public_key_pem:
type: string
description: SPKI PEM public key for the actor's publicKey.publicKeyPem.
example: "-----BEGIN PUBLIC KEY-----\nMIIBIjAN...\n-----END PUBLIC KEY-----\n"
key_type:
type: string
example: "rsa-2048"
created:
type: boolean
description: true if a new key was minted; false if an existing key was returned (idempotent).
required:
- pubkey
- public_key_pem
- key_type
- created
ApPublicKeyResponse:
type: object
properties:
pubkey:
type: string
public_key_pem:
type: string
key_type:
type: string
example: "rsa-2048"
required:
- pubkey
- public_key_pem
- key_type
ApSignRequest:
type: object
properties:
pubkey:
type: string
description: Hex Nostr pubkey of the actor. For service-token callers, either pubkey or actor is required.
actor:
type: string
description: ActivityPub actor URL. Alternative to pubkey for the gateway; resolves /ap/users/{username} against the tenant selected by the Keycast request Host.
signing_string:
type: string
description: The exact draft-cavage HTTP-Signature signing string. Signed as UTF-8 bytes.
example: "(request-target): post /inbox\nhost: mastodon.social\ndate: Mon, 01 Jan 2026 00:00:00 GMT\ndigest: SHA-256=X..."
required:
- signing_string
ApSignResponse:
type: object
properties:
pubkey:
type: string
signature:
type: string
description: base64-encoded RSASSA-PKCS1-v1_5 SHA-256 signature for the Signature header.
algorithm:
type: string
example: "rsa-sha256"
required:
- pubkey
- signature
- algorithm
RegisterRequest:
type: object
properties:
email:
type: string
format: email
example: user@example.com
password:
type: string
format: password
minLength: 8
example: "SecureP@ssw0rd"
nsec:
type: string
description: Optional user-provided Nostr secret key (nsec or hex format). If not provided, a new key will be generated.
example: "nsec1..."
required:
- email
- password
RegisterResponse:
type: object
properties:
user_id:
type: string
description: User's public key (hex format)
email:
type: string
pubkey:
type: string
description: User's Nostr public key (hex format)
token:
type: string
description: UCAN authentication token
required:
- user_id
- email
- pubkey
- token
LoginRequest:
type: object
properties:
email:
type: string
format: email
password:
type: string
format: password
required:
- email
- password
LoginResponse:
type: object
properties:
token:
type: string
description: UCAN authentication token
pubkey:
type: string
description: User's Nostr public key (hex format)
required:
- token
- pubkey
NostrEvent:
type: object
description: Nostr event structure (NIP-01)
properties:
kind:
type: integer
description: Event kind number
example: 1
content:
type: string
description: Event content
example: "Hello Nostr!"
tags:
type: array
items:
type: array
items:
type: string
example: [["p", "pubkey123"], ["e", "eventid456"]]
created_at:
type: integer
description: Unix timestamp
example: 1234567890
required:
- kind
- content
- tags
- created_at
SignedNostrEvent:
allOf:
- $ref: '#/components/schemas/NostrEvent'
- type: object
properties:
id:
type: string
description: Event ID (hex format)
pubkey:
type: string
description: Author's public key (hex format)
sig:
type: string
description: Schnorr signature (hex format)
required:
- id
- pubkey
- sig
SignEventRequest:
type: object
properties:
event:
$ref: '#/components/schemas/NostrEvent'
required:
- event
SignEventResponse:
type: object
properties:
signed_event:
$ref: '#/components/schemas/SignedNostrEvent'
required:
- signed_event
BunkerUrlResponse:
type: object
properties:
bunker_url:
type: string
format: uri
description: NIP-46 bunker connection string
example: "bunker://pubkey?relay=wss://relay.example.com&secret=xyz"
required:
- bunker_url
PubkeyResponse:
type: object
properties:
pubkey:
type: string
description: Public key in hex format
example: "abc123..."
npub:
type: string
description: Public key in bech32 format
example: "npub1..."
required:
- pubkey
- npub
UserProfile:
type: object
properties:
public_key:
type: string
username:
type: string
nullable: true
display_name:
type: string
nullable: true
avatar_url:
type: string
nullable: true
email:
type: string
email_verified:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
SessionInfo:
type: object
properties:
bunker_public_key:
type: string
application_name:
type: string
created_at:
type: string
format: date-time
last_used_at:
type: string
format: date-time
nullable: true
AtprotoEnableRequest:
type: object
properties:
username:
type: string
example: "alice"
required:
- username
AtprotoCrosspostRequest:
type: object
properties:
enabled:
type: boolean
required:
- enabled
AtprotoStatusResponse:
type: object
properties:
enabled:
type: boolean
description: Whether future ATProto cross-publishing is enabled for this user.
state:
type: string
nullable: true
enum:
- pending
- ready
- failed
- disabled
description: Lifecycle state for ATProto provisioning. Null means ATProto has never been enabled.
example: "pending"
did:
type: string
nullable: true
description: PLC DID assigned to the user once provisioning reaches the ready state.
example: "did:plc:abc123"
error:
type: string
nullable: true
description: User-visible error from the last failed provisioning attempt, if any.
username:
type: string
nullable: true
description: Claimed username associated with the ATProto lifecycle state.
example: "alice"
required:
- enabled
paths:
/auth/register:
post:
summary: Register new user
description: |
Create a new user account with email/password authentication. Automatically generates a Nostr keypair and returns a UCAN token for immediate use.
**BYOK Support**: You can optionally provide your own Nostr secret key via the `nsec` parameter. If not provided, a new key will be generated.
tags:
- Authentication
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterRequest'
examples:
basic:
summary: Register with auto-generated key
value:
email: "user@example.com"
password: "SecurePassword123"
byok:
summary: Register with your own key (BYOK)
value:
email: "user@example.com"
password: "SecurePassword123"
nsec: "nsec1abc123..."
responses:
'200':
description: Successfully registered
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterResponse'
'400':
description: Invalid request (weak password, invalid nsec)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Email already exists
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/auth/login:
post:
summary: Login
description: Authenticate with email/password and receive a UCAN token valid for 24 hours.
tags:
- Authentication
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoginRequest'
responses:
'200':
description: Successfully authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
'401':
description: Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/sign:
post:
summary: Sign Nostr event (Fast HTTP signing)
description: |
Sign a Nostr event via HTTP - **10-50x faster than NIP-46**.
## Performance
- **Fast path** (~10ms): Uses cached authorization handlers in unified mode
- **Slow path** (~50-100ms): Decrypts key from database using KMS
## ⚠️ Security Warning
**This endpoint currently has NO permission validation**. Any authenticated user can sign any event kind with any content. Permission checks are coming in a future release.
## Supported Event Kinds
Currently accepts all Nostr event kinds (0-65535), including:
- `kind: 0` - User metadata
- `kind: 1` - Short text note
- `kind: 3` - Contact list
- `kind: 4` - Encrypted direct message
- `kind: 5` - Deletion
- `kind: 1984` - Reporting
- `kind: 9734-9735` - Zaps
- `kind: 10000+` - Replaceable events
- `kind: 20000+` - Ephemeral events
- `kind: 30000+` - Parameterized replaceable events
tags:
- Signing
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SignEventRequest'
examples:
text_note:
summary: Sign a text note (kind 1)
value:
event:
kind: 1
content: "Hello from Keycast!"
tags: []
created_at: 1234567890
dm:
summary: Sign encrypted DM (kind 4)
value:
event:
kind: 4
content: "encrypted_content_here"
tags: [["p", "recipient_pubkey"]]
created_at: 1234567890
responses:
'200':
description: Event successfully signed
content:
application/json:
schema:
$ref: '#/components/schemas/SignEventResponse'
'401':
description: Unauthorized (invalid or missing JWT)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: User not found or key not available
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Signing failed (KMS error, invalid key, etc.)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ap/keys:
post:
summary: Create or return an actor's ActivityPub RSA key
description: |
Mints (or returns, idempotently) an RSA-2048 keypair for an actor and returns its
SPKI public PEM for embedding in `publicKey.publicKeyPem`. The private key is stored
encrypted-at-rest and is never returned. Calling again returns the existing key
with `created: false` — the key is never regenerated (federated keys are cached by
remote servers). Auth: ServiceToken (with `pubkey` or `actor`) or an OAuth UCAN
for the same actor.
tags:
- ActivityPub
security:
- ServiceToken: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApCreateKeyRequest'
responses:
'200':
description: Key created or already existed
content:
application/json:
schema:
$ref: '#/components/schemas/ApKeyResponse'
'400':
description: Invalid or missing pubkey
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: UCAN pubkey mismatch
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ap/keys/{actor_or_pubkey}:
get:
summary: Get an actor's ActivityPub public key PEM
description: |
Returns the actor's public PEM, lazily minting the RSA key if needed. The path
accepts either a hex Nostr pubkey or a URL-encoded ActivityPub actor URL.
tags:
- ActivityPub
security:
- ServiceToken: []
- BearerAuth: []
parameters:
- in: path
name: actor_or_pubkey
required: true
schema:
type: string
description: Hex Nostr pubkey or URL-encoded ActivityPub actor URL
responses:
'200':
description: Public key PEM
content:
application/json:
schema:
$ref: '#/components/schemas/ApPublicKeyResponse'
'404':
description: No AP key for this actor
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ap/sign:
post:
summary: Sign an HTTP-Signature signing string (RSA-SHA256)
description: |
Signs the exact caller-supplied signing string with RSASSA-PKCS1-v1_5 + SHA-256 and
returns the base64 signature. The caller builds the draft-cavage signing string and
assembles the final `Signature:` header. The private key never leaves Keycast.
Suspended/banned accounts are rejected. Service-token callers identify the actor
with `pubkey` or `actor`; UCAN callers need a live OAuth authorization for the
same actor.
tags:
- ActivityPub
security:
- ServiceToken: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApSignRequest'
responses:
'200':
description: Signature
content:
application/json:
schema:
$ref: '#/components/schemas/ApSignResponse'
'403':
description: Account restricted or pubkey mismatch
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No AP key for this actor
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/bunker:
get:
summary: Get NIP-46 bunker URL
description: |
Retrieve the NIP-46 bunker connection string for traditional relay-based signing.
Use this when you need full NIP-46 compatibility with permission validation, or when HTTP signing is not available.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: Bunker URL retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/BunkerUrlResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/pubkey:
get:
summary: Get user's public key
description: Returns the user's Nostr public key in both hex and npub (bech32) formats.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: Public key retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/PubkeyResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/profile:
get:
summary: Get user profile
description: Retrieve the authenticated user's profile information including email, username, and Nostr metadata.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: Profile retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/UserProfile'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
summary: Update user profile
description: Update username, display name, or avatar URL for the authenticated user.
tags:
- User
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: "alice"
display_name:
type: string
example: "Alice Smith"
avatar_url:
type: string
format: uri
example: "https://example.com/avatar.jpg"
responses:
'200':
description: Profile updated
content:
application/json:
schema:
$ref: '#/components/schemas/UserProfile'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/atproto/enable:
post:
summary: Enable ATProto provisioning
description: Enable ATProto opt-in after username claim, return the claimed username with a pending lifecycle state, and trigger provisioning.
tags:
- User
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoEnableRequest'
responses:
'202':
description: ATProto provisioning accepted and lifecycle set to pending
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoStatusResponse'
'400':
description: Username missing, unclaimed, or mismatched
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/atproto/status:
get:
summary: Get ATProto lifecycle status
description: Returns the authenticated user's enabled flag, lifecycle state, DID, last provisioning error, and claimed username.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: Current ATProto status
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoStatusResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: User not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/atproto/disable:
post:
summary: Disable ATProto publishing
description: Disable ATProto publishing for the authenticated user, trigger downstream cleanup, and return enabled=false with state=disabled.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: ATProto publishing disabled
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoStatusResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/account/{pubkey}/crosspost:
put:
summary: Toggle Bluesky crossposting
description: Enable or disable Bluesky publishing for the authenticated user's account.
tags:
- User
security:
- BearerAuth: []
parameters:
- in: path
name: pubkey
required: true
schema:
type: string
description: Authenticated user's hex pubkey.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoCrosspostRequest'
responses:
'200':
description: Updated ATProto publishing status
content:
application/json:
schema:
$ref: '#/components/schemas/AtprotoStatusResponse'
'400':
description: Username missing or request invalid
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Authenticated user does not own the requested pubkey
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/sessions:
get:
summary: List active sessions
description: Get all active NIP-46 authorization sessions for the authenticated user.
tags:
- User
security:
- BearerAuth: []
responses:
'200':
description: Sessions retrieved
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SessionInfo'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/user/sessions/revoke:
post:
summary: Revoke a session
description: Revoke an active NIP-46 authorization session by its bunker public key.
tags:
- User
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
bunker_pubkey:
type: string
description: Bunker public key to revoke
required:
- bunker_pubkey
responses:
'200':
description: Session revoked
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
message:
type: string
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/.well-known/nostr.json:
get:
summary: NIP-05 discovery
description: |
NIP-05 identifier verification endpoint and nostr-login discovery metadata.
Query by username: `/.well-known/nostr.json?name=alice`
Response behavior:
- With `name` query: returns `names` mapping for lookup
- Without `name` query: returns `names: {}` and `nip46` discovery data
tags:
- Discovery
parameters:
- name: name
in: query
required: false
description: Username to look up
schema:
type: string
example: alice
responses:
'200':
description: NIP-05 discovery response
content:
application/json:
schema:
type: object
properties:
names:
type: object
additionalProperties:
type: string
example:
alice: "abc123..."
nip46: