lib

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

mvp.v1.json (3378B)


      1 {
      2   "suite": "social_mvp",
      3   "contract_version": "1.0.0",
      4   "vectors": [
      5     {
      6       "id": "social_reaction_empty_content_valid_008",
      7       "kind": "social.reaction.build_tags.valid",
      8       "input": {
      9         "reaction": {
     10           "target": {
     11             "kind": "address",
     12             "address": "30023:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc:AAAAAAAAAAAAAAAAAAAAAg",
     13             "author": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
     14             "event_kind": 30023,
     15             "relays": [
     16               "wss://relay.example.test"
     17             ]
     18           },
     19           "content": ""
     20         }
     21       },
     22       "expected": {
     23         "result": "ok",
     24         "required_tags": [
     25           "a",
     26           "p",
     27           "k"
     28         ]
     29       }
     30     },
     31     {
     32       "id": "social_reaction_missing_target_invalid_009",
     33       "kind": "social.reaction.parse_event.invalid",
     34       "input": {
     35         "event": {
     36           "kind": 7,
     37           "content": "+",
     38           "tags": []
     39         }
     40       },
     41       "expected": {
     42         "result": "error",
     43         "error_class": "parse_error",
     44         "missing_target": true
     45       }
     46     },
     47     {
     48       "id": "social_article_tags_valid_010",
     49       "kind": "social.article.build_tags.valid",
     50       "input": {
     51         "article": {
     52           "d_tag": "AAAAAAAAAAAAAAAAAAAAAg",
     53           "title": "soil notes",
     54           "content": "# soil notes",
     55           "summary": "cover crop observations",
     56           "published_at": 1780000000,
     57           "topics": [
     58             "soil",
     59             "cover-crops"
     60           ]
     61         }
     62       },
     63       "expected": {
     64         "result": "ok",
     65         "required_tags": [
     66           "d",
     67           "title",
     68           "summary",
     69           "published_at",
     70           "t"
     71         ]
     72       }
     73     },
     74     {
     75       "id": "social_article_missing_title_invalid_011",
     76       "kind": "social.article.build_tags.invalid",
     77       "input": {
     78         "article": {
     79           "d_tag": "AAAAAAAAAAAAAAAAAAAAAg",
     80           "title": "",
     81           "content": "# soil notes"
     82         }
     83       },
     84       "expected": {
     85         "result": "error",
     86         "error_class": "encode_error",
     87         "field": "title"
     88       }
     89     },
     90     {
     91       "id": "social_file_metadata_public_valid_012",
     92       "kind": "social.file_metadata.build_tags.valid",
     93       "input": {
     94         "metadata": {
     95           "url": "https://media.example.test/public.jpg",
     96           "mime_type": "image/jpeg",
     97           "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
     98           "magnet": "magnet:?xt=urn:btih:abc",
     99           "content_hashes": [
    100             "sha256:field"
    101           ],
    102           "services": [
    103             "https://media.example.test"
    104           ]
    105         }
    106       },
    107       "expected": {
    108         "result": "ok",
    109         "required_tags": [
    110           "url",
    111           "m",
    112           "x",
    113           "magnet",
    114           "i",
    115           "service"
    116         ]
    117       }
    118     },
    119     {
    120       "id": "social_file_metadata_bad_hash_invalid_013",
    121       "kind": "social.file_metadata.build_tags.invalid",
    122       "input": {
    123         "metadata": {
    124           "url": "https://media.example.test/public.jpg",
    125           "mime_type": "image/jpeg",
    126           "sha256": "not-a-sha"
    127         }
    128       },
    129       "expected": {
    130         "result": "error",
    131         "error_class": "encode_error",
    132         "field": "sha256"
    133       }
    134     }
    135   ]
    136 }