|
| 1 | +--- |
| 2 | +html: feature.html |
| 3 | +parent: utility-methods.html |
| 4 | +seo: |
| 5 | + description: Get information about protocol amendments. |
| 6 | +labels: |
| 7 | + - Blockchain |
| 8 | + - Core Server |
| 9 | +--- |
| 10 | + |
| 11 | +# feature |
| 12 | + |
| 13 | +[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/Feature1.cpp "Source")<br/> |
| 14 | + |
| 15 | +The `feature` command returns information about [amendments](../../../../concepts/networks-and-servers/amendments.md) this server knows about, including whether they are enabled and if the server knows how to apply the amendments. |
| 16 | + |
| 17 | +This is the non-admin version of the [`feature` admin RPC](../../admin-api-methods/status-and-debugging-methods/feature.md), and uses the same formatting, but hides potentially sensitive data. |
| 18 | + |
| 19 | +{% badge href="https://github.com/XRPLF/rippled/releases/tag/2.2.0" %}New in: rippled 2.2.0{% /badge %} |
| 20 | + |
| 21 | +## Request Format |
| 22 | + |
| 23 | +An example of the request format: |
| 24 | + |
| 25 | +{% tabs %} |
| 26 | + |
| 27 | +{% tab label="WebSocket" %} |
| 28 | +```json |
| 29 | +{ |
| 30 | + "id": "list_all_features", |
| 31 | + "command": "feature" |
| 32 | +} |
| 33 | +``` |
| 34 | +{% /tab %} |
| 35 | + |
| 36 | +{% tab label="JSON-RPC" %} |
| 37 | +```json |
| 38 | +{ |
| 39 | + "method": "feature", |
| 40 | + "params": [ |
| 41 | + { |
| 42 | + "feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373" |
| 43 | + } |
| 44 | + ] |
| 45 | +} |
| 46 | +``` |
| 47 | +{% /tab %} |
| 48 | + |
| 49 | +{% tab label="Commandline" %} |
| 50 | +```sh |
| 51 | +#Syntax: feature [<feature_id> [accept|reject]] |
| 52 | +rippled feature 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 |
| 53 | +``` |
| 54 | +{% /tab %} |
| 55 | + |
| 56 | +{% /tabs %} |
| 57 | + |
| 58 | +{% try-it method="feature" /%} |
| 59 | + |
| 60 | +The request includes the following parameters: |
| 61 | + |
| 62 | +| `Field` | Type | Description | |
| 63 | +|:----------|:--------|:-------------------------------------------------------| |
| 64 | +| `feature` | String | _(Optional)_ The unique ID of an amendment, as hexadecimal; or the short name of the amendment. If provided, limits the response to one amendment. Otherwise, the response lists all amendments. | |
| 65 | + |
| 66 | +<!-- {% admonition type="info" name="Note" %}You can configure your server to vote in favor of a new amendment, even if the server does not currently know how to apply that amendment, by specifying the amendment ID in the `feature` field. For example, you might want to do this if you plan to upgrade soon to a new `rippled` version that _does_ support the amendment.{% /admonition %} --> |
| 67 | + |
| 68 | +## Response Format |
| 69 | + |
| 70 | +An example of a successful response: |
| 71 | + |
| 72 | +{% tabs %} |
| 73 | + |
| 74 | +{% tab label="WebSocket - list all" %} |
| 75 | +```json |
| 76 | +{ |
| 77 | + "id": "list_all_features", |
| 78 | + "result": { |
| 79 | + "features": { |
| 80 | + "00C1FC4A53E60AB02C864641002B3172F38677E29C26C5406685179B37E1EDAC": { |
| 81 | + "enabled": true, |
| 82 | + "name": "RequireFullyCanonicalSig", |
| 83 | + "supported": true |
| 84 | + }, |
| 85 | + "0285B7E5E08E1A8E4C15636F0591D87F73CB6A7B6452A932AD72BBC8E5D1CBE3": { |
| 86 | + "enabled": false, |
| 87 | + "name": "fixNFTokenDirV1", |
| 88 | + "supported": true |
| 89 | + }, |
| 90 | + "03BDC0099C4E14163ADA272C1B6F6FABB448CC3E51F522F978041E4B57D9158C": { |
| 91 | + "enabled": true, |
| 92 | + "name": "fixNFTokenReserve", |
| 93 | + "supported": true |
| 94 | + }, |
| 95 | + "07D43DCE529B15A10827E5E04943B496762F9A88E3268269D69C44BE49E21104": { |
| 96 | + "enabled": false, |
| 97 | + "name": "Escrow", |
| 98 | + "supported": true |
| 99 | + }, |
| 100 | + "08DE7D96082187F6E6578530258C77FAABABE4C20474BDB82F04B021F1A68647": { |
| 101 | + "enabled": false, |
| 102 | + "name": "PayChan", |
| 103 | + "supported": true |
| 104 | + }, |
| 105 | + |
| 106 | + "status": "success" |
| 107 | + } |
| 108 | +} |
| 109 | +``` |
| 110 | +{% /tab %} |
| 111 | + |
| 112 | +{% tab label="JSON-RPC" %} |
| 113 | +```json |
| 114 | +200 OK |
| 115 | + |
| 116 | +{ |
| 117 | + "result": { |
| 118 | + "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": { |
| 119 | + "enabled": false, |
| 120 | + "name": "MultiSign", |
| 121 | + "supported": true |
| 122 | + }, |
| 123 | + "status": "success" |
| 124 | + } |
| 125 | +} |
| 126 | +``` |
| 127 | +{% /tab %} |
| 128 | + |
| 129 | +{% tab label="Commandline" %} |
| 130 | +```json |
| 131 | +Loading: "/etc/rippled.cfg" |
| 132 | +Connecting to 127.0.0.1:5005 |
| 133 | + |
| 134 | +{ |
| 135 | + "result": { |
| 136 | + "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373": { |
| 137 | + "enabled": false, |
| 138 | + "name": "MultiSign", |
| 139 | + "supported": true |
| 140 | + }, |
| 141 | + "status": "success" |
| 142 | + } |
| 143 | +} |
| 144 | +``` |
| 145 | +{% /tab %} |
| 146 | + |
| 147 | +{% /tabs %} |
| 148 | + |
| 149 | +The response follows the [standard format][], with a successful result containing **a map of amendments** as a JSON object. The keys of the object are amendment IDs. The values for each key are _amendment objects_ that describe the status of the amendment with that ID. If the request specified a `feature`, the map contains only the requested amendment object, after applying any changes from the request. Each amendment object has the following fields: |
| 150 | + |
| 151 | +| `Field` | Type | Description | |
| 152 | +|:------------|:--------|:-----------------------------------------------------| |
| 153 | +| `enabled` | Boolean | Whether this amendment is currently enabled in the latest ledger. | |
| 154 | +| `name` | String | (May be omitted) The human-readable name for this amendment, if known. | |
| 155 | +| `supported` | Boolean | Whether the server knows how to apply this amendment. If this field is set to `false` (the server does not know how to apply this amendment) and `enabled` is set to `true` (this amendment is enabled in the latest ledger), this amendment may cause your server to be [amendment blocked](../../../../concepts/networks-and-servers/amendments.md#amendment-blocked-servers). | |
| 156 | + |
| 157 | +{% admonition type="warning" name="Caution" %}The `name` for an amendment does not strictly indicate what that amendment does. The name is not guaranteed to be unique or consistent across servers.{% /admonition %} |
| 158 | + |
| 159 | +## Possible Errors |
| 160 | + |
| 161 | +- Any of the [universal error types][]. |
| 162 | +- `badFeature` - The `feature` specified was invalidly formatted, or the server does not know an amendment with that name. |
| 163 | +- `noPermission` - The user does not have permission to run the specified command (i.e., `vetoed`). |
| 164 | +- `reportingUnsupported` - ([Reporting Mode][] servers only) This method is not available in Reporting Mode. |
| 165 | + |
| 166 | +{% raw-partial file="/docs/_snippets/common-links.md" /%} |
0 commit comments