public_values.v1.json (6345B)
1 { 2 "suite": "identity_public_values", 3 "contract_version": "1.0.0", 4 "vectors": [ 5 { 6 "id": "identity_public_key_canonical_hex_001", 7 "kind": "identity.public_key.serde", 8 "input": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 9 "expected": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 10 }, 11 { 12 "id": "identity_identity_id_canonical_hex_002", 13 "kind": "identity.identity_id.serde", 14 "input": "E0266E3CFB0D2886F91C73F5F868F3B98273713E5FCD97C081663F5518A4B3AF", 15 "expected": "e0266e3cfb0d2886f91c73f5f868f3b98273713e5fcd97c081663f5518a4b3af" 16 }, 17 { 18 "id": "identity_account_id_canonical_hex_003", 19 "kind": "identity.account_id.serde", 20 "input": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 21 "expected": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 22 }, 23 { 24 "id": "identity_username_canonical_text_004", 25 "kind": "identity.username.serde", 26 "input": " Alice.Farm ", 27 "expected": "alice.farm" 28 }, 29 { 30 "id": "identity_profile_canonical_username_005", 31 "kind": "identity.profile.serde", 32 "input": { 33 "username": "Alice.Farm" 34 }, 35 "expected": { 36 "username": "alice.farm" 37 } 38 }, 39 { 40 "id": "identity_public_identity_discards_empty_profile_006", 41 "kind": "identity.public_identity.serde", 42 "input": { 43 "id": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 44 "public_key": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 45 "profile": {} 46 }, 47 "expected": { 48 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 49 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 50 } 51 }, 52 { 53 "id": "identity_account_record_canonical_nested_values_007", 54 "kind": "identity.account_record.serde", 55 "input": { 56 "account_id": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 57 "public_identity": { 58 "id": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 59 "public_key": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF" 60 }, 61 "label": "primary", 62 "created_at_unix": 10, 63 "updated_at_unix": 12 64 }, 65 "expected": { 66 "account_id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 67 "public_identity": { 68 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 69 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 70 }, 71 "label": "primary", 72 "created_at_unix": 10, 73 "updated_at_unix": 12 74 } 75 }, 76 { 77 "id": "identity_account_status_canonical_ready_008", 78 "kind": "identity.account_status.serde", 79 "input": { 80 "ready": { 81 "account": { 82 "account_id": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 83 "public_identity": { 84 "id": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF", 85 "public_key": "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF" 86 }, 87 "created_at_unix": 10, 88 "updated_at_unix": 10 89 } 90 } 91 }, 92 "expected": { 93 "ready": { 94 "account": { 95 "account_id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 96 "public_identity": { 97 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 98 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 99 }, 100 "created_at_unix": 10, 101 "updated_at_unix": 10 102 } 103 } 104 } 105 }, 106 { 107 "id": "identity_public_key_rejects_invalid_curve_point_009", 108 "kind": "identity.public_key.invalid", 109 "input": "0000000000000000000000000000000000000000000000000000000000000000", 110 "expected_error_contains": "valid secp256k1" 111 }, 112 { 113 "id": "identity_public_identity_rejects_mismatched_id_010", 114 "kind": "identity.public_identity.invalid", 115 "input": { 116 "id": "e0266e3cfb0d2886f91c73f5f868f3b98273713e5fcd97c081663f5518a4b3af", 117 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 118 }, 119 "expected_error_contains": "does not match its public key" 120 }, 121 { 122 "id": "identity_account_record_rejects_mismatched_id_011", 123 "kind": "identity.account_record.invalid", 124 "input": { 125 "account_id": "e0266e3cfb0d2886f91c73f5f868f3b98273713e5fcd97c081663f5518a4b3af", 126 "public_identity": { 127 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 128 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 129 }, 130 "created_at_unix": 10, 131 "updated_at_unix": 10 132 }, 133 "expected_error_contains": "does not match its public identity" 134 }, 135 { 136 "id": "identity_account_record_rejects_time_reversal_012", 137 "kind": "identity.account_record.invalid", 138 "input": { 139 "account_id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 140 "public_identity": { 141 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 142 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" 143 }, 144 "created_at_unix": 10, 145 "updated_at_unix": 9 146 }, 147 "expected_error_contains": "precedes created timestamp" 148 }, 149 { 150 "id": "identity_username_rejects_dot_placement_013", 151 "kind": "identity.username.invalid", 152 "input": ".alice", 153 "expected_error_contains": "dots cannot be" 154 }, 155 { 156 "id": "identity_public_identity_rejects_unknown_field_014", 157 "kind": "identity.public_identity.invalid", 158 "input": { 159 "id": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 160 "public_key": "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", 161 "secret_key": "forbidden" 162 }, 163 "expected_error_contains": "unknown field" 164 } 165 ] 166 }