This website is no longer actively supported. Please see the Ripple Developer Center for up-to-date documentation and other resources.

Ripple.txt

From Ripple Wiki
Jump to: navigation, search

Introduction

To help ensure the robustness of the Ripple network, web sites may publish Ripple network information.

Publishing ripple.txt

Given the domain "DOMAIN", the Ripple servers and clients search for this file in this order:

  • https://ripple.DOMAIN/ripple.txt
  • https://www.DOMAIN/ripple.txt
  • https://DOMAIN/ripple.txt

To support access to this file via browser scripts, the following HTTP header MUST be set for all requests to ripple.txt and its dependent files.

Access-Control-Allow-Origin: *

Important: You should only enable CORS for ripple.txt (or any files it references), so for example in Apache you would set something like:

        <Location "/ripple.txt">
                Header set Access-Control-Allow-Origin "*"
        </Location>

Or in nginx:

        location /ripple.txt {
                add_header 'Access-Control-Allow-Origin' '*';
        }

For other webservers, see also: I want to add CORS support to my server

To test whether your ripple.txt is set up correctly, please use this tool: https://ripple.com/build/ripple-txt-validator/

Manually testing CORS

  1. Run a curl command similar to below.
  2. Verify the Access-Control-Allow-Origin header is present as shown below.
  3. Also run the command on a page that should not have it.
  4. Verify the header is missing.
$ curl -s -D - -X OPTIONS https://ripple.com/chart/BTC/USD/orderbook.json -o /dev/null
HTTP/1.1 200 OK
Date: Mon, 18 Mar 2013 02:49:59 GMT
Connection: close
Transfer-Encoding: chunked
Access-Control-Allow-Origin: *

Example

This is an example of the file, see the github repository for the latest version of the example.

https://domain/ripple.txt:

#
# Sample ripple.txt
#
# More information: https://ripple.com/wiki/Ripple.txt
#
# Publishing this file allows a site to declare in a trustworthy manor ripple
# associated information.
#
# This file is stored on the web server for a domain.  This file is searched
# for in the following order:
# - https://ripple.DOMAIN/ripple.txt
# - https://www.DOMAIN/ripple.txt
# - https://DOMAIN/ripple.txt
#
# The server MUST set the following HTTP header when serving this file:
#  Access-Control-Allow-Origin: *
#
# This file is UTF-8 with Dos, UNIX, or Mac style end of lines.
# Blank lines and lines beginning with '#' are ignored.
# Undefined sections are reserved.
# No escapes are currently defined.
#
# IMPORTANT: Please remove these comments before publishing this file. Doing so
# makes the file much more readable to humans trying to find info on your site. 
#
# [expires]
#   Number of days after which this file should be considered expire.  Clients
#   are expected to check this file when they have cause to believe it has
#   changed or expired. For example, if a client discovers an account declares
#   that it is associated with the domain, it should check to see if this file
#   has been updated. If an expiration date is not declared, the default
#   expiration for this file is 30 days.
#
#   Example: 30
#
# [accounts]
#   Only valid in "ripple.txt". A list of accounts that are declared to be
#   controlled by this domain. A client wishing to indicate that an account is
#   verified as belonging to a domain will be show the account with a green
#   background. A client can verify that an account belongs to a domain by
#   checking if the account's root entry mentions the domain containing this
#   file and this file found at the domain mentions the account in this
#   section.
#
#   Example: rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn
#
# [hotwallets]
#   Only valid in "ripple.txt". A list of accounts that are declared to be
#   controlled by this domain and used as hotwallets.
#
#   Example: rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn
#
# [validation_public_key]:
#   Only valid in "ripple.txt". A validation public key that is declared
#   to be used by this domain for validating ledgers and that it is the
#   authorized signature for the domain. This does not imply that a node
#   serving the Ripple protocol is avilable at the web host providing the
#   file.
#
#   Example: n9MZTnHe5D5Q2cgE8oV2usFwRqhUvEA8MwP5Mu1XVD6TxmssPRev
#
# [domain]:
#   Mandatory in "ripple.txt".
#   Only valid in "ripple.txt".
#   Must match location of file.
#
#   Example: google.com
#
# [ips]:
#   Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
#   List of ips where the Ripple protocol is avialable.
#   One ipv4 or ipv6 address per line.
#   A port may optionally be specified after adding a space to the address.
#   By convention, if known, IPs are listed in from most to least trusted.
#
#   Examples:
#    192.168.0.1
#    192.168.0.1 3939
#    2001:0db8:0100:f101:0210:a4ff:fee3:9566
#
# [validators]:
#   Only valid in "rippled.cfg", "ripple.txt", and the referered [validators_url].
#   List of Ripple validators this node recommends.
#
#   For domains, rippled will probe for https web servers at the specied
#   domain in the following order: ripple.DOMAIN, www.DOMAIN, DOMAIN
#
#   Examples:
#    redstem.com
#    n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5
#    n9MqiExBcoG19UXwoLjBJnhsxEhAZMuWwJDRdkyDz1EkEkwzQTNt John Doe
#
# [ips_url]:
#   Only valid in "ripple.txt".
#   https URL to a similarily formatted file containing [ips].
#
#   Example: https://google.com/ripple_ips.txt
#
# [validators_url]:
#   Only valid in "ripple.txt".
#   https URL to a similarily formatted file containing [validators].
#
#   Example: https://google.com/ripple_validators.txt
#
# [currencies]:
#   This section allows a site to declare currencies it currently issues.
#  
#   Examples: (multiple allowed one per line)
#    USD
#    BTC
#    LTC
#

[validation_public_key]
n9MZTnHe5D5Q2cgE8oV2usFwRqhUvEA8MwP5Mu1XVD6TxmssPRev

[domain]
loss

[ips]
192.168.0.5

[validators]
redstem.com

Validation Information

When a Ripple server is started for the first time, it uses an initial list of validators: validators.txt It uses this list to retrieve validation information and form its UNL.

Publishing this file allows sites to provide their hanko in a trust worthy manor.

Connectivity Information

This is a list of nodes that are a part of the Ripple network.

This URL is used by convention and must be specified in the ripple.txt file.

The format of the file is as the ripple.txt file.

Recommendation Information

This is a list of sites that the site recommends be trusted. This provides a way for the list of trusted sites to somewhat securely be grown.

This list should be manually installed by site administrators.

Ripple servers may periodically retrieve this file and then choose to trust the mentioned sites if a sufficient number of sites in their UNL also recommend the sites.

This URL is used by convention and must be specified in the ripple.txt file.

The format of the file is as the ripple.txt file.