Add documentation for RippleAPI options

This commit is contained in:
Chris Clark
2015-11-23 11:56:22 -08:00
parent ef1e9e1b70
commit a76b554cad
3 changed files with 36 additions and 6 deletions

View File

@@ -103,6 +103,18 @@ All the code snippets in this documentation assume that you have surrounded them
If you omit the "catch" section, errors may not be visible. If you omit the "catch" section, errors may not be visible.
</aside> </aside>
### Parameters
Name | Type | Description
---- | ---- | -----------
authorization | string | *Optional* Username and password for HTTP basic authentication to the rippled server in the format **username:password**.
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`.
proxy | uri string | *Optional* URI for HTTP/HTTPS proxy to use to connect to the rippled server.
proxyAuthorization | string | *Optional* Username and password for HTTP basic authentication to the proxy in the format **username:password**.
servers | array\<uri string\> | *Optional* Array of rippled servers to connect to. Currently only one server is supported.
trace | boolean | *Optional* If true, log rippled requests and responses to stdout.
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.
### Installation ### ### Installation ###

View File

@@ -27,6 +27,10 @@ All the code snippets in this documentation assume that you have surrounded them
If you omit the "catch" section, errors may not be visible. If you omit the "catch" section, errors may not be visible.
</aside> </aside>
### Parameters
<%- renderSchema('input/api-options.json') %>
### Installation ### ### Installation ###

View File

@@ -3,29 +3,43 @@
"title": "api-options", "title": "api-options",
"type": "object", "type": "object",
"properties": { "properties": {
"trace": {"type": "boolean"}, "trace": {
"feeCushion": {"$ref": "value"}, "type": "boolean",
"description": "If true, log rippled requests and responses to stdout."
},
"feeCushion": {
"type": "number",
"minimum": 1,
"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`."
},
"servers": { "servers": {
"type": "array", "type": "array",
"description": "Array of rippled servers to connect to. Currently only one server is supported.",
"items": { "items": {
"type": "string", "type": "string",
"description": "URI for rippled websocket port. Must start with `wss://` or `ws://`.",
"format": "uri", "format": "uri",
"pattern": "^wss?://" "pattern": "^wss?://"
} }
}, },
"proxy": { "proxy": {
"format": "uri" "format": "uri",
"description": "URI for HTTP/HTTPS proxy to use to connect to the rippled server."
}, },
"proxyAuthorization": { "proxyAuthorization": {
"type": "string" "type": "string",
"description": "Username and password for HTTP basic authentication to the proxy in the format **username:password**."
}, },
"authorization": { "authorization": {
"type": "string" "type": "string",
"description": "Username and password for HTTP basic authentication to the rippled server in the format **username:password**."
}, },
"trustedCertificates": { "trustedCertificates": {
"type": "array", "type": "array",
"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.",
"items": { "items": {
"type": "string" "type": "string",
"description": "A PEM-formatted SSL certificate to trust when connecting to a proxy."
} }
} }
}, },