|
| 1 | +--- |
| 2 | +namespace-identifier: hive-caip10 |
| 3 | +title: Hive Namespace - CAIP-10 Account Identifiers |
| 4 | +author: ["@feruzm"] |
| 5 | +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/174 |
| 6 | +status: Draft |
| 7 | +type: Standard |
| 8 | +created: 2026-02-25 |
| 9 | +requires: ["CAIP-2", "CAIP-10"] |
| 10 | +--- |
| 11 | + |
| 12 | +# CAIP-10 |
| 13 | + |
| 14 | +For context, see the [CAIP-10] specification. |
| 15 | + |
| 16 | +## Rationale |
| 17 | + |
| 18 | +Hive uses account-based identity with human-readable account names rather than hexadecimal address formats. |
| 19 | + |
| 20 | +Each Hive account name: |
| 21 | + |
| 22 | +- Is globally unique within a Hive network |
| 23 | +- Is used directly in transaction operations |
| 24 | +- Is validated at the protocol level |
| 25 | +- Is constrained by naming rules enforced by consensus |
| 26 | + |
| 27 | +Because Hive [accounts] are stable identifiers and tied to a specific chain via `chain_id`, they are suitable for CAIP-10 account identifiers. |
| 28 | + |
| 29 | +## Specification |
| 30 | + |
| 31 | +A Hive [CAIP-10] account identifier MUST follow: |
| 32 | + |
| 33 | +`hive:<reference>:<account>` |
| 34 | + |
| 35 | +Where: |
| 36 | + |
| 37 | +- `hive` is the namespace |
| 38 | +- `<reference>` is defined by the Hive CAIP-2 profile |
| 39 | +- `<account>` is a valid Hive account name |
| 40 | + |
| 41 | +### Account Format |
| 42 | + |
| 43 | +Hive account names MUST: |
| 44 | + |
| 45 | +- Be between 3 and 16 characters in total length |
| 46 | +- Start with a lowercase letter (`a-z`) |
| 47 | +- Contain only lowercase letters (`a-z`), digits (`0-9`), hyphens (`-`), and dots (`.`) |
| 48 | +- Not start or end with a hyphen or dot |
| 49 | +- Not contain consecutive hyphens or dots |
| 50 | +- If dot-separated, each segment must be at least 3 characters and start with a letter |
| 51 | + |
| 52 | +Regex: |
| 53 | + |
| 54 | +``` |
| 55 | +^(?=.{3,16}$)[a-z]([0-9a-z]|[0-9a-z\-](?=[0-9a-z])){2,}([\.](?=[a-z][0-9a-z\-][0-9a-z\-])[a-z]([0-9a-z]|[0-9a-z\-](?=[0-9a-z])){1,}){0,}$ |
| 56 | +``` |
| 57 | + |
| 58 | +### Resolution |
| 59 | + |
| 60 | +To validate a Hive CAIP-10 identifier: |
| 61 | + |
| 62 | +1. Parse the namespace (`hive`). |
| 63 | +2. Validate the CAIP-2 reference according to the Hive CAIP-2 profile. |
| 64 | +3. Validate the account name against Hive naming rules. |
| 65 | +4. Query a Hive RPC endpoint to confirm account existence. |
| 66 | + |
| 67 | +Account existence may be verified via: |
| 68 | + |
| 69 | +- `condenser_api.get_accounts` |
| 70 | +- `database_api.find_accounts` |
| 71 | + |
| 72 | +#### Example Request |
| 73 | + |
| 74 | +```json |
| 75 | +{ |
| 76 | + "jsonrpc": "2.0", |
| 77 | + "method": "condenser_api.get_accounts", |
| 78 | + "params": [["ecency"]], |
| 79 | + "id": 1 |
| 80 | +} |
| 81 | +``` |
| 82 | + |
| 83 | +## Examples |
| 84 | + |
| 85 | +### Hive Mainnet |
| 86 | + |
| 87 | +``` |
| 88 | +hive:beeab0de000000000000000000000000:ecency |
| 89 | +hive:beeab0de000000000000000000000000:good-karma |
| 90 | +hive:beeab0de000000000000000000000000:hive.fund |
| 91 | +hive:beeab0de000000000000000000000000:v4vapp.dhf |
| 92 | +``` |
| 93 | + |
| 94 | +### Hive Mirrornet |
| 95 | + |
| 96 | +``` |
| 97 | +hive:42000000000000000000000000000000:testuser |
| 98 | +``` |
| 99 | + |
| 100 | +## Security Considerations |
| 101 | + |
| 102 | +Hive account names are human-readable and may be subject to phishing using visually similar names (e.g., `ecency` vs `ecency-fake`). |
| 103 | + |
| 104 | +Applications SHOULD: |
| 105 | + |
| 106 | +- Validate account existence before processing transactions |
| 107 | +- Display full CAIP-10 identifiers when clarity is required |
| 108 | +- Not assume account ownership without authority verification |
| 109 | + |
| 110 | +Because Hive supports multiple authorities (owner, active, posting), CAIP-10 identifiers represent accounts, not individual keys. |
| 111 | + |
| 112 | +## Test Cases |
| 113 | + |
| 114 | +Valid: |
| 115 | + |
| 116 | +``` |
| 117 | +hive:beeab0de000000000000000000000000:ecency |
| 118 | +hive:beeab0de000000000000000000000000:good-karma |
| 119 | +hive:beeab0de000000000000000000000000:hive.fund |
| 120 | +hive:beeab0de000000000000000000000000:gtg |
| 121 | +hive:42000000000000000000000000000000:test-account |
| 122 | +``` |
| 123 | + |
| 124 | +Invalid: |
| 125 | + |
| 126 | +``` |
| 127 | +hive:beeab0de000000000000000000000000:UpperCase |
| 128 | +hive:beeab0de000000000000000000000000:ab |
| 129 | +hive:beeab0de000000000000000000000000:-invalid |
| 130 | +hive:beeab0de000000000000000000000000:3digits |
| 131 | +hive:beeab0de000000000000000000000000:has..double |
| 132 | +``` |
| 133 | + |
| 134 | +## References |
| 135 | + |
| 136 | +- Hive configuration and [accounts] model |
| 137 | + |
| 138 | +[accounts]: https://developers.hive.io/tutorials-recipes/understanding-configuration-values.html |
| 139 | +[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 |
| 140 | + |
| 141 | +## Copyright |
| 142 | + |
| 143 | +Copyright and related rights waived via CC0 1.0. |
0 commit comments