lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

nip17_adapter.v1.json (2165B)


      1 {
      2   "suite": "nip17_adapter",
      3   "contract_version": "1.0.0",
      4   "vectors": [
      5     {
      6       "id": "message_roundtrip_single_recipient",
      7       "kind": "nip17.message.roundtrip",
      8       "input": {
      9         "recipient_public_key": "e0266e3cfb0d2886f91c73f5f868f3b98273713e5fcd97c081663f5518a4b3af",
     10         "content": "Radroots NIP-17 conformance message",
     11         "subject": "Conformance",
     12         "created_at": 1700000000
     13       },
     14       "expected": {
     15         "event_count": 1,
     16         "author": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df",
     17         "published_at": 1700000000,
     18         "content": "Radroots NIP-17 conformance message",
     19         "subject": "Conformance",
     20         "recipient_count": 1
     21       }
     22     },
     23     {
     24       "id": "message_file_roundtrip_single_recipient",
     25       "kind": "nip17.message_file.roundtrip",
     26       "input": {
     27         "recipient_public_key": "e0266e3cfb0d2886f91c73f5f868f3b98273713e5fcd97c081663f5518a4b3af",
     28         "file_url": "https://files.example/conformance-encrypted.bin",
     29         "file_type": "image/jpeg",
     30         "encryption_algorithm": "aes-gcm",
     31         "decryption_key": "fixture-decryption-key",
     32         "decryption_nonce": "fixture-decryption-nonce",
     33         "encrypted_hash": "fixture-encrypted-hash",
     34         "size": 1200,
     35         "width": 1200,
     36         "height": 800,
     37         "created_at": 1700000001
     38       },
     39       "expected": {
     40         "event_count": 1,
     41         "author": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df",
     42         "published_at": 1700000001,
     43         "file_url": "https://files.example/conformance-encrypted.bin",
     44         "file_type": "image/jpeg",
     45         "encrypted_hash": "fixture-encrypted-hash",
     46         "size": 1200,
     47         "width": 1200,
     48         "height": 800
     49       }
     50     },
     51     {
     52       "id": "message_rejects_invalid_recipient_without_echo",
     53       "kind": "nip17.message.invalid_recipient",
     54       "input": {
     55         "recipient_public_key": "fixture-private-recipient-not-a-key",
     56         "content": "fixture-private-content-must-not-escape",
     57         "created_at": 1700000002
     58       },
     59       "expected": {
     60         "error": "invalid_recipient"
     61       }
     62     }
     63   ]
     64 }