Skip to content

Commit a76b554

Browse files
author
Chris Clark
committed
Add documentation for RippleAPI options
1 parent ef1e9e1 commit a76b554

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

docs/index.md

+12
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ All the code snippets in this documentation assume that you have surrounded them
103103
If you omit the "catch" section, errors may not be visible.
104104
</aside>
105105

106+
### Parameters
107+
108+
Name | Type | Description
109+
---- | ---- | -----------
110+
authorization | string | *Optional* Username and password for HTTP basic authentication to the rippled server in the format **username:password**.
111+
feeCushion | number | *Optional* Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`.
112+
proxy | uri string | *Optional* URI for HTTP/HTTPS proxy to use to connect to the rippled server.
113+
proxyAuthorization | string | *Optional* Username and password for HTTP basic authentication to the proxy in the format **username:password**.
114+
servers | array\<uri string\> | *Optional* Array of rippled servers to connect to. Currently only one server is supported.
115+
trace | boolean | *Optional* If true, log rippled requests and responses to stdout.
116+
trustedCertificates | array\<string\> | *Optional* Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.
117+
106118

107119
### Installation ###
108120

docs/src/boilerplate.md.ejs

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ All the code snippets in this documentation assume that you have surrounded them
2727
If you omit the "catch" section, errors may not be visible.
2828
</aside>
2929

30+
### Parameters
31+
32+
<%- renderSchema('input/api-options.json') %>
33+
3034

3135
### Installation ###
3236

src/common/schemas/input/api-options.json

+20-6
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,43 @@
33
"title": "api-options",
44
"type": "object",
55
"properties": {
6-
"trace": {"type": "boolean"},
7-
"feeCushion": {"$ref": "value"},
6+
"trace": {
7+
"type": "boolean",
8+
"description": "If true, log rippled requests and responses to stdout."
9+
},
10+
"feeCushion": {
11+
"type": "number",
12+
"minimum": 1,
13+
"description": "Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`."
14+
},
815
"servers": {
916
"type": "array",
17+
"description": "Array of rippled servers to connect to. Currently only one server is supported.",
1018
"items": {
1119
"type": "string",
20+
"description": "URI for rippled websocket port. Must start with `wss://` or `ws://`.",
1221
"format": "uri",
1322
"pattern": "^wss?://"
1423
}
1524
},
1625
"proxy": {
17-
"format": "uri"
26+
"format": "uri",
27+
"description": "URI for HTTP/HTTPS proxy to use to connect to the rippled server."
1828
},
1929
"proxyAuthorization": {
20-
"type": "string"
30+
"type": "string",
31+
"description": "Username and password for HTTP basic authentication to the proxy in the format **username:password**."
2132
},
2233
"authorization": {
23-
"type": "string"
34+
"type": "string",
35+
"description": "Username and password for HTTP basic authentication to the rippled server in the format **username:password**."
2436
},
2537
"trustedCertificates": {
2638
"type": "array",
39+
"description": "Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.",
2740
"items": {
28-
"type": "string"
41+
"type": "string",
42+
"description": "A PEM-formatted SSL certificate to trust when connecting to a proxy."
2943
}
3044
}
3145
},

0 commit comments

Comments
 (0)