|
2 | 2 | title: Stellar.toml
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -# Introduction |
| 5 | +The stellar.toml file is what you use to publish information about your organization and your Stellar integration. For the complete spec and more information on what it contains, check out [SEP-0001](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0001.md). |
6 | 6 |
|
7 |
| -The `stellar.toml` file is used to provide a common place where the Internet can find information about your domain's Stellar integration. Any website can publish Stellar network information. You can announce your validation key, your [federation](./federation.md) server, peers you are running, your quorum set, if you are an anchor, etc. |
| 7 | +By setting the homedomain of your Stellar account to the domain that hosts your stellar.toml, you can create a definitive link between this information and that account. Any website can publish Stellar network information, and the stellar.toml is designed to be readable by both humans and machines. |
8 | 8 |
|
9 |
| -The stellar.toml file is a text file in the [TOML format](https://github.com/toml-lang/toml). |
| 9 | +If you are an anchor or issuer, the stellar.toml file serves a very important purpose: it allows you to publish information about your organization and token(s) that help to legitimize your offerings. Clients and exchanges can use this information to decide whether a token should be listed. Fully and truthfully disclosing contact and business information is an essential step in responsible token issuance. |
10 | 10 |
|
11 |
| -## Publishing stellar.toml |
12 |
| - |
13 |
| -Given the domain "DOMAIN", the stellar.toml will be searched for at the following location: |
14 |
| - |
15 |
| -`https://DOMAIN/.well-known/stellar.toml` |
16 |
| - |
17 |
| -## Enabling cross-origin resource sharing (CORS) |
18 |
| -You must enable CORS on the stellar.toml so people can access this file from other sites. The following HTTP header *must* be set for a HTTP response for `stellar.toml` file request. |
19 |
| - |
20 |
| -``` |
21 |
| -Access-Control-Allow-Origin: * |
22 |
| -``` |
23 |
| - |
24 |
| -**Important**: Only enable CORS for stellar.toml (or any files it references). For example, in Apache you would set something like: |
25 |
| - |
26 |
| -```xml |
27 |
| -<Location "/.well-known/stellar.toml"> |
28 |
| - Header set Access-Control-Allow-Origin "*" |
29 |
| -</Location> |
30 |
| -``` |
31 |
| - |
32 |
| -Or in nginx: |
33 |
| - |
34 |
| -``` |
35 |
| -location /.well-known/stellar.toml { |
36 |
| - add_header 'Access-Control-Allow-Origin' '*'; |
37 |
| -} |
38 |
| -``` |
39 |
| - |
40 |
| -For other web servers, see: http://enable-cors.org/server.html |
41 |
| - |
42 |
| -## Testing CORS |
43 |
| - |
44 |
| -1. Run a curl command in your terminal similar to the following (replace stellar.org with the hosting location of your stellar.toml file): |
45 |
| - |
46 |
| - ```bash |
47 |
| - curl --head https://stellar.org/.well-known/stellar.toml |
48 |
| - ``` |
49 |
| - |
50 |
| -2. Verify the `Access-Control-Allow-Origin` header is present as shown below. |
51 |
| - |
52 |
| - ```bash |
53 |
| - curl --head https://stellar.org/.well-known/stellar.toml |
54 |
| - HTTP/1.1 200 OK |
55 |
| - Accept-Ranges: bytes |
56 |
| - Access-Control-Allow-Origin: * |
57 |
| - Content-length: 482 |
58 |
| - ... |
59 |
| - ``` |
60 |
| - |
61 |
| -3. Also run the command on a page that should not have it and verify the `Access-Control-Allow-Origin` header is missing. |
62 |
| - |
63 |
| -## Stellar.toml example |
64 |
| - |
65 |
| -This file is UTF-8 with Dos-, UNIX-, or Mac-style end of lines. |
66 |
| -Blank lines and lines beginning with '#' are ignored. |
67 |
| -Undefined sections are reserved. |
68 |
| -All sections are optional. |
69 |
| -Many of these sections reflect what would be listed in your [stellar-core.cfg](https://github.com/stellar/stellar-core/blob/master/docs/stellar-core_example.cfg) |
70 |
| - |
71 |
| -```toml |
72 |
| -# Sample stellar.toml |
73 |
| - |
74 |
| -# The endpoint which clients should query to resolve stellar addresses |
75 |
| -# for users on your domain. |
76 |
| -FEDERATION_SERVER="https://api.stellar.org/federation" |
77 |
| - |
78 |
| -# The endpoint used for the compliance protocol |
79 |
| -AUTH_SERVER="https://api.stellar.org/auth" |
80 |
| - |
81 |
| -# The signing key is used for the compliance protocol |
82 |
| -SIGNING_KEY="GBBHQ7H4V6RRORKYLHTCAWP6MOHNORRFJSDPXDFYDGJB2LPZUFPXUEW3" |
83 |
| - |
84 |
| -# convenience mapping of common names to node IDs. |
85 |
| -# You can use these common names in sections below instead of the less friendly nodeID. |
86 |
| -# This is provided mainly to be compatible with the stellar-core.cfg |
87 |
| -NODE_NAMES=[ |
88 |
| -"GD5DJQDDBKGAYNEAXU562HYGOOSYAEOO6AS53PZXBOZGCP5M2OPGMZV3 lab1", |
89 |
| -"GB6REF5GOGGSEHZ3L2YK6K4T4KX3YDMWHDCPMV7MZJDLHBDNZXEPRBGM donovan", |
90 |
| -"GBGR22MRCIVW2UZHFXMY5UIBJGPYABPQXQ5GGMNCSUM2KHE3N6CNH6G5 nelisky1", |
91 |
| -"GDXWQCSKVYAJSUGR2HBYVFVR7NA7YWYSYK3XYKKFO553OQGOHAUP2PX2 jianing", |
92 |
| -"GAOO3LWBC4XF6VWRP5ESJ6IBHAISVJMSBTALHOQM2EZG7Q477UWA6L7U anchor" |
93 |
| -] |
94 |
| - |
95 |
| -# A list of accounts that are controlled by this domain. |
96 |
| -ACCOUNTS=[ |
97 |
| -"$sdf_watcher1", |
98 |
| -"GAENZLGHJGJRCMX5VCHOLHQXU3EMCU5XWDNU4BGGJFNLI2EL354IVBK7" |
99 |
| -] |
100 |
| - |
101 |
| -# Any validation public keys that are declared |
102 |
| -# to be used by this domain for validating ledgers and are |
103 |
| -# authorized signers for the domain. |
104 |
| -OUR_VALIDATORS=[ |
105 |
| -"$sdf_watcher2", |
106 |
| -"GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH" |
107 |
| -] |
108 |
| - |
109 |
| -# DESIRED_BASE_FEE (integer) |
110 |
| -# This is what you would prefer the base fee to be. It is in stroops. |
111 |
| -DESIRED_BASE_FEE=100 |
112 |
| - |
113 |
| -# DESIRED_MAX_TX_PER_LEDGER (integer) |
114 |
| -# This is how many maximum transactions per ledger you would like to process. |
115 |
| -DESIRED_MAX_TX_PER_LEDGER=400 |
116 |
| - |
117 |
| -# List of IPs of known stellar-core's. |
118 |
| -# These are IP:port strings. |
119 |
| -# Port is optional. |
120 |
| -# By convention, IPs are listed from most to least trusted, if that information is known. |
121 |
| -KNOWN_PEERS=[ |
122 |
| -"192.168.0.1", |
123 |
| -"core-testnet1.stellar.org", |
124 |
| -"core-testnet2.stellar.org:11290", |
125 |
| -"2001:0db8:0100:f101:0210:a4ff:fee3:9566" |
126 |
| -] |
127 |
| - |
128 |
| -# list of history archives maintained by this domain |
129 |
| -HISTORY=[ |
130 |
| -"http://history.stellar.org/prd/core-live/core_live_001/", |
131 |
| -"http://history.stellar.org/prd/core-live/core_live_002/", |
132 |
| -"http://history.stellar.org/prd/core-live/core_live_003/" |
133 |
| -] |
134 |
| - |
135 |
| -# This section allows an anchor to declare currencies it currently issues. |
136 |
| -# Can be used by wallets and clients to trust anchors by domain name |
137 |
| -[[CURRENCIES]] |
138 |
| -code="USD" |
139 |
| -issuer="GCZJM35NKGVK47BB4SPBDV25477PZYIYPVVG453LPYFNXLS3FGHDXOCM" |
140 |
| -display_decimals=2 # Specifies how many decimal places should be displayed by clients to end users. |
141 |
| - |
142 |
| -[[CURRENCIES]] |
143 |
| -code="BTC" |
144 |
| -issuer="$anchor" |
145 |
| -display_decimals=7 # Maximum decimal places that can be represented is 7 |
146 |
| - |
147 |
| -# asset with meta info |
148 |
| -[[CURRENCIES]] |
149 |
| -code="GOAT" |
150 |
| -issuer="GD5T6IPRNCKFOHQWT264YPKOZAWUMMZOLZBJ6BNQMUGPWGRLBK3U7ZNP" |
151 |
| -display_decimals=2 |
152 |
| -name="goat share" |
153 |
| -desc="1 GOAT token entitles you to a share of revenue from Elkins Goat Farm." |
154 |
| -conditions="There will only ever be 10,000 GOAT tokens in existence. We will distribute the revenue share annually on Jan. 15th" |
155 |
| -image="https://pbs.twimg.com/profile_images/666921221410439168/iriHah4f.jpg" |
156 |
| - |
157 |
| -# Potential quorum set of this domain's validators. |
158 |
| -[QUORUM_SET] |
159 |
| -VALIDATORS=[ |
160 |
| -"$self", "$lab1", "$nelisky1","$jianing", |
161 |
| -"$eno","$donovan" |
162 |
| -] |
163 |
| - |
164 |
| -# optional extra information for humans |
165 |
| -# Useful place for anchors to detail various policies and required info |
166 |
| - |
167 |
| -################################### |
168 |
| -# Required compliance fields: |
169 |
| -# name=<recipient name> |
170 |
| -# addr=<recipient address> |
171 |
| -# Federation Format: |
172 |
| -# <phone number>*anchor.com |
173 |
| -# Forwarding supported by sending to: forward*anchor.com |
174 |
| -# forward_type=bank_account |
175 |
| -# swift=<swift code of receiving bank> |
176 |
| -# acct=<recipient account number at receiving bank> |
177 |
| -# Minimum Amount Forward: $2 USD |
178 |
| -# Maximum Amount Forward: $10000 USD |
179 |
| - |
180 |
| - |
181 |
| -``` |
| 11 | +If you are a validator, the stellar.toml file allows you to declare your node(s) to other network participants, which improves discoverability, and contributes to the health and decentralization of the network as a whole. |
0 commit comments