Compare commits

..

1 Commits

Author SHA1 Message Date
mDuo13
cf0d525ef7 tx cost - clarify when lsfPasswordSpent enabled 2016-06-22 13:47:40 -07:00
345 changed files with 122899 additions and 28784 deletions

5
.gitignore vendored
View File

@@ -1,6 +1,5 @@
node_modules/
/node_modules/
*~
.DS_Store
content/code_samples/*/node_modules/
__pycache__
out/
package-lock.json

121
README.md
View File

@@ -7,27 +7,126 @@ The [Ripple Developer Portal](https://dev.ripple.com) is the authoritative sourc
Repository Layout
-----------------
The HTML pages in this portal are generated from the markdown files in the [content/](content/) folder. Always edit the markdown files, not the HTML files. The [assets/](assets/) folder contains static files used by the site's templates. The [img](img/) folder contains images used in the docs.
The HTML pages in this portal are generated from the markdown files in the [content/](content/) folder. Always edit the markdown files, not the HTML files.
The HTML files are generated using Ripple's documentation tool, called [**Dactyl**](https://github.com/ripple/dactyl). After you've done the [Dactyl Setup](#dactyl-setup), you can build the docs from the project root directory:
```
dactyl_build
```
Dactyl also provides link checking (the `dactyl_link_checker` script) and style checking (`dactyl_style_checker`), which you can run from the project root directory.
The list of which files are built, and metadata about those files, is in the `dactyl-config.yml` file. The `tool/` folder also contains the templates and style-checker rules used by Dactyl.
The [tool/](tool/) folder contains a tool, called **Dactyl**, for generating the HTML files in the top level. The `dactyl_build.py` script uses the templates and the a YAML config file to generate HTML output. The `dactyl_link_checker.py` script checks the generated HTML content for broken links. The `dactyl_style_checker.py` script (experimental) checks the content for style guide violations.
In general, Dactyl assumes you are running it with `tool/` as the current working directory, and the included config uses the top level of this repository as the output directory.
Dactyl Setup
------------
Dactyl uses Python 3 and a number of modules. First, make sure you have Python 3 installed in your local operating system, then use [PIP](https://pip.pypa.io/en/stable/) to install the dependencies:
`pip3 install dactyl`
`pip3 install -r tool/packages.txt`
Building
--------
The default configuration is [`dactyl-config.yml`](tool/dactyl-config.yml). You can specify an alternate config file with the `-c` or `--config` parameter:
`./dactyl_build.py -c alt-config.yml`
`./dactyl_link_checker.py -c alt-config.yml`
This script does the following:
1. Chooses a target based on the commandline `-t` parameter. If not specified, uses the first target listed in the config file. If building for PDF, add the `--pdf your_output_file.pdf` parameter (The output filename must end in `.pdf`!)
2. Reads the list of **pages** from the config.
3. For all pages that have a filename as the `md` parameter in the config, it reads the file from the configured **content_path** and "preprocesses" any [Jinja2 Templating Language](http://jinja.pocoo.org/docs/dev/templates/) statements in those files. The markdown files can use this opportunity to include other files, or include or exclude content based on the `target` and `pages` parameters.
4. For all pages that have a URL as the `md` parameter, it fetches the file via HTTP(S). No pre-processing occurs on such contents.
5. For all the retrieved and preprocessed markdown files, it parses them using Python's markdown library, with extras enabled to approximate GitHub-flavored markdown.
6. For each page, it parses the **template** configured for the page using Jinja2, falling back to the **default_template** (or **pdf_template**). If it produced HTML from a Markdown source, it passes that HTML as the `content` parameter to the template. It also passes in several other arguments from the config file, including definition of the current page as the `currentpage` parameter.
7. It applies several post-processing steps on the generated HTML. Additional [filters](#filters) can be configured as plugins to run on a per-page or per-target basis. Dactyl always performs link substitution by target.
8. If building for PDF: It outputs the resulting HTML files to the configured **temporary_files_path**, using filenames specified in the **html** parameter of each page in the config file. It also copies the **template_static_path** and **content_static_path** folders to the temporary folder. Then it runs [Prince](http://www.princexml.com/) to generate a PDF. It writes the generated PDF to the **out_path**.
9. Otherwise: It outputs the resulting HTML files to the **out_path**. This does not generate a working copy of the site unless the necessary static files are also available at the **out_path**. (This is true by default, since the default output directory is the top level of the repository.) You can have it copy the configured **template_static_path** (containing files referenced by the templates) and the **content_static_path** (containing files referenced by the content) to the output directory using the `--copy_static` or `-s` parameter.
Githubify Mode
--------------
Alternate usage: `-g` produces a GitHub-flavored Markdown version of a single file. This parameter takes one argument, which should be a markdown file in the **content_path**. The tool uses Jinja2 to "preprocess" the file, as above, but stops after assembling GitHub-flavored Markdown and writes the output to the same filename in the **out_path**.
**Note:** The tool never erases files from the **out_path** or the **temporary_files_path**. You may want to do that yourself, especially if you remove files from your config or rename them.
Ad-Hoc Targets
--------------
If you want to build output without editing the config file, you can use the `--pages` option, following that with a list of input markdown files. (The `--pages` option is incompatible with the `-t` option.) In this case, Dactyl creates an "ad-hoc" target for the page(s) specified. It includes the `index.html` file (PDF cover in PDF mode) in the ad-hoc target unless you specify `--no_cover` in the command.
For each page, it picks an output filename based on the input filename. It tries to guesses a sensible page title (to use in sidebars, dropdowns, table of contents, and other page navigation) from the first line of the file, falling back to the filename as the page title if the first line isn't a Markdown-formatted header.
Example usage:
```
./dactyl_build.py --pages ~/Ripple/*.md -o /tmp/dactyl_out/ --pdf scraps.pdf
```
Multiple Targets
----------------
You can define multiple **targets** in the config file with arbitrary key-value parameters. The two parameters that the tool cares about by default are **name** (used to identify the target on the commandline and in the pages section of the config) and **filters** (which lists filter plugins to apply, if provided).
By default, the tool builds the first target in the list. Every page in the `pages` array is included in every target unless the page definition includes an explicit list of **targets** to build. (Each member in the list should be the **name** of a target.)
The tool can perform automatic substitution of links in the resulting HTML (or Markdown, when using [githubify](#githubify-mode)). For each parameter in the page definition that matches the name of a target, it replaces links to the `html` file with the contents of the target-name-parameter. Anchors from the original link carry over. This allows you to link to other pages using the filenames from the local version of the site, but replace them with different links for a live site. (As seen in the default configuration, Ripple.com has very different URLs for many pages.)
Filters
-------
Dactyl can apply various filters on document content, which is useful for handling compatibility with alternate Markdown flavors, among other things. The **filters** option, at the target or page level of the config, should contain an array of filters to apply. (Filters at the target level apply to all pages in that target; filters at the page level apply to that page only.) Each filter is implemented by a Python script in the Dactyl directory named `filter_{filter_name}.py`, based on the {filter_name} specified in the config.
Filters can apply at any or all of three steps: Raw markdown, raw HTML, or BeautifulSoup, as follows:
Raw markdown filters implement a `filter_markdown(md)` function, which inputs and outputs a string of markdown text.
Raw HTML filters implement a `filter_html(html)` function, which inputs and outputs a string of HTML text.
BeautifulSoup filters implement a `filter_soup(soup)` method, which takes a BeautifulSoup4 representation of the parsed HTML content as input. Because the input is passed by reference, the function modifies the soup in place instead of returning it.
Dactyl comes with the following filters:
* `remove_doctoc` - Remove DOCTOC-generated tables of contents
* `multicode_tabs` - Lets you group multiple code samples to appear in tabs (HTML only)
* `standardize_header_ids` - Modify the `id` fields of generated header (<h#>) elements to use dashes instead of underscores. (This is for compatibility with previously-used doc tools.)
* `buttonize` - Adds the `button` class to links whose text ends in >
* `markdown_in_divs` - Automatically add the `markdown="1"` element to <div> elements so that their contents get parsed as Markdown. (No longer used by the Dev Portal, but useful for compatibility with Markdown flavors that do this automatically.)
* `add_version` - Adds a "Updated for \[Version\]" link to the page. Only works if the page is remotely-sourced from a git tag on GitHub.
* ``
Multicode Tabs
--------------
The `multicode_tabs` filter lets you group multiple related code samples to appear in tabs in the HTML version. It has no meaningful effect when building for PDF.
The syntax for multicode tabs is as follows:
~~~
(whatever content comes before the multi-code block)
<!-- MULTICODE_BLOCK_START -->
*Tab 1 Name*
```
Tab 1 code sample
```
*Tab 2 Name*
```
Tab 2 code sample
```
... (repeat for N tabs) ...
<!-- MULTICODE_BLOCK_END -->
(whatever content comes after the multi-code block)
~~~
This syntax is designed to "gracefully degrade" to a sensible syntax in cases (like PDF) where the [javascript to make the tabs work](assets/js/multicodetab.js) is either unavailable or undesirable.
Contributing
------------

View File

@@ -10,8 +10,11 @@
display:table-cell;
}
#command_list {
display:table-cell;
list-style-type:none;
padding:0 0 0 0;
padding:36px 0 0 0;
margin:0;
height:100%;
}
aside.sidebar {
@@ -37,6 +40,37 @@ aside.sidebar {
font-weight: bold;
margin-top: 10px;
}
#command_table {
height:100%;
}
#io_wrapper {
float:right;
display:table;
height:500px;
padding:0;
table-layout:fixed;
border-spacing:24px 0;
width:96%;
height: 100%;
margin-top: 30px;
}
#io_wrapper > div {
width:100%;
margin:0;
padding:0;
}
#response, #response_body {
min-height:100px;
border-top-left-radius:0px !important;
border-top-right-radius:0px !important;
}
#input {
width: 30%;
}
#output {
width: 60%;
}
h3 {
margin:16px 0;
font-family:'open sans';
@@ -115,6 +149,7 @@ h3 {
cursor:pointer;
}
#online_state {
position:absolute;
top:10px;
line-height:30px;
font-size:14px;
@@ -343,7 +378,8 @@ span.cm-atom {
margin: 0 !important;
}
#rest_url div label,
#rest_url div label,
#rest_url div input {
display: block;
}

File diff suppressed because it is too large Load Diff

112
assets/css/landing.css Normal file
View File

@@ -0,0 +1,112 @@
.page-template-template-dev-portal-php .main {
border-left: 0;
}
/************
jumbotron
*********** */
.jumbotron {
margin-top: 50px;
margin-bottom: 0;
}
.jumbotron p {
font-size: 14px;
font-weight: 400;
}
.main_callout {
padding-top:10px;
}
.join {
font-weight: 500 !important;
}
img.large_logo {
padding: 10px 20px 10px 10px;
width: 100%;
}
.jumbotron p.api_btn {
/* text-align: center;
padding: 20px;*/
}
.jumbotron h4 {
font-weight: 800;
}
@media (min-width: 992px) {
.jumbotron .col-md-6 {
padding-left: 60px;
}
}
/************
Main content
*********** */
.main_title {
font-size: 30px;
font-weight: 300;
margin-top:10px;
}
.description h2{
font-size: 24px;
font-weight: 600;
margin: 20px 0 15px 0;
}
.build-index .top {
background: #f4f6f7 none repeat scroll 0 0;
}
.build-index ul {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
padding: 0;
}
.build-index ul li {
border: 1px solid #ccc;
border-top-width: 0;
font-size: 14px;
list-style: outside none none;
padding: 5px;
}
.build-index ul li.top {
border-top-width: 1px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.build-index .dev_heading {
font-family: "Open Sans",sans-serif;
letter-spacing: 0.04em;
font-weight: 600;
text-transform: uppercase;
}
.last {
margin-bottom: 40px;
}
.description.highlight {
background: #f5f5f5;
padding-bottom: 15px;
margin: 22px 0;
}
@media (max-width: 992px) {
.description.highlight {
padding-top: 10px;
}
}

View File

@@ -14,3 +14,10 @@ a[href^="#"]:after {
background: transparent;
box-decoration-break: slice;
}
/* Disable header numbering */
.page-template-template-dev-portal.page-template-template-dev-portal-php h1:before,
.page-template-template-dev-portal.page-template-template-dev-portal-php h2:before,
.page-template-template-dev-portal.page-template-template-dev-portal-php h3:before {
content: none !important;
}

View File

@@ -1,16 +0,0 @@
input#domain {
padding: 10px 20px;
width: 255px;
}
.result-title {
display: none;
}
span.red {
color: red;
}
span.green {
color: green;
}

View File

@@ -286,11 +286,13 @@ textarea {
line-height: inherit;
}
a {
color: #27a2db;
color: #346aa9;
text-decoration: none !important;
}
a:hover,
a:focus {
color: #22456e;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
@@ -527,7 +529,7 @@ mark,
color: #777777;
}
.text-primary {
color: #27a2db;
color: #346aa9;
}
a.text-primary:hover {
color: #285282;
@@ -558,7 +560,7 @@ a.text-danger:hover {
}
.bg-primary {
color: #fff;
background-color: #27a2db;
background-color: #346aa9;
}
a.bg-primary:hover {
background-color: #285282;
@@ -2182,7 +2184,7 @@ fieldset[disabled] .btn-default.active {
}
.btn-primary {
color: #ffffff;
background-color: #27a2db;
background-color: #346aa9;
border-color: #2e5e96;
}
.btn-primary:hover,
@@ -2214,11 +2216,11 @@ fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #27a2db;
background-color: #346aa9;
border-color: #2e5e96;
}
.btn-primary .badge {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.btn-success {
@@ -2386,7 +2388,7 @@ fieldset[disabled] .btn-danger.active {
background-color: #ffffff;
}
.btn-link {
color: #27a2db;
color: #346aa9;
font-weight: normal;
cursor: pointer;
border-radius: 0;
@@ -2537,12 +2539,12 @@ tbody.collapse.in {
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
text-decoration: none;
color: #27a2db;
color: #346aa9;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #27a2db;
color: #346aa9;
text-decoration: none;
outline: 0;
}
@@ -2973,7 +2975,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
.nav .open > a:hover,
.nav .open > a:focus {
background-color: #eeeeee;
border-color: #27a2db;
border-color: #346aa9;
}
.nav .nav-divider {
height: 1px;
@@ -3066,7 +3068,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
color: #ffffff;
background-color: #27a2db;
background-color: #346aa9;
}
.nav-stacked > li {
float: none;
@@ -3189,6 +3191,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 992px) {
@@ -3479,7 +3482,7 @@ ul#menu-primary-navigation {
.home .navbar-default .navbar-nav > .active > a,
.home .navbar-default .navbar-nav > .active > a:hover,
.home .navbar-default .navbar-nav > .active > a:focus {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.home .navbar-default .navbar-nav > .disabled > a,
@@ -3552,7 +3555,7 @@ fieldset[disabled] .home .navbar-default .btn-link:focus {
.navbar-default {
z-index: 99999;
background-color: #ffffff;
border-bottom: 1px solid #27a2db;
border-bottom: 1px solid #346aa9;
}
.navbar-default .navbar-brand {
color: #777777;
@@ -3570,13 +3573,13 @@ fieldset[disabled] .home .navbar-default .btn-link:focus {
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #27a2db;
color: #346aa9;
background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.navbar-default .navbar-nav > .disabled > a,
@@ -3593,7 +3596,7 @@ fieldset[disabled] .home .navbar-default .btn-link:focus {
background-color: transparent;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #27a2db;
background-color: #346aa9;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
@@ -3649,7 +3652,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.navbar-default.scrolled {
z-index: 99999;
background-color: #ffffff !important;
border-bottom: 1px solid #27a2db;
border-bottom: 1px solid #346aa9;
-o-transition: .3s;
-ms-transition: .3s;
-moz-transition: .3s;
@@ -3677,7 +3680,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
}
.navbar-default.scrolled .navbar-nav > li > a:hover,
.navbar-default.scrolled .navbar-nav > li > a:focus {
color: #27a2db;
color: #346aa9;
background-color: transparent;
-o-transition: 1s;
-ms-transition: 1s;
@@ -3688,7 +3691,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
.navbar-default.scrolled .navbar-nav > .active > a,
.navbar-default.scrolled .navbar-nav > .active > a:hover,
.navbar-default.scrolled .navbar-nav > .active > a:focus {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.navbar-default.scrolled .navbar-nav > .disabled > a,
@@ -3702,7 +3705,7 @@ fieldset[disabled] .navbar-default .btn-link:focus {
background-color: transparent;
}
.navbar-default.scrolled .navbar-toggle .icon-bar {
background-color: #27a2db;
background-color: #346aa9;
}
.navbar-default.scrolled .navbar-collapse,
.navbar-default.scrolled .navbar-form {
@@ -3891,7 +3894,7 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
padding: 6px 12px;
line-height: 1.42857143;
text-decoration: none;
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
border: 1px solid #dddddd;
margin-left: -1px;
@@ -3923,8 +3926,8 @@ fieldset[disabled] .navbar-inverse .btn-link:focus {
.pagination > .active > span:focus {
z-index: 2;
color: #ffffff;
background-color: #27a2db;
border-color: #27a2db;
background-color: #346aa9;
border-color: #346aa9;
cursor: default;
}
.pagination > .disabled > span,
@@ -4040,7 +4043,7 @@ a.label:focus {
background-color: #5e5e5e;
}
.label-primary {
background-color: #27a2db;
background-color: #346aa9;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
@@ -4107,7 +4110,7 @@ a.badge:focus {
}
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.nav-pills > li > a > .badge {
@@ -4171,7 +4174,7 @@ a.list-group-item.active > .badge,
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
border-color: #27a2db;
border-color: #346aa9;
}
.thumbnail .caption {
padding: 9px;
@@ -4285,7 +4288,7 @@ a.thumbnail.active {
line-height: 20px;
color: #ffffff;
text-align: center;
background-color: #27a2db;
background-color: #346aa9;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-transition: width 0.6s ease;
@@ -4436,8 +4439,8 @@ a.list-group-item:focus {
.list-group-item.active:focus {
z-index: 2;
color: #ffffff;
background-color: #27a2db;
border-color: #27a2db;
background-color: #346aa9;
border-color: #346aa9;
}
.list-group-item.active .list-group-item-heading,
.list-group-item.active:hover .list-group-item-heading,
@@ -4556,7 +4559,7 @@ a.list-group-item-danger.active:focus {
background-color: #ffffff;
border: 1px solid transparent;
border-radius: 4px;
border-bottom: 1px solid #cccccc;
border-bottom: 1px solid #cccccc !important;
}
.panel-body {
padding: 15px;
@@ -4769,22 +4772,22 @@ a.list-group-item-danger.active:focus {
border-bottom-color: #dddddd;
}
.panel-primary {
border-color: #27a2db;
border-color: #346aa9;
}
.panel-primary > .panel-heading {
color: #ffffff;
background-color: #27a2db;
border-color: #27a2db;
background-color: #346aa9;
border-color: #346aa9;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #27a2db;
border-top-color: #346aa9;
}
.panel-primary > .panel-heading .badge {
color: #27a2db;
color: #346aa9;
background-color: #ffffff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #27a2db;
border-bottom-color: #346aa9;
}
.panel-success {
border-color: #d6e9c6;
@@ -5557,6 +5560,9 @@ body {
.main {
background: #ffffff;
}
.sidebar-primary .wrap.container {
margin: 100px auto;
}
section#comments,
section#respond {
visibility: hidden;
@@ -5646,7 +5652,7 @@ Dev subnav
.banner .dev_nav {
background: #f4f6f7;
padding: 5px;
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
border-bottom: 1px solid #cccccc;
}
.banner .dev_nav li {
@@ -5691,7 +5697,7 @@ Style subnav
.style_nav {
background: #f4f6f7;
padding: 5px;
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
border-bottom: 1px solid #cccccc;
}
.style_nav li {
@@ -5711,7 +5717,7 @@ Company subnav
.company_nav {
background: #f4f6f7;
padding: 5px;
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
border-bottom: 1px solid #cccccc;
}
.company_nav li {
@@ -5731,7 +5737,7 @@ News subnav
.news_nav {
background: #f4f6f7;
padding: 5px;
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
border-bottom: 1px solid #cccccc;
}
.news_nav li {
@@ -5958,7 +5964,7 @@ i.fa.fa-share {
display: none;
}
.scrolled .nav_x {
color: #27a2db;
color: #346aa9;
}
.white_x {
display: none;
@@ -5966,7 +5972,7 @@ i.fa.fa-share {
.nav_x {
margin-top: -4px;
display: none;
color: #27a2db;
color: #346aa9;
width: 20px;
}
.page-header {
@@ -6010,14 +6016,14 @@ img.ripple_stack {
font-size: 21px;
}
.title_border hr {
border-bottom: 1px solid #27a2db;
border-bottom: 1px solid #346aa9;
width: 100px;
}
.top_border_section {
border-top: 1px solid #cccccc;
}
.ripple_page_heading h3 hr {
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
width: 200px;
margin-top: 30px;
}
@@ -6346,7 +6352,7 @@ Thank You page
}
.error404 h1 {
font-size: 48px;
color: #27a2db;
color: #346aa9;
}
.error404 ul {
list-style-type: none;
@@ -6556,7 +6562,7 @@ Media Queries
.dev_nav {
background: #f4f6f7;
padding: 5px;
border-top: 1px solid #27a2db;
border-top: 1px solid #346aa9;
border-bottom: 1px solid #cccccc;
}
.dev_nav li {
@@ -6588,6 +6594,12 @@ Media Queries
display: none !important;
}
}
@media (min-width: 768px) {
.sidebar {
padding-top: 75px;
padding-left: 30px !important;
}
}
@media (max-width: 1024px) {
.hidden-ipad {
display: none !important;
@@ -6601,7 +6613,55 @@ Media Queries
display: block !important;
}
}
/*
******************
Transifex
******************
*/
#translation {
display: inline-block;
}
#tx-live-lang-toggle {
display: none;
}
.txlive-langselector-list {
position: absolute;
margin: 50px 0 0 0 !important;
padding: 0 !important;
display: inline-block !important;
background-color: transparent !important;
box-shadow: none !important;
color: #999999 !important;
width: auto !important;
top: 0 !important;
left: 0;
}
.txlive-langselector-list > li {
padding: 0 16px;
display: inline-block !important;
width: auto !important;
-o-transition: .5s;
-ms-transition: .5s;
-moz-transition: 5s;
-webkit-transition: .5s;
transition: .5s;
}
.txlive-langselector-list > li:hover {
background-color: transparent !important;
-o-transition: .5s;
-ms-transition: .5s;
-moz-transition: 5s;
-webkit-transition: .5s;
transition: .5s;
}
@media (max-width: 480px) {
.txlive-langselector-list {
position: relative !important;
}
.txlive-langselector-list > li {
padding: 0 5px 0 !important;
}
}
.aligncenter {
display: block;
margin: 10px auto;
@@ -6650,7 +6710,7 @@ figure.alignnone {
}
}
.banner .main_nav_wrapper {
border-bottom: 1px solid #27a2db;
border-bottom: 1px solid #346aa9;
height: 60px;
}
.banner ul#menu-primary-navigation li:hover {
@@ -6870,7 +6930,7 @@ figure.alignnone {
}
.content-info .absolute_bottom_footer .social-iconer a:hover,
.content-info .absolute_bottom_footer .social-iconer a:focus {
color: #27a2db;
color: #346aa9;
-o-transition: .5s;
-ms-transition: .5s;
-moz-transition: .5s;

View File

@@ -1,119 +0,0 @@
.input-xxlarge {
width: 100%;
padding: 5px;
}
.progress .bar {
width:0%;
height:100%;
color:#ffffff;
float:left;
font-size:12px;
text-align:center
;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);
background-color:#0e90d2;
background-image:-moz-linear-gradient(top, #149bdf, #0480be);
background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
background-image:-webkit-linear-gradient(top, #149bdf, #0480be);
background-image:-o-linear-gradient(top, #149bdf, #0480be);
background-image:linear-gradient(to bottom, #149bdf, #0480be);
background-repeat:repeat-x;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;box-sizing:border-box;
-webkit-transition:width 0.6s ease;
-moz-transition:width 0.6s ease;
-o-transition:width 0.6s ease;
transition:width 0.6s ease;
}
#result {
display: none;
}
#log {
font-weight: 700;
}
.json .name {
color: #A513AC;
}
.json ul {
margin: 0;
display: none;
}
.json li {
padding: 0;
list-style-type: none;
}
.json .type-string .val {
color: #CC2A41;
}
.json .type-number .val {
color: #2973BA;
}
.json a.toggle:hover {
text-decoration: none;
}
.json > a.toggle {
display: none;
}
.json a.toggle:after {
content: " +\0000a0";
cursor: pointer;
}
.json > ul,
.json .expanded > ul {
display: block;
}
.json .ellipsis {
color: #ccc;
}
.json > .ellipsis,
.json .expanded > .ellipsis {
display: none;
}
.json .expanded > a.toggle:after {
content: " \2212\0000a0";
}
.json .indentafter {
display: none;
}
.json .expanded > .indentafter {
display: inline;
}
.tools {
background-color: #f5f5f5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-size: 0.8em;
margin: 0 0 10px;
}
.tools>li>a {
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 6px 9px;
}

View File

@@ -1,93 +0,0 @@
.cta_readmore {
background-color: #27a2db;
color: white;
border-radius: 5px;
padding: 10px 50px;
border: none;
outline: 0;
}
.cta_readmore:hover,
.cta_readmore:active,
.cta_readmore:focus {
background-color: #43bded;
color: white;
outline: 0;
border: none;
}
#your-credentials {
display: none;
margin: 15px 0 30px;
}
#loader {
display: none;
}
#loader img {
margin: 0 10px 0 20px;
width: 25px;
height: auto;
}
#test-net-servers {
font-size: 15px;
border-radius: 5px;
border: 1px solid #27a2db;
width: 350px;
float: right;
margin-left: 15px;
}
#test-net-servers pre {
overflow-x: auto;
}
.page-test-net .container {
margin-left: 15px;
margin-right: 15px;
width: auto;
}
@media (min-width: 1600px) {
.page-test-net .container {
margin-left: auto;
margin-right: auto;
width: 1500px;
}
}
@media (max-width: 992px) {
#test-net-servers {
position: static;
float: none;
max-width: none;
width: auto;
margin: 0 0 30px 0;
}
}
h2 {
font-size: 36px;
color: #066b98;
line-height: 1.2em;
margin-top: 0;
}
#test-net-servers h5 {
letter-spacing: .04em;
font-family: 'open_sansbold', sans-serif;
text-transform: uppercase;
color: #344e5a;
clear: both;
margin-top: 20px !important;
}
#test-net-servers .panel-heading {
margin-top: 0;
padding: 0;
font-size: 21px;
font-family: "open_sanslight", sans-serif;
color: #27a2db;
line-height: 1.2em;
margin-bottom: 20px;
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -17,16 +17,6 @@ var toggle_cs = function(eo) {
$(eo.target).val(current_button_text == 'Expand' ? "Collapse" : "Expand");
}
function has_scrollbars(e) {
if ($(e).parents(".multicode").length > 0) {
//TODO: figure out if we can detect scrollbars on non-default tabs of
// multicode samples. For now, always consider multi-code sections to need
// scrollbars.
return true;
}
return (e.scrollHeight > e.clientHeight) || (e.scrollWidth > e.clientWidth);
}
function make_code_expandable() {
var newid = 0;
$(".content > pre > code").parent().wrap(function() {
@@ -34,20 +24,14 @@ function make_code_expandable() {
return "<div class='code_sample' id='code_autoid_"+newid+"'>";
});
var code_samples = $('.code_sample');
code_samples.find("code").each(function() {
let jqThis = $(this);
if (has_scrollbars(this)) {
jqThis.dblclick(toggle_cs);
jqThis.attr('title', 'Double-click to expand/collapse');
var newbtn = $("<input type='button' class='code_toggler' value='Expand' />");
newbtn.appendTo(jqThis.parents(".code_sample"));
}
});
var cs = $('.code_sample');
cs.find("code").dblclick(toggle_cs);
cs.find("code").attr('title', 'Double-click to expand/collapse');
var newbtn = $("<input type='button' class='code_toggler' value='Expand' />");
newbtn.appendTo(cs);
$(".code_toggler").click(toggle_cs);
/* fix expand/collapse and tab click hierarchy */
code_samples.css("position","relative");
cs.css("position","relative");
$(".multicode .code_sample").css("position","static");
}

View File

@@ -1,15 +0,0 @@
$(document).ready(function() {
var TO_TOP_MIN = 50;
var TO_TOP_SPEED = 500;
var TO_TOP_POS = 0;
$(window).scroll(function () {
if ($(this).scrollTop() > TO_TOP_MIN) {
$('.jump-to-top').fadeIn();
} else {
$('.jump-to-top').fadeOut();
}
});
$(".jump-to-top").click(function() {
$("body").animate({scrollTop: TO_TOP_POS}, TO_TOP_SPEED)
});
});

View File

@@ -1,117 +0,0 @@
function VerificationError(message, tips) {
this.name = "VerificationError";
this.message = message || "";
this.tips = tips || "";
}
VerificationError.prototype = Error.prototype;
function makeLogEntry(text) {
var log = $('<li></li>').text(text).appendTo('#log');
log.resolve = function(text) {
return $('<span></span>').html(text).appendTo(log);
};
return log;
}
$('#domain-entry').submit(function(e) {
e.preventDefault();
var domain = $('#domain').val(),
txtdata;
$('.result-title').show();
$('#result').show();
$('#log').empty();
async.waterfall([
function(callback) {
var urls = [
//'http://www.'+domain+'/ripple.txt',
'https://www.' + domain + '/ripple.txt',
//'http://'+domain+'/ripple.txt',
'https://' + domain + '/ripple.txt',
'https://ripple.' + domain + '/ripple.txt'
].reverse();
function next(xhr, status) {
if (this instanceof $) {
var err;
switch (status) {
case 'timeout':
err = 'TIMEOUT';
break;
case 'abort':
err = 'ABORTED';
break;
case 'error':
err = 'ERROR';
break;
default:
err = 'UNKNOWN';
}
$('<span></span>').text(err).addClass('red').appendTo(this);
}
if (!urls.length) {
var tips = 'Check if the file is actually hosted at one of the URLs above and make sure your server provides the required <a href="https://ripple.com/wiki/Ripple.txt#Publishing_ripple.txt">CORS header.</a>';
callback(new VerificationError('No ripple.txt found!', tips));
return;
}
var url = urls.pop();
var log = makeLogEntry('Checking ' + url + '...');
$.ajax({
url: url,
dataType: 'text',
success: function(data) {
$('<span></span>').text('FOUND').addClass('green').appendTo(log);
txtdata = data;
callback();
},
error: $.proxy(next, log)
});
}
next();
},
function() {
txtdata = txtdata.replace('\r\n', '\n');
txtdata = txtdata.replace('\r', '\n');
txtdata = txtdata.split('\n');
var currentSection = "",
sections = {};
for (var i = 0, l = txtdata.length; i < l; i++) {
var line = txtdata[i].replace(/^\s+|\s+$/g, '');
if (!line.length || line[0] === '#') {
continue;
} else if (line[0] === '[' && line[line.length - 1] === ']') {
currentSection = line.slice(1, line.length - 1);
sections[currentSection] = [];
} else {
line = line.replace(/^\s+|\s+$/g, '');
if (sections[currentSection]) {
sections[currentSection].push(line);
}
}
}
var log;
log = makeLogEntry('Domain should match [domain]...');
if (sections.domain && sections.domain.length && sections.domain[0] === domain) {
log.resolve('VALID').addClass('green');
} else if (sections.domain && sections.domain.length) {
log.resolve('MISMATCH').addClass('red');
} else {
log.resolve('MISSING').addClass('red');
}
}
], function(err, result) {
if (err instanceof VerificationError) {
var log = makeLogEntry("");
log.resolve(err.message).addClass('red');
$('<br>').appendTo(log);
$('<p></p>').html(err.tips).appendTo(log);
} else if (err) {
makeLogEntry(err).addClass('red');
}
});
});

View File

@@ -1,369 +0,0 @@
jQuery(function ($) {
var reTxId = /^[0-9A-Fa-f]{64}$/,
reLedgerSeq = /^[0-9]+$/;
var txOffset = 0,
txCount = 0,
currentTarget = null;
var remote = ripple.Remote.from_config({
"trace" : true,
"websocket_ip" : "s2.ripple.com",
"websocket_port" : 443,
"websocket_ssl" : true
});
remote.connect();
remote.once('connected', function () {
var target = location.hash.slice(1);
if (ripple.UInt160.from_json(target).is_valid() ||
reTxId.exec(target) ||
reLedgerSeq.exec(target)) {
$('#target').val(target);
fetchTarget(target);
}
});
$('#account-entry').submit(function (e) {
e.preventDefault();
var target = $('#target').val();
fetchTarget(target);
});
function fetchTarget(target)
{
if (!remote.state === "online") return;
// Reset
$("#links").show();
$("#result").show();
$("#result > .group").hide();
$("#error").hide();
$("#progress").show();
$(".json").html("");
$("#datalink").parent().removeClass("disabled");
$(".account-tx-more").parent().hide();
$(".account-tx-back").parent().hide();
txOffset = 0;
currentTarget = target;
var locationWithoutHash = location.protocol+'//'+location.hostname+(location.port?":"+location.port:"")+location.pathname+(location.search?location.search:"");
$("#permalink").attr("href", locationWithoutHash + "#" + target);
$("#graphlink").attr("href", "https://www.ripplecharts.com/#/graph/" + target);
if (ripple.UInt160.from_json(target).is_valid()) {
// Account
var account = target;
$("#result > .group-account").show();
$("#progress .bar").css("width", "10%");
$("#datalink").attr("href", null).parent().addClass("disabled");
async.waterfall([
function (callback) {
remote.request_account_info({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "20%");
console.log('account_info', result);
format(result, $("#account_info"));
callback();
})
.on('error', callback)
.request();
},
function (callback) {
remote.request_account_lines({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "40%");
console.log('account_lines', result);
format(result, $("#account_lines"));
callback();
})
.on('error', callback)
.request();
},
function (callback) {
requestTx(account, function (err) {
if (err) return callback(err);
$("#progress .bar").css("width", "60%");
callback();
});
},
function (callback) {
remote.request_account_offers({account:account})
.on('success', function (result) {
$("#progress .bar").css("width", "80%");
console.log('account_offers', result);
format(result, $("#account_offers"));
callback();
})
.on('error', callback)
.request();
}
], function (err) {
if (err) handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
});
} else if (reLedgerSeq.exec(target)) {
$("#result > .group-ledger").show();
// Ledger
$("#progress .bar").css("width", "10%");
remote.request_ledger(undefined, { transactions: true, expand: true })
.ledger_index(+target)
.on('success', function (result) {
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
console.log('ledger', result.ledger);
format(result.ledger, $("#ledger_info"));
})
.on('error', function (err) {
console.log(err);
handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
})
.request();
} else if (reTxId.exec(target)) {
$("#result > .group-tx").show();
$("#datalink").attr("href", "https://ripple.com/client/#/tx/?id=" + target);
// Transaction
$("#progress .bar").css("width", "10%");
remote.requestTransaction({"hash": target, "binary": false})
.on('success', function (result) {
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
console.log('tx', result);
format(result, $("#tx_info"));
})
.on('error', function (err) {
handleError(err);
$("#progress .bar").css("width", "100%");
$("#progress").fadeOut();
})
.request();
} else {
// Unknown/Invalid
$("#links").hide();
$("#progress").hide();
handleError("Input is not a valid address or transaction hash");
}
}
$('.tx-expand').click(function () {
$("#tx_info .expanded").removeClass("expanded");
$("#tx_info").find("ul > li").addClass("expanded");
});
$('.tx-collapse').click(function () {
$("#tx_info .expanded").removeClass("expanded");
});
$('.account-lines-expand').click(function () {
$("#account_lines .expanded").removeClass("expanded");
$("#account_lines").find("ul > li").addClass("expanded");
});
$('.account-lines-collapse').click(function () {
$("#account_lines .expanded").removeClass("expanded");
});
$('.account-tx-expand-tx').click(function () {
$("#account_tx .expanded").removeClass("expanded");
$("#account_tx").find("> ul > li").addClass("expanded").find("> ul > li").addClass("expanded").find("> ul > li span.name:contains(tx)").parent().addClass("expanded");
});
$('.account-tx-expand').click(function () {
$("#account_tx .expanded").removeClass("expanded");
$("#account_tx").find("ul > li").addClass("expanded");
});
$('.account-tx-collapse').click(function () {
$("#account_tx .expanded").removeClass("expanded");
});
$('.account-tx-more').click(function () {
$(".account-tx-back").parent().show();
txOffset += 20;
$("#account_tx").text("... loading ...");
requestTx(currentTarget, function (err) {});
updateTxOffsetNav();
});
$('.account-tx-back').click(function () {
txOffset -= 20;
$("#account_tx").text("... loading ...");
requestTx(currentTarget, function (err) {});
updateTxOffsetNav();
});
$('.account-offers-expand').click(function () {
$("#account_offers .expanded").removeClass("expanded");
$("#account_offers").find("ul > li").addClass("expanded");
});
$('.account-offers-collapse').click(function () {
$("#account_offers .expanded").removeClass("expanded");
});
$('.ledger-expand-tx').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
$("#ledger_info").find("> ul > li").addClass("expanded").find("> ul > li").addClass("expanded").find("> ul > li span.name:contains(tx)").parent().addClass("expanded");
});
$('.ledger-expand').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
$("#ledger_info").find("ul > li").addClass("expanded");
});
$('.ledger-collapse').click(function () {
$("#ledger_info .expanded").removeClass("expanded");
});
$('pre.json').delegate(".toggle", "click", function (evt) {
console.log(this);
$(this).parent().toggleClass("expanded");
});
function handleError(err) {
console.error(err);
if ("string" === typeof err) {
$("#error").show().text(err);
} else if ("object" === typeof err) {
if (err.error === "remoteError" &&
"object" === typeof err.remote)
{
err = err.remote;
}
if (err.error_message) {
$("#error").show().text(err.error_message);
} else if (err.error) {
$("#error").show().text(err.error);
} else {
$("#error").show().text(err.toString());
}
}
}
function requestTx(account, callback) {
remote.request_account_tx({
'account': account,
'ledger_index_min': -1,
'descending': true,
'limit': 20,
'offset' : txOffset,
'count': true,
'binary': false
})
.on('success', function (result) {
txCount = result.count;
console.log('account_tx', result);
format(result, $("#account_tx").empty());
callback();
updateTxOffsetNav();
})
.on('error', callback)
.request();
}
function updateTxOffsetNav()
{
$(".account-tx-back").parent().hide();
$(".account-tx-more").parent().hide();
if (txOffset > 0)
$(".account-tx-back").parent().show();
if (txCount > (txOffset + 20))
$(".account-tx-more").parent().show();
}
String.prototype.repeat = function(times) {
return (new Array(times + 1)).join(this);
};
function format(v, ct, depth) {
depth = depth || 0;
switch (typeof v) {
case "object":
var el, sub = null, count;
if (Array.isArray(v)) {
ct.append("[");
count = v.length;
for (var i = 0; i < count; i++) {
if (!sub) {
$('<a class="toggle"></a>').appendTo(ct);
$('<span class="ellipsis"></span>')
.text(getEllipText(count)).appendTo(ct);
el = $("<ul></ul>");
} else sub.append(",");
sub = $("<li></li>").addClass("type-" + typeof v[i]);
sub.append("\u00A0".repeat(2 + depth*2));
format(v[i], sub, depth + 1);
sub.appendTo(el);
}
if (el) {
el.appendTo(ct);
$('<span class="indentafter"></span>').text("\u00A0".repeat(depth*2)).appendTo(ct);
}
ct.append("]");
} else {
ct.append("{");
count = Object.keys(v).length;
for (var i in v) {
if (!sub) {
$('<a class="toggle"></a>').appendTo(ct);
$('<span class="ellipsis"></span>')
.text(getEllipText(Object.keys(v))).appendTo(ct);
el = $("<ul></ul>");
} else sub.append(",");
sub = $("<li></li>").addClass("type-" + typeof v[i]);
sub.append("\u00A0".repeat(2 + depth*2));
$("<span></span>").addClass('name').text(i).appendTo(sub);
$("<span></span>").addClass('sep').text(" : ").appendTo(sub);
format(v[i], sub, depth + 1);
sub.appendTo(el);
}
if (el) {
el.appendTo(ct);
$('<span class="indentafter"></span>').text("\u00A0".repeat(depth*2)).appendTo(ct);
}
ct.append("}");
}
break;
case "string":
$("<span></span>").addClass('val').text('"'+v+'"').appendTo(ct);
break;
case "number":
$("<span></span>").addClass('val').text(""+v).appendTo(ct);
break;
case "boolean":
$("<span></span>").addClass('val').text(v ? "true" : "false").appendTo(ct);
break;
}
}
function getEllipText(count) {
var label = "...";
if (Array.isArray(count)) {
label = "";
while (label.length < 15) {
if (!count.length) break;
if (label.length) label += ", ";
label += count.shift();
}
if (count.length) label += ", ...";
} else if ("number" === typeof count) {
label = "" + count + " items";
}
return "\u00A0/* "+label+" */\u00A0";
}
});

View File

@@ -1,39 +0,0 @@
function rippleTestNetCredentials() {
var credentials = $('#your-credentials');
var address = $('#address');
var secret = $('#secret');
var balance = $('#balance');
var loader = $('#loader');
//reset the fields initially and for re-generation
credentials.hide();
address.html('');
secret.html('');
balance.html('');
loader.css('display', 'inline');
//call the alt-net and get key generations
$.ajax({
url: "https://faucet.altnet.rippletest.net/accounts",
type: 'POST',
dataType: 'json',
success: function(data) {
//hide the loader and show results
loader.hide();
credentials.hide().html('<h2>Your Credentials</h2>').fadeIn('fast');
address.hide().html('<h3>Address</h3> ' + data.account.address).fadeIn('fast');
secret.hide().html('<h3>Secret</h3> ' + data.account.secret).fadeIn('fast');
balance.hide().html('<h3>Balance</h3> ' + Number(data.balance).toLocaleString('en') + ' XRP').fadeIn('fast');
},
error: function() {
loader.hide();
alert("There was an error with the Ripple Test Net, please try again.");
}
});
}
$(document).ready(function() {
$('.cta_readmore').click(rippleTestNetCredentials);
});

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

11
circle.yml Normal file
View File

@@ -0,0 +1,11 @@
general:
build_dir: tool/
dependencies:
pre:
- pyenv global 3.4.0
override:
- pip3 install -r packages.txt
test:
override:
- ./dactyl_build.py
- ./dactyl_link_checker.py

407
concept-amendments.html Normal file
View File

@@ -0,0 +1,407 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Amendments - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#amendments">Amendments</a></li>
<li class="level-2"><a href="#background">Background</a></li>
<li class="level-2"><a href="#about-amendments">About Amendments</a></li>
<li class="level-2"><a href="#amendment-process">Amendment Process</a></li>
<li class="level-2"><a href="#amendment-voting">Amendment Voting</a></li>
<li class="level-3"><a href="#configuring-amendment-voting">Configuring Amendment Voting</a></li>
<li class="level-2"><a href="#testing-amendments">Testing Amendments</a></li>
<li class="level-1"><a href="#known-amendments">Known Amendments</a></li>
<li class="level-2"><a href="#feeescalation">FeeEscalation</a></li>
<li class="level-2"><a href="#multisign">MultiSign</a></li>
<li class="level-2"><a href="#suspay">SusPay</a></li>
<li class="level-2"><a href="#trustsetauth">TrustSetAuth</a></li>
<li class="level-2"><a href="#tickets">Tickets</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="amendments">Amendments</h1>
<p><em>(New in <a href="https://wiki.ripple.com/Rippled-0.31.0">version 0.31.0</a>)</em></p>
<p>The Amendments system provides a means of introducing new features to the decentralized Ripple consensus network without causing disruptions. The amendments system works by utilizing the core consensus process of the network to approve any changes by showing continuous support before those changes go into effect. An amendment normally requires <strong>80% support for two weeks</strong> before it can apply.</p>
<p>When an Amendment has been enabled, it applies permanently to all ledger versions after the one that included it. You cannot disable an Amendment, unless you introduce a new Amendment to do so.</p>
<h2 id="background">Background</h2>
<p>Any changes to transaction processing could cause servers to build a different ledger with the same set of transactions. If some <em>validators</em> (<code>rippled</code> servers <a href="tutorial-rippled-setup.html#reasons-to-run-a-validator">participating in consensus</a>) have upgraded to a new version of the software while other validators use the old version, this could cause anything from minor inconveniences to full outages. In the minor case, a minority of servers spend more time and bandwidth fetching the actual consensus ledger because they cannot build it using the transaction processing rules they already know. In the worst case, <a href="https://ripple.com/knowledge_center/the-ripple-ledger-consensus-process/">the consensus process</a> might be unable to validate new ledger versions because servers with different rules could not reach a consensus on the exact ledger to build.</p>
<p>Amendments solve this problem, so that new features can be enabled only when enough validators support those features.</p>
<p>Users and businesses who rely on the Ripple Consensus Ledger can also use Amendments to provide advance notice of changes in transaction processing that might affect their business. However, API changes that do not impact transaction processing or <a href="https://ripple.com/knowledge_center/the-ripple-ledger-consensus-process/">the consensus process</a> do not need Amendments.</p>
<h2 id="about-amendments">About Amendments</h2>
<p>An amendment is a fully-functional feature or change, waiting to be enabled by the peer-to-peer network as a part of the consensus process. A <code>rippled</code> server that wants to use an amendment has code for two modes: without the amendment (old behavior) and with the amendment (new behavior).</p>
<p>Every amendment has a unique identifying hex value and a short name. The short name is for human use, and is not used in the amendment process. Two servers can support the same amendment ID while using different names to describe it. An amendment's name is not guaranteed to be unique.</p>
<p>See also: <a href="#known-amendments">Known Amendments</a></p>
<h2 id="amendment-process">Amendment Process</h2>
<p>Every 256th ledger is called a "flag" ledger. The process of approving an amendment starts in the ledger version immediately before the flag ledger. When <code>rippled</code> validator servers send validation messages for that ledger, those servers also submit votes in favor of specific amendments. (<a href="concept-fee-voting.html">Fee Voting</a> also occurs around flag ledgers.)</p>
<p>The flag ledger itself has no special contents. However, during that time, the servers look at the votes of the validators they trust, and decide whether to insert an <a href="reference-transaction-format.html#enableamendment"><code>EnableAmendment</code> pseudo-transaction</a> into the following ledger. The flags of an EnableAmendment pseudo-transaction show what the server thinks happened:</p>
<ul>
<li>The <code>tfGotMajority</code> flag means that support for the amendment has increased to at least 80% of trusted validators.</li>
<li>The <code>tfLostMajority</code> flag means that support for the amendment has decreased to less than 80% of trusted validators.</li>
<li>An EnableAmendment pseudo-transaction with no flags means that support for the amendment has been enabled. (The change in transaction processing applies to every ledger after this one.)</li>
</ul>
<p>A server only inserts the pseudo-transaction to enable an amendment if all of the following conditions are met:</p>
<ul>
<li>The amendment has not already been enabled.</li>
<li>A previous ledger includes an EnableAmendment pseudo-transaction for this amendment with the <code>tfGotMajority</code> flag enabled.</li>
<li>The previous ledger in question is an ancestor of the current ledger.</li>
<li>The previous ledger in question has a close time that is at least <strong>two weeks</strong> before the close time of the latest flag ledger.</li>
<li>There are no EnableAmendment pseudo-transactions for this amendment with the <code>tfLostMajority</code> flag enabled in the consensus ledgers between the <code>tfGotMajority</code> pseudo-transaction and the current ledger.</li>
</ul>
<p>Theoretically, a <code>tfLostMajority</code> EnableAmendment pseudo-transaction could be included in the same ledger as the pseudo-transaction to enable an amendment. In this case, the pseudo-transaction with the <code>tfLostMajority</code> pseudo-transaction has no effect.</p>
<h2 id="amendment-voting">Amendment Voting</h2>
<p>Operators of <code>rippled</code> validators can choose which amendments to support or reject using the <a href="reference-rippled.html#feature"><code>feature</code> command</a>. This decides which amendments the validator votes for in the <a href="#amendment-process">amendment process</a>. By default, <code>rippled</code> votes in favor of every amendment it knows about.</p>
<p>The operator of a <code>rippled</code> validator can "veto" an amendment. In this case, that validator never sends a vote in favor of the amendment. If enough servers veto an amendment, that prevents it from reaching consistent 80% support, so the amendment does not apply.</p>
<p>As with all aspects of the consensus process, amendment votes are only taken into account by servers that trust the validators sending those votes. Ripple (the company) recommends only trusting the 5 default validators that Ripple (the company) operates. For now, trusting only those validators is enough to coordinate with Ripple (the company) on releasing new features.</p>
<h3 id="configuring-amendment-voting">Configuring Amendment Voting</h3>
<p>You can temporarily configure an amendment using the <a href="reference-rippled.html#feature"><code>feature</code> command</a>. To make a persistent change to your server's support for an amendment, change your server's <code>rippled.cfg</code> file.</p>
<p>Use the <code>[veto_amendments]</code> stanza to list amendments you do not want the server to vote for. Each line should contain one amendment's unique ID, optionally followed by the short name for the amendment. For example:</p>
<pre><code>[veto_amendments]
C1B8D934087225F509BEB5A8EC24447854713EE447D277F69545ABFA0E0FD490 Tickets
DA1BD556B42D85EA9C84066D028D355B52416734D3283F85E216EA5DA6DB7E13 SusPay
</code></pre>
<p>Use the <code>[amendments]</code> stanza to list amendments you want to vote for. (Even if you do not list them here, by default a server votes for all the amendments it knows how to apply.) Each line should contain one amendment's unique ID, optionally followed by the short name for the amendment. For example:</p>
<pre><code>[amendments]
4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 MultiSign
42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE FeeEscalation
</code></pre>
<h2 id="testing-amendments">Testing Amendments</h2>
<p>If you want to see how <code>rippled</code> behaves with an amendment enabled, before that amendment gets enabled on the production network, you can run use <code>rippled</code>'s configuration file to forcibly enable a feature. This is intended for development purposes only.</p>
<p>Because other members of the consensus network probably do not have the feature enabled, you should not use this feature while connecting to the production network. While testing with features forcibly enabled, you should run <code>rippled</code> in <a href="concept-stand-alone-mode.html">Stand-Alone Mode</a>.</p>
<p>To forcibly enable a feature, add a <code>[features]</code> stanza to your <code>rippled.cfg</code> file. In this stanza, add the short names of the features to enable, one per line. For example:</p>
<pre><code>[features]
MultiSign
TrustSetAuth
</code></pre>
<h1 id="known-amendments">Known Amendments</h1>
<p>The following is a comprehensive list of all known amendments and their status on the production Ripple Consensus Ledger:</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Introduced</th>
<th>Enabled</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#tickets">Tickets</a></td>
<td>v0.31.0</td>
<td>TBD</td>
</tr>
<tr>
<td><a href="#suspay">SusPay</a></td>
<td>v0.31.0</td>
<td>TBD</td>
</tr>
<tr>
<td><a href="#trustsetauth">TrustSetAuth</a></td>
<td>v0.30.0</td>
<td>TBD</td>
</tr>
<tr>
<td><a href="#multisign">MultiSign</a></td>
<td>v0.31.0</td>
<td>Expected 2016-06-27</td>
</tr>
<tr>
<td><a href="#feeescalation">FeeEscalation</a></td>
<td>v0.31.0</td>
<td>2016-05-05T16:33:22Z in ledger 21225473</td>
</tr>
</tbody>
</table>
<p class="devportal-callout note"><strong>Note:</strong> In many cases, an incomplete version of the code for an amendment is present in previous versions of the software. The "Introduced" version in the table above is the first stable version.</p>
<h2 id="feeescalation">FeeEscalation</h2>
<table>
<thead>
<tr>
<th>Amendment ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE</td>
</tr>
</tbody>
</table>
<p>Changes the way the <a href="concept-transaction-cost.html">transaction cost</a> applies to proposed transactions. Modifies the consensus process to prioritize transactions that pay a higher transaction cost. <!-- STYLE_OVERRIDE: prioritize --></p>
<p>This amendment introduces a fixed-size transaction queue for transactions that were not able to be included in the previous consensus round. If the <code>rippled</code> servers in the consensus network are under heavy load, they queue the transactions with the lowest transaction cost for later ledgers. Each consensus round prioritizes transactions from the queue with the largest transaction cost (<code>Fee</code> value), and includes as many transactions as the consensus network can process. If the transaction queue is full, transactions drop from the queue entirely, starting with the ones that have the lowest transaction cost.</p>
<p>While the consensus network is under heavy load, legitimate users can pay a higher transaction cost to make sure their transactions get processed. The situation persists until the entire backlog of cheap transactions is processed or discarded.</p>
<p>A transaction remains in the queue until one of the following happens:</p>
<ul>
<li>It gets applied to a validated ledger (regardless of success or failure)</li>
<li>It becomes invalid (for example, the <a href="reference-transaction-format.html#lastledgersequence"><code>LastLedgerSequence</code></a> causes it to expire)</li>
<li>It gets dropped because there are too many transactions in the queue with a higher transaction cost.</li>
</ul>
<h2 id="multisign">MultiSign</h2>
<table>
<thead>
<tr>
<th>Amendment ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373</td>
</tr>
</tbody>
</table>
<p>Introduces <a href="reference-transaction-format.html#multi-signing">multi-signing</a> as a way to authorize transactions. Creates the <a href="reference-ledger-format.html#signerlist"><code>SignerList</code> ledger node type</a> and the <a href="reference-transaction-format.html#signerlistset"><code>SignerListSet</code> transaction type</a>. Adds the optional <code>Signers</code> field to all transaction types. Modifies some transaction result codes.</p>
<p>This amendment allows addresses to have a list of signers who can authorize transactions from that address in a multi-signature. The list has a quorum and 1 to 8 weighted signers. This allows various configurations, such as "any 3-of-5" or "signature from A plus any other two signatures."</p>
<p>Signers can be funded or unfunded addresses. Funded addresses in a signer list can sign using a regular key (if defined) or master key (unless disabled). Unfunded addresses can sign with a master key. Multi-signed transactions have the same permissions as transactions signed with a regular key.</p>
<p>An address with a SignerList can disable the master key even if a regular key is not defined. An address with a SignerList can also remove a regular key even if the master key is disabled. The <code>tecMASTER_DISABLED</code> transaction result code is renamed <code>tecNO_ALTERNATIVE_KEY</code>. The <code>tecNO_REGULAR_KEY</code> transaction result is retired and replaced with <code>tecNO_ALTERNATIVE_KEY</code>. Additionally, this amendment adds the following new <a href="reference-transaction-format.html#result-categories">transaction result codes</a>:</p>
<ul>
<li><code>temBAD_SIGNER</code></li>
<li><code>temBAD_QUORUM</code></li>
<li><code>temBAD_WEIGHT</code></li>
<li><code>tefBAD_SIGNATURE</code></li>
<li><code>tefBAD_QUORUM</code></li>
<li><code>tefNOT_MULTI_SIGNING</code></li>
<li><code>tefBAD_AUTH_MASTER</code></li>
</ul>
<h2 id="suspay">SusPay</h2>
<table>
<thead>
<tr>
<th>Amendment ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>DA1BD556B42D85EA9C84066D028D355B52416734D3283F85E216EA5DA6DB7E13</td>
</tr>
</tbody>
</table>
<p>Provides "Suspended Payments" for XRP for escrow within the Ripple Consensus Ledger. Creates the <code>SuspendedPayment</code> ledger node type and the new transaction types <code>SuspendedPaymentCreate</code>, <code>SuspendedPaymentFinish</code>, and <code>SuspendedPaymentCancel</code>.</p>
<p>This amendment is still in development. The current version is enabled on the <a href="https://ripple.com/build/ripple-test-net/">Ripple Test Net</a>.</p>
<h2 id="trustsetauth">TrustSetAuth</h2>
<table>
<thead>
<tr>
<th>Amendment ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>6781F8368C4771B83E8B821D88F580202BCB4228075297B19E4FDC5233F1EFDC</td>
</tr>
</tbody>
</table>
<p>Allows pre-authorization of accounting relationships (zero-balance trust lines) when using <a href="tutorial-gateway-guide.html#authorized-accounts">Authorized Accounts</a>.</p>
<p>With this amendment enabled, a <code>TrustSet</code> transaction with <a href="reference-transaction-format.html#trustset-flags"><code>tfSetfAuth</code> enabled</a> can create a new <a href="reference-ledger-format.html#ripplestate"><code>RippleState</code> ledger node</a> even if it keeps all the other values of the <code>RippleState</code> node in their default state. The new <code>RippleState</code> node has the <a href="reference-ledger-format.html#ripplestate-flags"><code>lsfLowAuth</code> or <code>lsfHighAuth</code> flag</a> enabled appropriately. The sender of the transaction must have <a href="reference-ledger-format.html#accountroot-flags"><code>lsfRequireAuth</code> enabled</a>.</p>
<h2 id="tickets">Tickets</h2>
<table>
<thead>
<tr>
<th>Amendment ID</th>
</tr>
</thead>
<tbody>
<tr>
<td>C1B8D934087225F509BEB5A8EC24447854713EE447D277F69545ABFA0E0FD490</td>
</tr>
</tbody>
</table>
<p>Introduces Tickets as a way to reserve a transaction sequence number for later execution. Creates the <code>Ticket</code> ledger node type and the transaction types <code>TicketCreate</code> and <code>TicketCancel</code>.</p>
<p>This amendment is still in development.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

251
concept-fee-voting.html Normal file
View File

@@ -0,0 +1,251 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Fee Voting - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#fee-voting">Fee Voting</a></li>
<li class="level-2"><a href="#voting-process">Voting Process</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="fee-voting">Fee Voting</h1>
<p>Validators can vote for changes to basic <a href="concept-transaction-cost.html">transaction cost</a> as well as <a href="concept-reserves.html">reserve requirements</a>. If the preferences in a validator's configuration are different than the network's current settings, the validator expresses its preferences to the network periodically. If a quorum of validators agrees on a change, they can apply a change that takes effect thereafter. Validators may do this for various reasons, especially to adjust to long-term changes in the value of XRP.</p>
<p>Operators of <a href="tutorial-rippled-setup.html#running-a-validator"><code>rippled</code> validators</a> can set their preferences for the transaction cost and reserve requirements in the <code>[voting]</code> stanza of the <code>rippled.cfg</code> file. <strong>Caution:</strong> insufficient requirements could expose the Ripple peer-to-peer network to denial-of-service attacks. The parameters you can set are as follows:</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Recommended Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>reference_fee</td>
<td>Amount of XRP, in <em>drops</em>, that must be destroyed to send the reference transaction, the cheapest possible transaction. (1 XRP = 1 million drops.) The actual transaction cost is a multiple of this value, scaled dynamically based on the load of individual servers.</td>
<td><code>10</code> (0.00001 XRP)</td>
</tr>
<tr>
<td>account_reserve</td>
<td>Minimum amount of XRP, in <em>drops</em>, that an account must have on reserve. This is the smallest amount that can be sent to fund a new account in the ledger.</td>
<td><code>20000000</code> (20 XRP)</td>
</tr>
<tr>
<td>owner_reserve</td>
<td>How much more XRP, in <em>drops</em>, that an address must hold for <em>each</em> object it owns in the ledger.</td>
<td><code>5000000</code> (5 XRP)</td>
</tr>
</tbody>
</table>
<h2 id="voting-process">Voting Process</h2>
<p>Every 256th ledger is called a "flag" ledger. (A flag ledger is defined such that the <code>ledger_index</code> <a href="https://en.wikipedia.org/wiki/Modulo_operation">modulo</a> <code>256</code> is equal to <code>0</code>.) In the ledger immediately before the flag ledger, each validator whose account reserve or transaction cost preferences are different than the current network setting distributes a "vote" message alongside its ledger validation, indicating the values that validator prefers.</p>
<p>In the flag ledger itself, nothing happens, but validators receive and take note of the votes from other validators they trust.</p>
<p>After counting the votes of other validators, each validator attempts to compromise between its own preferences and the preferences of a majority of validators it trusts. (For example, if one validator wants to raise the minimum transaction cost from 10 to 100, but most validators only want to raise it from 10 to 20, the one validator settles on the change to raise the cost to 20. However, the one validator never settles on a value lower than 10 or higher than 100.) If a compromise is possible, the validator inserts a <a href="reference-transaction-format.html#setfee">SetFee pseudo-transaction</a> into its proposal for the ledger following the flag ledger. Other validators who want the same change insert the same SetFee pseudo-transaction into their proposals for the same ledger. (Validators whose preferences match the existing network settings do nothing.) If a SetFee psuedo-transaction survives the consensus process to be included in a validated ledger, then the new transaction cost and reserve settings denoted by the SetFee pseudo-transaction take effect starting with the following ledger.</p>
<p>In short:</p>
<ul>
<li><strong>Flag ledger -1</strong>: Validators submit votes.</li>
<li><strong>Flag ledger</strong>: Validators tally votes and decide what SetFee to include, if any.</li>
<li><strong>Flag ledger +1</strong>: Validators insert SetFee pseudo-transaction into their proposed ledgers.</li>
<li><strong>Flag ledger +2</strong>: New settings take effect, if a SetFee psuedotransaction achieved consensus.</li>
</ul>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

227
concept-fees.html Normal file
View File

@@ -0,0 +1,227 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Fees (Disambiguation) - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#fees-disambiguation">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="#in-the-ledger">In the Ledger</a></li>
<li class="level-3"><a href="#neutral-fees">Neutral Fees</a></li>
<li class="level-3"><a href="#optional-fees">Optional Fees</a></li>
<li class="level-2"><a href="#outside-the-ledger">Outside the Ledger</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="fees-disambiguation">Fees (Disambiguation)</h1>
<p>The Ripple Consensus Ledger is a decentralized ledger, secured by cryptography and operated by a distributed peer-to-peer network of servers. This means that no one party, not even Ripple, can require a fee for access to the network.</p>
<p>However, the rules of the Ripple Consensus Ledger include several types of fees, including neutral fees which protect the ledger against abuse. These neutral fees are not paid to anyone. There are also several optional ways that users can collect fees from each other, both inside and outside the Ripple Consensus Ledger.</p>
<h2 id="in-the-ledger">In the Ledger</h2>
<h3 id="neutral-fees">Neutral Fees</h3>
<p>The <em><strong>transaction cost</strong></em> (sometimes called the transaction fee) is a miniscule amount of XRP destroyed to send a transaction. This cost scales with the load of the network, which protects the peer-to-peer network from spam. See <a href="concept-transaction-cost.html">Transaction Cost</a> for more information.</p>
<p>The <em><strong>reserve requirement</strong></em> is a minimum amount of XRP that an account must hold. It increases with the number of objects the account owns in the ledger. This disincentivizes users from increasing the size of the ledger carelessly or maliciously. See <a href="concept-reserves.html">Reserves</a> for more information.</p>
<h3 id="optional-fees">Optional Fees</h3>
<p><em><strong>Transfer fees</strong></em> are optional percentage fees that issuers can charge to transfer the currencies they issue to other addresses within the Ripple Consensus Ledger. See <a href="concept-transfer-fees.html">Transfer Fees</a> for more information.</p>
<p><em><strong>Trust line quality</strong></em> is a setting that allows an account to value balances on a trust line at higher or lower than face value. This can lead to situations are like charging a fee. Trust line quality does not apply to XRP, which is not tied to a trust line.</p>
<h2 id="outside-the-ledger">Outside the Ledger</h2>
<p>Although the fees described above are the only fees built into the Ripple Consensus Ledger, people can still invent ways to charge fees associated with the ledger. For example, financial institutions commonly charge their customers to send money into and out of the Ripple Consensus Ledger.</p>
<p>Many other fees are also possible. Businesses might charge for access to a client application, maintenance of non-Ripple accounts, exchange services (especially when buying XRP on a private market instead of directly within the Ripple Consensus Ledger) and any number of other services. Always be aware of the fee schedule before doing business with any financial institution.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

914
concept-freeze.html Normal file
View File

@@ -0,0 +1,914 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Freeze - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#freeze-features">Freeze Features</a></li>
<li class="level-2"><a href="#individual-freeze">Individual Freeze</a></li>
<li class="level-2"><a href="#global-freeze">Global Freeze</a></li>
<li class="level-2"><a href="#no-freeze">No Freeze</a></li>
<li class="level-1"><a href="#technical-details">Technical Details</a></li>
<li class="level-2"><a href="#enabling-or-disabling-individual-freeze">Enabling or Disabling Individual Freeze</a></li>
<li class="level-3"><a href="#using-rippled">Using rippled</a></li>
<li class="level-3"><a href="#using-rippleapi">Using RippleAPI</a></li>
<li class="level-2"><a href="#enabling-or-disabling-global-freeze">Enabling or Disabling Global Freeze</a></li>
<li class="level-3"><a href="#using-rippled-1">Using rippled</a></li>
<li class="level-3"><a href="#using-rippleapi-1">Using RippleAPI</a></li>
<li class="level-2"><a href="#enabling-no-freeze">Enabling No Freeze</a></li>
<li class="level-3"><a href="#using-rippled-2">Using rippled</a></li>
<li class="level-3"><a href="#using-rippleapi-2">Using RippleAPI</a></li>
<li class="level-2"><a href="#checking-for-individual-freeze">Checking for Individual Freeze</a></li>
<li class="level-3"><a href="#using-rippled-3">Using rippled</a></li>
<li class="level-3"><a href="#using-rippleapi-3">Using RippleAPI</a></li>
<li class="level-2"><a href="#checking-for-global-freeze-and-no-freeze">Checking for Global Freeze and No Freeze</a></li>
<li class="level-3"><a href="#using-rippled-4">Using rippled</a></li>
<li class="level-3"><a href="#using-rippleapi-4">Using RippleAPI</a></li>
<li class="level-1"><a href="#see-also">See Also</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="freeze-features">Freeze Features</h1>
<p>The Ripple Consensus Ledger gives addresses the ability to freeze non-XRP balances, which can be useful to meet regulatory requirements, or while investigating suspicious activity. There are three settings related to freezes:</p>
<ul>
<li><a href="#individual-freeze"><strong>Individual Freeze</strong></a> - Freeze one counterparty.</li>
<li><a href="#global-freeze"><strong>Global Freeze</strong></a> - Freeze all counterparties.</li>
<li><a href="#no-freeze"><strong>No Freeze</strong></a> - Permanently give up the ability to freeze individual counterparties, as well as the ability to end a global freeze.</li>
</ul>
<p>Because no party has a privileged place in the Ripple Consensus Ledger, the freeze feature cannot prevent a counterparty from conducting transactions in XRP or funds issued by other counterparties. No one can freeze XRP.</p>
<p>All freeze settings can be enacted regardless of whether the balance(s) to be frozen are positive or negative. Either the currency issuer or the currency holder can freeze a trust line; however, the effect of a currency holder freezing an issuer is minimal.</p>
<h2 id="individual-freeze">Individual Freeze</h2>
<p>The <strong>Individual Freeze</strong> feature is a setting on a trust line. When an issuing address enables the Individual Freeze setting, the following rules apply:</p>
<ul>
<li>Payments can still occur directly between the two parties of the frozen trust line.</li>
<li>The counterparty of that trust line can no longer decrease its balance on the frozen trust line, except in direct payments to the issuer. The counterparty can only send the frozen issuances directly to the issuer.</li>
<li>The counterparty can still receive payments from others on the frozen trust line.</li>
<li>The counterparty's offers to sell the currency issued on the frozen trust line are <a href="reference-transaction-format.html#lifecycle-of-an-offer">considered unfunded</a>.</li>
</ul>
<p>A financial institution can freeze the trust line linking it to a counterparty if that counterparty shows suspicious activity or violates the financial institution's terms of use. The financial institution should also freeze the counterparty in any other systems the financial institution operates that are connected to the Ripple Consensus Ledger. (Otherwise, an address might still be able to engage in undesired activity by sending payments through the financial institution.)</p>
<p>An individual address can freeze its trust line to a financial institution. This has no effect on transactions between the institution and other users. It does, however, prevent other addresses, including <a href="concept-issuing-and-operational-addresses.html">operational addresses</a>, from sending that financial institution's issuances to the individual address. This type of individual freeze has no effect on offers.</p>
<p>The Individual Freeze applies to a single currency only. To freeze multiple currencies with a particular counterparty, the address must enable Individual Freeze on the trust lines for each currency individually.</p>
<p>An address cannot enable the Individual Freeze setting if it has enabled the <a href="#no-freeze">No Freeze</a> setting.</p>
<h2 id="global-freeze">Global Freeze</h2>
<p>The <strong>Global Freeze</strong> feature is a setting on an address. When an issuing address enables the Global Freeze feature, the following rules apply:</p>
<ul>
<li>All counterparties of the frozen issuing address can no longer decrease the balances in their trust lines to the frozen address, except in direct payments to the issuer. (This also affects any <a href="concept-issuing-and-operational-addresses.html">operational addresses</a>.)</li>
<li>Counterparties of the frozen issuing address can still send and receive payments directly to and from the issuing address.</li>
<li>All offers to sell currencies issued by the frozen address are <a href="reference-transaction-format.html#lifecycle-of-an-offer">considered unfunded</a>.</li>
</ul>
<p>It can be useful to enable Global Freeze on a financial institution's <a href="concept-issuing-and-operational-addresses.html">issuing address</a> if the secret key to an operational address is compromised, even after regaining control of a such an address. This stops the flow of funds, preventing attackers from getting away with any more money or at least making it easier to track what happened. Besides enacting a Global Freeze in the Ripple Consensus Ledger, a financial institution should also suspend activities in its connectors to outside systems.</p>
<p>It can also be useful to enable Global Freeze if a financial institution intends to migrate to a new <a href="concept-issuing-and-operational-addresses.html">issuing address</a>, or if the financial institution intends to cease doing business. This locks the funds at a specific point in time, so users cannot trade them away for other currencies.</p>
<p>Global Freeze applies to <em>all</em> currencies issued and held by the address. You cannot enable Global Freeze for only one currency. If you want to have the ability to freeze some currencies and not others, you should use different addresses for each currency.</p>
<p>An address can always enable the Global Freeze setting. However, if the address has enabled the <a href="#no-freeze">No Freeze</a> setting, it can never <em>disable</em> Global Freeze.</p>
<h2 id="no-freeze">No Freeze</h2>
<p>The <strong>No Freeze</strong> feature is a setting on an address that permanently gives up the ability to freeze counterparties. A business can use this feature to treat its issued funds as "more like physical money" in the sense that the business cannot interfere with customers trading it among themselves. The NoFreeze setting has two effects:</p>
<ul>
<li>The issuing address can no longer enable Individual Freeze on trust lines to any counterparty.</li>
<li>The issuing address can still enable Global Freeze to enact a global freeze, but the address cannot <em>disable</em> Global Freeze.</li>
</ul>
<p>The Ripple Consensus Ledger cannot force a financial institution to honor the obligations that its issued funds represent, so giving up the ability to enable a Global Freeze cannot protect customers. However, giving up the ability to <em>disable</em> a Global Freeze ensures that the Global Freeze feature is not used unfairly against some customers.</p>
<p>The No Freeze setting applies to all currencies issued to and from an address. If you want to be able to freeze some currencies but not others, you should use different addresses for each currency.</p>
<p>You can only enable the No Freeze setting with a transaction signed by your address's master key secret. You cannot use a <a href="reference-transaction-format.html#setregularkey">Regular Key</a> or a <a href="reference-transaction-format.html#multi-signing">multi-signed transaction</a> to enable No Freeze.</p>
<h1 id="technical-details">Technical Details</h1>
<h2 id="enabling-or-disabling-individual-freeze">Enabling or Disabling Individual Freeze</h2>
<h3 id="using-rippled">Using <code>rippled</code></h3>
<p>To enable or disable Individual Freeze on a specific trust line, send a <code>TrustSet</code> transaction. Use the <a href="reference-transaction-format.html#trustset-flags"><code>tfSetFreeze</code> flag</a> to enable a freeze, and the <code>tfClearFreeze</code> flag to disable it. The fields of the transaction should be as follows:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Account</td>
<td>String</td>
<td>The Ripple address to enable or disable the freeze.</td>
</tr>
<tr>
<td>TransactionType</td>
<td>String</td>
<td><code>TrustSet</code></td>
</tr>
<tr>
<td>LimitAmount</td>
<td>Object</td>
<td>Object defining the trust line to freeze.</td>
</tr>
<tr>
<td>LimitAmount.currency</td>
<td>String</td>
<td>Currency of the trust line</td>
</tr>
<tr>
<td>LimitAmount.issuer</td>
<td>String</td>
<td>The Ripple address of the counterparty to freeze</td>
</tr>
<tr>
<td>LimitAmount.value</td>
<td>String</td>
<td>The amount of currency you trust this counterparty to issue to you, as a quoted number. From the perspective of a financial institution, this is typically <code>"0"</code>.</td>
</tr>
<tr>
<td>Flags</td>
<td>Number</td>
<td>To enable a freeze, use a value with the bit <code>0x00100000</code> (tfSetFreeze) enabled. To disable a freeze, use a value with the bit <code>0x00200000</code> (tfClearFreeze) enabled instead.</td>
</tr>
</tbody>
</table>
<p>Set the <code>Fee</code>, <code>Sequence</code>, and <code>LastLedgerSequence</code> parameters <a href="reference-transaction-format.html#signing-and-submitting-transactions">in the typical way</a>.</p>
<p>Example of submitting a TrustSet transaction to enable an individual freeze using the <a href="reference-rippled.html#websocket-api">WebSocket API</a>:</p>
<pre><code>{
"id": 12,
"command": "submit",
"tx_json": {
"TransactionType": "TrustSet",
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "12000",
"Flags": 1048576,
"LastLedgerSequence": 18103014,
"LimitAmount": {
"currency": "USD",
"issuer": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"value": "110"
},
"Sequence": 340
},
"secret": "s████████████████████████████",
"offline": false,
"fee_mult_max": 1000
}
</code></pre>
<p class="devportal-callout caution"><strong>Caution:</strong> Never send your secret key to an untrusted server or over an insecure channel.</p>
<h3 id="using-rippleapi">Using RippleAPI</h3>
<p>To enable or disable Individual Freeze on a specific trust line, prepare a <em>Trustline</em> transaction using the <a href="reference-rippleapi.html#preparetrustline">prepareTrustline</a> method. The fields of the <code>trustline</code> parameter should be set as follows:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>currency</td>
<td>String</td>
<td>The <a href="reference-rippleapi.html#currency">currency</a> of the trust line to freeze</td>
</tr>
<tr>
<td>counterparty</td>
<td>String</td>
<td>The <a href="reference-rippleapi.html#ripple-address">Ripple address</a> of the counterparty</td>
</tr>
<tr>
<td>limit</td>
<td>String</td>
<td>The amount of currency you trust this counterparty to issue to you, as a quoted number. From the perspective of a financial institution, this is typically <code>"0"</code>.</td>
</tr>
<tr>
<td>frozen</td>
<td>Boolean</td>
<td><code>true</code> to enable Individual Freeze on this trust line. <code>false</code> to disable Individual Freeze.</td>
</tr>
</tbody>
</table>
<p>The rest of the <a href="reference-rippleapi.html#transaction-flow">transaction flow</a> is the same as any other transaction.</p>
<p>Example JavaScript (ECMAScript 6) code to enable Individual Freeze on a trust line:</p>
<pre><code class="js">const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server
});
api.on('error', (errorCode, errorMessage) =&gt; {
console.log(errorCode + ': ' + errorMessage);
});
const issuing_address = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn';
const issuing_secret = 's████████████████████████████';
// Best practice: get your secret from an encrypted
// config file instead
const address_to_freeze = 'rUpy3eEg8rqjqfUoLeBnZkscbKbFsKXC3v';
const currency_to_freeze = 'USD';
api.connect().then(() =&gt; {
// Look up current state of trust line
const options = {counterparty: address_to_freeze,
currency: currency_to_freeze};
console.log('looking up', currency_to_freeze, 'trust line from',
issuing_address, 'to', address_to_freeze);
return api.getTrustlines(issuing_address, options);
}).then(data =&gt; {
// Prepare a trustline transaction to enable freeze
let trustline = {};
if (data.length !== 1) {
console.log('trustline not found, making a default one');
trustline = {
currency: currency_to_freeze,
counterparty: address_to_freeze,
limit: 0
};
} else {
trustline = data[0].specification;
console.log('trustline found. previous state:', trustline);
}
trustline.frozen = true;
console.log('preparing trustline transaction for line:', trustline);
return api.prepareTrustline(issuing_address, trustline);
}).then(prepared_tx =&gt; {
// Sign and submit the trustline transaction
console.log('signing tx:', prepared_tx.txJSON);
const signed1 = api.sign(prepared_tx.txJSON, issuing_secret);
console.log('submitting tx:', signed1.id);
return api.submit(signed1.signedTransaction);
}).then(() =&gt; {
return api.disconnect();
}).catch(console.error);
</code></pre>
<h2 id="enabling-or-disabling-global-freeze">Enabling or Disabling Global Freeze</h2>
<h3 id="using-rippled-1">Using <code>rippled</code></h3>
<p>To enable Global Freeze on an address, send an <code>AccountSet</code> transaction with the <a href="reference-transaction-format.html#accountset-flags">asfGlobalFreeze flag value</a> in the <code>SetFlag</code> field. To disable Global Freeze, put the asfGlobalFreeze flag value in the <code>ClearFlag</code> field instead.</p>
<p>Example of submitting an AccountSet transaction to enable Global Freeze using the <a href="reference-rippled.html#websocket-api">WebSocket API</a>:</p>
<pre><code>{
"id": 12,
"command": "submit",
"tx_json": {
"TransactionType": "AccountSet",
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"Fee": "12000",
"Flags": 0,
"SetFlag": 7,
"LastLedgerSequence": 18122753,
"Sequence": 349
},
"secret": "s████████████████████████████",
"offline": false,
"fee_mult_max": 1000
}
</code></pre>
<p class="devportal-callout caution"><strong>Caution:</strong> Never send your secret key to an untrusted server or over an insecure channel.</p>
<h3 id="using-rippleapi-1">Using RippleAPI</h3>
<p>To enable or disable Global Freeze on an address, prepare a <strong>Settings</strong> transaction using the <a href="reference-rippleapi.html#preparesettings">prepareSettings</a> method. The <code>settings</code> parameter should be an object set as follows:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>globalFreeze</td>
<td>Boolean</td>
<td><code>true</code> to enable a Global Freeze on this address. <code>false</code> to disable Global Freeze.</td>
</tr>
</tbody>
</table>
<p>The rest of the <a href="reference-rippleapi.html#transaction-flow">transaction flow</a> is the same as any other transaction.</p>
<p>Example JavaScript (ECMAScript 6) code to enable Global Freeze on an address:</p>
<pre><code class="js">const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server
});
api.on('error', (errorCode, errorMessage) =&gt; {
console.log(errorCode + ': ' + errorMessage);
});
const issuing_address = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn';
const issuing_secret = 's████████████████████████████';
// Best practice: get your secret from an encrypted
// config file instead
api.connect().then(() =&gt; {
// Prepare a settings transaction to enable global freeze
const settings = {
'globalFreeze': true
};
console.log('preparing settings transaction for account:',
issuing_address);
return api.prepareSettings(issuing_address, settings);
}).then(prepared_tx =&gt; {
// Sign and submit the settings transaction
console.log('signing tx:', prepared_tx.txJSON);
const signed1 = api.sign(prepared_tx.txJSON, issuing_secret);
console.log('submitting tx:', signed1.id);
return api.submit(signed1.signedTransaction);
}).then(() =&gt; {
return api.disconnect();
}).catch(console.error);
</code></pre>
<h2 id="enabling-no-freeze">Enabling No Freeze</h2>
<h3 id="using-rippled-2">Using <code>rippled</code></h3>
<p>To enable No Freeze on an address, send an <code>AccountSet</code> transaction with the <a href="reference-transaction-format.html#accountset-flags">asfNoFreeze flag value</a> in the <code>SetFlag</code> field. You must sign this transaction using the master key. Once enabled, you cannot disable No Freeze.</p>
<p>Example of submitting an AccountSet transaction to enable No Freeze using the <a href="reference-rippled.html#websocket-api">WebSocket API</a>:</p>
<p>WebSocket request:</p>
<pre><code>{
"id": 12,
"command": "submit",
"tx_json": {
"TransactionType": "AccountSet",
"Account": "raKEEVSGnKSD9Zyvxu4z6Pqpm4ABH8FS6n",
"Fee": "12000",
"Flags": 0,
"SetFlag": 6,
"LastLedgerSequence": 18124917,
"Sequence": 4
},
"secret": "s████████████████████████████",
"offline": false,
"fee_mult_max": 1000
}
</code></pre>
<p class="devportal-callout caution"><strong>Caution:</strong> Never send your secret key to an untrusted server or over an insecure channel.</p>
<h3 id="using-rippleapi-2">Using RippleAPI</h3>
<p>To enable No Freeze on an address, prepare a <strong>Settings</strong> transaction using the <a href="reference-rippleapi.html#preparesettings">prepareSettings</a> method. Once enabled, you cannot disable No Freeze. The <code>settings</code> parameter should be an object set as follows:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>noFreeze</td>
<td>Boolean</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>
<p>You must <a href="reference-rippleapi.html#sign">sign</a> this transaction using the master key. The rest of the <a href="reference-rippleapi.html#transaction-flow">transaction flow</a> is the same as any other transaction.</p>
<p>Example JavaScript (ECMAScript 6) code to enable No Freeze on an address:</p>
<pre><code class="js">const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server
});
api.on('error', (errorCode, errorMessage) =&gt; {
console.log(errorCode + ': ' + errorMessage);
});
const issuing_address = 'rUpy3eEg8rqjqfUoLeBnZkscbKbFsKXC3v';
const issuing_secret = 'snnDVkSW3aV6jvMJTPdCiE2Qxv1RW';
// Best practice: get your secret from an encrypted
// config file instead
api.connect().then(() =&gt; {
// Prepare a settings transaction to enable no freeze
const settings = {
'noFreeze': true
};
console.log('preparing settings transaction for account:',
issuing_address);
return api.prepareSettings(issuing_address, settings);
}).then(prepared_tx =&gt; {
// Sign and submit the settings transaction
console.log('signing tx:', prepared_tx.txJSON);
const signed1 = api.sign(prepared_tx.txJSON, issuing_secret);
console.log('submitting tx:', signed1.id);
return api.submit(signed1.signedTransaction);
}).then(() =&gt; {
return api.disconnect();
}).catch(console.error);
</code></pre>
<h2 id="checking-for-individual-freeze">Checking for Individual Freeze</h2>
<h3 id="using-rippled-3">Using <code>rippled</code></h3>
<p>To see if a trust line has an Individual Freeze enabled, use the <a href="reference-rippled.html#account-lines"><code>account_lines</code> method</a> with the following parameters:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>account</td>
<td>String</td>
<td>The Ripple address of the issuer</td>
</tr>
<tr>
<td>peer</td>
<td>String</td>
<td>The Ripple address of the counterparty</td>
</tr>
<tr>
<td>ledger_index</td>
<td>String</td>
<td>Use <code>validated</code> to get the most recently validated information.</td>
</tr>
</tbody>
</table>
<p>The response contains an array of trust lines, for each currency in which the issuing address and the counterparty are linked. Look for the following fields in each trust line object:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>freeze</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if the issuing address has frozen this trust line. If omitted, that is the same as <code>false</code>.</td>
</tr>
<tr>
<td>freeze_peer</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if the counterparty has frozen this trust line. If omitted, that is the same as <code>false</code>.</td>
</tr>
</tbody>
</table>
<p>Example WebSocket request to check for individual freeze:</p>
<pre><code>{
"id": 15,
"command": "account_lines",
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger": "validated",
"peer": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"
}
</code></pre>
<p>Example WebSocket response:</p>
<pre><code>{
"id": 15,
"status": "success",
"type": "response",
"result": {
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"lines": [
{
"account": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"balance": "10",
"currency": "USD",
"freeze": true,
"limit": "110",
"limit_peer": "0",
"peer_authorized": true,
"quality_in": 0,
"quality_out": 0
}
]
}
}
</code></pre>
<p>The field <code>"freeze": true</code> indicates that rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn has enabled Individual Freeze on the USD trust line to rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW. The lack of a field <code>"freeze_peer": true</code> indicates that the counterparty has <em>not</em> frozen the trust line.</p>
<h3 id="using-rippleapi-3">Using RippleAPI</h3>
<p>To see if a trust line has an Individual Freeze enabled, use the <a href="reference-rippleapi.html#gettrustlines"><code>getTrustlines</code> method</a> with the following parameters:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>address</td>
<td>String</td>
<td>The Ripple address of the issuer</td>
</tr>
<tr>
<td>options.counterparty</td>
<td>String</td>
<td>The Ripple address of the counterparty</td>
</tr>
</tbody>
</table>
<p>The response contains an array of trust lines, for each currency in which the issuing address and the counterparty are linked. Look for the following fields in each trust line object:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>specification.frozen</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if the issuing address has frozen the trust line.</td>
</tr>
<tr>
<td>counterparty.frozen</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if the counterparty has frozen the trust line.</td>
</tr>
</tbody>
</table>
<p>Example JavaScript (ECMAScript 6) code to check whether a trust line is frozen:</p>
<pre><code class="js">const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server
});
api.on('error', (errorCode, errorMessage) =&gt; {
console.log(errorCode + ': ' + errorMessage);
});
const my_address = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn';
const counterparty_address = 'rUpy3eEg8rqjqfUoLeBnZkscbKbFsKXC3v';
const frozen_currency = 'USD';
api.connect().then(() =&gt; {
// Look up current state of trust line
const options = {counterparty: counterparty_address,
currency: frozen_currency};
console.log('looking up', frozen_currency, 'trust line from',
my_address, 'to', counterparty_address);
return api.getTrustlines(my_address, options);
}).then(data =&gt; {
if (data.length !== 1) {
throw 'should only be 1 trust line per counterparty+currency pair';
}
const trustline = data[0];
console.log('Trust line frozen from our side?',
trustline.specification.frozen === true);
console.log('Trust line frozen from counterparty\'s side?',
trustline.counterparty.frozen === true);
}).then(() =&gt; {
return api.disconnect();
}).catch(console.error);
</code></pre>
<h2 id="checking-for-global-freeze-and-no-freeze">Checking for Global Freeze and No Freeze</h2>
<h3 id="using-rippled-4">Using <code>rippled</code></h3>
<p>To see if an address has enabled Global Freeze, No Freeze, or both, use the <a href="reference-rippled.html#account-lines"><code>account_info</code> method</a> with the following parameters:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>account</td>
<td>String</td>
<td>The Ripple address of the issuing address</td>
</tr>
<tr>
<td>ledger_index</td>
<td>String</td>
<td>Use <code>validated</code> to get the most recently validated information.</td>
</tr>
</tbody>
</table>
<p>Check the value of the <code>account_data.Flags</code> field of the response using the <a href="https://en.wikipedia.org/wiki/Bitwise_operation#AND">bitwise-AND</a> operator:</p>
<ul>
<li>If <code>Flags</code> AND <code>0x00400000</code> (<a href="reference-ledger-format.html#accountroot-flags">lsfGlobalFreeze</a>) is <em>nonzero</em>: Global Freeze is enabled.</li>
<li>If <code>Flags</code> AND <code>0x00200000</code> (<a href="reference-ledger-format.html#accountroot-flags">lsfNoFreeze</a>) is <em>nonzero</em>: No Freeze is enabled.</li>
</ul>
<p>Example WebSocket request:</p>
<pre><code>{
"id": 1,
"command": "account_info",
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"ledger_index": "validated"
}
</code></pre>
<p>WebSocket response:</p>
<pre><code>{
"id": 4,
"status": "success",
"type": "response",
"result": {
"account_data": {
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"AccountTxnID": "41320138CA9837B34E82B3B3D6FB1E581D5DE2F0A67B3D62B5B8A8C9C8D970D0",
"Balance": "100258663",
"Domain": "6D64756F31332E636F6D",
"EmailHash": "98B4375E1D753E5B91627516F6D70977",
"Flags": 12582912,
"LedgerEntryType": "AccountRoot",
"MessageKey": "0000000000000000000000070000000300",
"OwnerCount": 4,
"PreviousTxnID": "41320138CA9837B34E82B3B3D6FB1E581D5DE2F0A67B3D62B5B8A8C9C8D970D0",
"PreviousTxnLgrSeq": 18123095,
"Sequence": 352,
"TransferRate": 1004999999,
"index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8",
"urlgravatar": "http://www.gravatar.com/avatar/98b4375e1d753e5b91627516f6d70977"
},
"ledger_hash": "A777B05A293A73E511669B8A4A45A298FF89AD9C9394430023008DB4A6E7FDD5",
"ledger_index": 18123249,
"validated": true
}
}
</code></pre>
<p>In the above example, the <code>Flags</code> value is 12582912. This indicates that has the following flags enabled: lsfGlobalFreeze, lsfDefaultRipple, as demonstrated by the following JavaScript code:</p>
<pre><code class="js">var lsfGlobalFreeze = 0x00400000;
var lsfNoFreeze = 0x00200000;
var currentFlags = 12582912;
console.log(currentFlags &amp; lsfGlobalFreeze); //4194304
//therefore, Global Freeze is enabled
console.log(currentFlags &amp; lsfNoFreeze); //0
//therefore, No Freeze is not enabled
</code></pre>
<h3 id="using-rippleapi-4">Using RippleAPI</h3>
<p>To see if an address has enabled Global Freeze, No Freeze, or both, use the <a href="reference-rippleapi.html#getsettings"><code>getSettings</code> method</a> with the following parameters:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>address</td>
<td>String</td>
<td>The Ripple address of the issuing address</td>
</tr>
</tbody>
</table>
<p>Look for the following values in the response object:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>noFreeze</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if No Freeze is enabled.</td>
</tr>
<tr>
<td>globalFreeze</td>
<td>Boolean</td>
<td>(May be omitted) <code>true</code> if Global Freeze is enabled.</td>
</tr>
</tbody>
</table>
<p>Example JavaScript (ECMAScript 6) code to check whether an address has Global Freeze or No Freeze enabled:</p>
<pre><code class="js">const {RippleAPI} = require('ripple-lib');
const api = new RippleAPI({
server: 'wss://s1.ripple.com' // Public rippled server
});
api.on('error', (errorCode, errorMessage) =&gt; {
console.log(errorCode + ': ' + errorMessage);
});
const my_address = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn';
api.connect().then(() =&gt; {
// Look up settings object
return api.getSettings(my_address);
}).then(settings =&gt; {
console.log('Got settings for address', my_address);
console.log('Global Freeze enabled?',
(settings.globalFreeze === true));
console.log('No Freeze enabled?', (settings.noFreeze === true));
}).then(() =&gt; {
return api.disconnect();
}).catch(console.error);
</code></pre>
<h1 id="see-also">See Also</h1>
<ul>
<li><a href="https://ripple.com/files/GB-2014-02.pdf">GB-2014-02 New Feature: Balance Freeze</a></li>
<li><a href="https://github.com/ripple/ripple-dev-portal/tree/gh-pages/content/code_samples/freeze">Freeze Code Samples</a></li>
</ul>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

View File

@@ -0,0 +1,244 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Issuing and Operational Addresses - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: Tutorials</a></li>
<li class="level-2"><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li class="level-2"><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li class="level-2"><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li class="level-2"><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li class="level-2"><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li class="level-2"><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#issuing-and-operational-addresses">Issuing and Operational Addresses</a></li>
<li class="level-2"><a href="#funds-lifecycle">Funds Lifecycle</a></li>
<li class="level-2"><a href="#issuing-address">Issuing Address</a></li>
<li class="level-3"><a href="#issuing-address-compromise">Issuing Address Compromise</a></li>
<li class="level-3"><a href="#multiple-issuing-addresses">Multiple Issuing Addresses</a></li>
<li class="level-2"><a href="#operational-addresses">Operational Addresses</a></li>
<li class="level-3"><a href="#operational-address-compromise">Operational Address Compromise</a></li>
<li class="level-2"><a href="#standby-addresses">Standby Addresses</a></li>
<li class="level-3"><a href="#standby-address-compromise">Standby Address Compromise</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="issuing-and-operational-addresses">Issuing and Operational Addresses</h1>
<p>In the Ripple Consensus Ledger, financial institutions typically use multiple Ripple addresses to minimize the risk associated with a compromised secret key. Ripple strongly recommends the following separation of roles:</p>
<ul>
<li>One <strong>issuing address</strong>, also known as a "cold wallet." This address is the hub of the financial institution's accounting relationships in the ledger, but sends as few transactions as possible. <!-- STYLE_OVERRIDE: cold wallet, wallet --></li>
<li>One or more <strong>operational addresses</strong>, also known as "hot wallets." Automated, internet-connected systems use the secret keys to these addresses to conduct day-to-day business like transfers to customers and partners. <!-- STYLE_OVERRIDE: hot wallet, wallet --></li>
<li>Optional <strong>standby addresses</strong>, also known as "warm wallets." Trusted human operators use these addresses to transfer money to the operational addresses. <!-- STYLE_OVERRIDE: warm wallet, wallet --></li>
</ul>
<h2 id="funds-lifecycle">Funds Lifecycle</h2>
<p>All non-XRP currency balances (issuances) in the Ripple Consensus Ledger (RCL) are tied to accounting relationships between two Ripple addresses. When a financial institution uses Ripple's recommended separation of roles, funds relating to that institution tend to flow in a cycle.</p>
<p><a href="img/funds_flow_diagram.png"><img alt="Diagram: Funds flow from the issuing address to standby addresses, to operational addresses, to customer and partner addresses, and finally back to the issuing address." src="img/funds_flow_diagram.png"/></a></p>
<p>When the issuing address sends payments, it creates balances in the accounting relationships in the Ripple Consensus Ledger. Within the RCL, users can exchange balances across different accounting relationships, so we use the term <em>issuances</em> to describe any non-XRP balance. Issuances have negative value from the perspective of the issuing address, since they represent obligations. The same issuances have positive value from the perspective of the issuing address's counterparties. When the issuing address receives a payment, this reduces its obligations, erasing the issuances that were sent.</p>
<p>The issuing address sends issuances to a standby address, or directly to an operational address. The standby addresses send those issuances to operational addresses. Operational addresses send payments to other counterparties, such as liquidity providers, partners, and other customers. Because all issuances are tied to accounting relationships with the issuing address, payments and exchanges of issuances "ripple through" the issuing address. The payment debits the sender's balance in its accounting relationship with the issuing address and credits the recipient's balance in the recipient's accounting relationship with the issuing address. The Ripple Consensus Ledger also supports more complicated <a href="concept-paths.html">paths</a> that connect multiple issuers through order books and <a href="concept-noripple.html">liquidity providers who allow their funds to ripple</a>.</p>
<h2 id="issuing-address">Issuing Address</h2>
<p>The issuing address is like a vault. Partners, customers, and operational addresses create accounting relationships (trust lines) to the issuing address, but this address sends as few transactions as possible. Periodically, a human operator creates and signs a transaction from the issuing address to refill the balances of a standby or operational address. Ideally, the secret key used to sign these transactions should never be accessible from any internet-connected computer.</p>
<p>Unlike a vault, the issuing address can receive payments directly from customers and partners. Since all transactions in the Ripple Consensus Ledger are public, automated systems can monitor for payments to the issuing address without needing a secret key.</p>
<h3 id="issuing-address-compromise">Issuing Address Compromise</h3>
<p>If a malicious actor learns the secret key behind a institution's issuing address, that actor can create new issuances without limit and trade them in the decentralized exchange. This would make it difficult for the financial institution to distinguish legitimately-obtained issuances and redeem them fairly. If a financial institution loses control of its issuing address, the institution must create a new issuing address, and all users who have accounting relationships with the old issuing address must create new accounting relationships with the new address.</p>
<h3 id="multiple-issuing-addresses">Multiple Issuing Addresses</h3>
<p>A financial institution can issue more than one currency in the Ripple Consensus Ledger from a single issuing address. However, there are some settings that apply equally to all currencies issued from an address, including the percentage for <a href="concept-transfer-fees.html">transfer fees</a> and the <a href="concept-freeze.html">global freeze</a> status. If the financial institution wants the flexibility to manage settings differently for each currency, the institution must use a different issuing address for each currency.</p>
<h2 id="operational-addresses">Operational Addresses</h2>
<p>An operational address is like a cash register. It makes payments on behalf of the institution by transferring issuances to customers and partners. To sign transactions automatically, the secret key for an operational address must be stored on a server that is connected to the internet. (The secret key can be stored encrypted, but the server must decrypt it to sign transactions.) Customers and partners do not, and should not, create accounting relationships with an operational address.</p>
<p>Each operational address has a limited balance of issuances. When the balance of an operational address gets low, the financial institution refills it by sending a payment from the issuing address or a standby address.</p>
<h3 id="operational-address-compromise">Operational Address Compromise</h3>
<p>If a malicious actor learns the secret key behind an operational address, the financial institution can only lose as much currency as that operational address holds. The institution can switch to a new operational address with no action from customers and partners.</p>
<h2 id="standby-addresses">Standby Addresses</h2>
<p>Another optional step that an institution can take to balance risk and convenience is to use "standby addresses" as an intermediate step between the issuing address and operational addresses. The institution can fund additional Ripple addresses as standby addresses, whose keys are not stored online, but are entrusted to different trusted users.</p>
<p>When an operational address is running low on funds, a trusted user can use a standby address to refill the operational address's balance. When a standby addresses run low on funds, the institution can use the issuing address to send more currency to a standby address in a single transaction, and the standby addresses can distribute that currency among themselves if necessary. This improves security of the issuing address, allowing it to make fewer total transactions, without leaving too much money in the control of a single automated system.</p>
<p>As with operational addresses, a standby address must have an accounting relationship with the issuing address, and not with customers or partners. All precautions that apply to operational addresses also apply to standby addresses.</p>
<h3 id="standby-address-compromise">Standby Address Compromise</h3>
<p>If a standby address is compromised, the consequences are like an operational address being compromised. A malicious actor can steal any balances possessed by the standby address, and the financial institution can change to a new standby address with no action from customers and partners.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

245
concept-noripple.html Normal file
View File

@@ -0,0 +1,245 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Understanding the NoRipple flag - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#understanding-the-noripple-flag">Understanding the NoRipple Flag</a></li>
<li class="level-2"><a href="#background">Background</a></li>
<li class="level-2"><a href="#justification">Justification</a></li>
<li class="level-2"><a href="#specifics">Specifics</a></li>
<li class="level-2"><a href="#technical-details">Technical Details</a></li>
<li class="level-3"><a href="#enabling-disabling-noripple">Enabling / Disabling NoRipple</a></li>
<li class="level-3"><a href="#looking-up-noripple-status">Looking Up NoRipple Status</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="understanding-the-noripple-flag">Understanding the NoRipple Flag</h1>
<p>In the Ripple Consensus Ledger (RCL), the "NoRipple" flag is a setting on a trust line. When an address enables the NoRipple flag on two trust lines, payments from third parties cannot "ripple" through that address on those trust lines. This protects liquidity providers from having balances shift unexpectedly between different issuers of the same currency.</p>
<h2 id="background">Background</h2>
<p>"Rippling" occurs when more than one trust line is adjusted to make a payment. For example, if Alice owes Charlie money, and Alice also owes Bob money, then you could represent that in Ripple with trust lines like so:</p>
<p><img alt="Charlie --($10)-- Alice -- ($20) -- Bob" src="img/noripple-01.png"/></p>
<p>If Bob wants to pay $3 to Charlie, then he could say, "Alice, take $3 of the money you owe me, and pay it to Charlie." Alice transfers some of the debt from Bob to Charlie. In the end, the Ripple trust lines work out like so:</p>
<p><img alt="Charlie --($13)-- Alice --($17)-- Bob" src="img/noripple-02.png"/></p>
<p>We call this process, where two addresses pay each other by adjusting the balances of trust lines in between them, "rippling". This is a useful and important feature of the Ripple Consensus Ledger. Rippling occurs when are linked by trust lines that use the same <a href="reference-rippled.html#currency-codes">currency code</a>. The issuer does not need to be the same: in fact, larger chains always involve changing issuers.</p>
<h2 id="justification">Justification</h2>
<p>Sometimes you do not want your balances to ripple. For example, imagine Emily has money issued by two different financial institutions, like so</p>
<p><img alt="Charlie --($10)-- Institution A --($1)-- Emily --($100)-- Institution B --($2)-- Daniel" src="img/noripple-03.png"/></p>
<p>Now Charlie can pay Daniel by rippling through Emily's address. For example, if Charlie pays Daniel $10:</p>
<p><img alt="Charlie --($0)-- Institution A --($11)-- Emily --($90)-- Institution B --($12)-- Daniel" src="img/noripple-04.png"/></p>
<p>This may surprise Emily, who does not know Charlie or Daniel. Even worse, if Institution A charges her higher fees to withdraw her money than Institution B, this could cost Emily money. The NoRipple flag exists to avoid this scenario. If Emily sets it on both trust lines, then payments cannot ripple through her address using those two trust lines.</p>
<p>For example:</p>
<p><img alt="Charlie --($10)-- Institution A --($1, NoRipple)-- Emily --($100,NoRipple)-- Institution B --($2)-- Daniel" src="img/noripple-05.png"/></p>
<p>Now the above scenario, where Charlie pays Daniel while rippling through Emily's address, is no longer possible.</p>
<h2 id="specifics">Specifics</h2>
<p>The NoRipple flag makes certain paths invalid, so that they cannot be used to make payments. A path is considered invalid if and only if it enters <strong>and</strong> exits an address node through trust lines where NoRipple has been enabled for that address.</p>
<p><img alt="Diagram demonstrating that NoRipple has to be set on both trust lines by the same address to do anything" src="img/noripple-06.png"/></p>
<h2 id="technical-details">Technical Details</h2>
<h3 id="enabling-disabling-noripple">Enabling / Disabling NoRipple</h3>
<p>The NoRipple flag can only be enabled on a trust line if the address has a positive or zero balance on that trust line. This is so that the feature cannot be abused to default on the obligation the trust line balance represents. (Of course, you can still default by abandoning the address.)</p>
<p>In the <a href="reference-rippled.html"><code>rippled</code> APIs</a>, you can enable the NoRipple flag by sending a <a href="reference-transaction-format.html#trustset">TrustSet Transaction</a> with the <code>tfSetNoRipple</code> flag. You can disable NoRipple (enable rippling) with the <code>tfClearNoRipple</code> flag.</p>
<p>In <a href="reference-rippleapi.html">RippleAPI</a>, you can enable the NoRipple flag by sending a <a href="reference-rippleapi.html#preparetrustline">Trustline transaction</a> transaction with the <code>ripplingDisabled</code> field of the trust line set to <code>true</code>.</p>
<h3 id="looking-up-noripple-status">Looking Up NoRipple Status</h3>
<p>In the case of two accounts that mutually trust each other, the NoRipple flag is tracked separately for each account.</p>
<p>In the <a href="reference-rippled.html"><code>rippled</code> APIs</a>, you can use the <a href="https://ripple.com/build/rippled-apis/#account-lines">account_lines method</a> to look up the trust lines associated with an address. For each trust line, the <code>no_ripple</code> field shows whether the current address has enabled the NoRipple flag on that trust line, and the <code>no_ripple_peer</code> field shows whether the counterparty has enabled the NoRipple flag.</p>
<p>In <a href="reference-rippleapi.html">RippleAPI</a>, you can use the <a href="reference-rippleapi.html#gettrustlines">getTrustlines</a> method to look up the trust lines associated with an address. For each trust line, the <code>ripplingDisabled</code> field shows whether the current address has enabled the NoRipple flag on that trust line, and the <code>counterparty.ripplingDisabled</code> field shows whether the counterparty has enabled the NoRipple flag.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

326
concept-paths.html Normal file
View File

@@ -0,0 +1,326 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Paths - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#paths">Paths</a></li>
<li class="level-2"><a href="#path-steps">Path Steps</a></li>
<li class="level-1"><a href="#technical-details">Technical Details</a></li>
<li class="level-2"><a href="#pathfinding">Pathfinding</a></li>
<li class="level-2"><a href="#implied-steps">Implied Steps</a></li>
<li class="level-2"><a href="#default-paths">Default Paths</a></li>
<li class="level-2"><a href="#path-specifications">Path Specifications</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="paths">Paths</h1>
<p>In the Ripple Consensus Ledger, paths define a way for payments to flow through intermediary steps on their way from sender to receiver. Paths enable cross-currency payments by connecting sender and receiver through order books. Paths also enable complex settlement of offsetting debts.</p>
<p>A single Payment transaction in the Ripple Consensus Ledger can use multiple paths, combining liquidity from different sources to deliver the desired amount. Thus, a transaction includes a <em>path set</em>, which is a collection of possible paths to take. The paths in a path set must start and end with the same currency.</p>
<p>Since XRP can be sent directly to any address, an XRP-to-XRP transaction does not use any paths.</p>
<h2 id="path-steps">Path Steps</h2>
<p>A path is made of steps that connect the sender to the receiver of the payment. Every step is either:</p>
<ul>
<li>Rippling through another address with the same currency</li>
<li>Exchanging currency at an order book</li>
</ul>
<p>Rippling through another address is the process of moving debt around. In the typical case, this involves reducing an issuer's obligation to one party and increasing the obligation to another party. Rippling can occur between any addresses that are connected by trust lines. See <a href="concept-noripple.html">Understanding the NoRipple Flag</a> for more examples of rippling.</p>
<p>In the case of a currency exchange step, the path step specifies which currency to change to, but does not record the state of the Offers in the order book. The canonical order of transactions is not final until a ledger is validated, so you cannot know for certain which Offers a transaction will take, until after the transaction has been validated. (You can make an educated guess, since each transaction takes the best available Offers at the time it executes in the final ledger.) <!-- STYLE_OVERRIDE: will --></p>
<p>In both types of steps, each intermediate address gains and loses approximately equal value: either a balance ripples from a trust line to another trust line in the same currency, or they exchange currencies according to a previously-placed order. In some cases, the amounts gained and lost may not be exactly equivalent, due to <a href="concept-transfer-fees.html">transfer fees</a>, trust line quality, or rounding.</p>
<p><a href="img/paths-examples.png"><img alt="Diagram of three example paths" src="img/paths-examples.png"/></a></p>
<h1 id="technical-details">Technical Details</h1>
<h2 id="pathfinding">Pathfinding</h2>
<p>The <code>rippled</code> API has two methods that can be used for pathfinding. The <a href="reference-rippled.html#ripple-path-find"><code>ripple_path_find</code> command</a> does a one-time lookup of possible path sets. The <a href="reference-rippled.html#path-find"><code>path_find</code> command</a> (WebSocket only) expands on the search with follow-up responses whenever a ledger closes or the server finds a better path.</p>
<p>You can have <code>rippled</code> automatically fill in paths when you sign it, by including the <code>build_path</code> field in a request to the <a href="reference-rippled.html#sign"><code>sign</code> command</a> or <a href="reference-rippled.html#sign-and-submit-mode"><code>submit</code> command (sign-and-submit mode)</a>. However, we recommend pathfinding separately and confirming the results before signing, to avoid surprises.</p>
<p class="devportal-callout caution"><strong>Caution:</strong> Although <code>rippled</code> is designed to search for the cheapest paths possible, it may not always find them. Untrustworthy <code>rippled</code> instances could also be modified to change this behavior for profit. The actual cost to execute a payment along a path can change between submission and transaction execution.</p>
<p>Finding paths is a very challenging problem that changes slightly every few seconds as new ledgers are validated, so <code>rippled</code> is not designed to find the absolute best path. Still, you can find several possible paths and estimate the cost of delivering a particular amount.</p>
<h2 id="implied-steps">Implied Steps</h2>
<p>By convention, several steps of a path are implied by the <a href="reference-transaction-format.html#payment">fields of the Payment transaction</a>: specifically, the <code>Account</code> (sender), <code>Destination</code> (receiver), <code>Amount</code> (currency and amount to be delivered) and <code>SendMax</code> (currency and amount to be sent, if specified). The implied steps are as follows:</p>
<ul>
<li>The first step of a path is always implied to be the sender of the transaction, as defined by the transaction's <code>Account</code> field.</li>
<li>If the transaction includes a <code>SendMax</code> field with an <code>issuer</code> that is not the sender of the transaction, that issuer is implied to be the second step of the path.<ul>
<li>If <code>issuer</code> of the <code>SendMax</code> <em>is</em> the sending address, then the path starts at the sending address, and may use any of that address's trust lines in the given currency. See <a href="reference-transaction-format.html#special-issuer-values-for-sendmax-and-amount">special values for SendMax and Amount</a> for details.</li>
</ul>
</li>
<li>If the <code>Amount</code> field of the transaction includes an <code>issuer</code> that is not the same as the <code>Destination</code> of the transaction, that issuer is implied to be the second-to-last step of the path.</li>
<li>Finally, last step of a path is always implied to be the receiver of a transaction, as defined by the transaction's <code>Destination</code> field.</li>
</ul>
<h2 id="default-paths">Default Paths</h2>
<p>In addition to explicitly specified paths, a transaction can execute along the <em>default path</em>. The default path is the simplest possible way to connect the <a href="#implied-steps">implied steps</a> of the transaction.</p>
<p>The default path could be any of the following:</p>
<ul>
<li>If the transaction is uses only one currency (regardless of issuer), then the default path assumes the payment should ripple through the addresses involved. This path only works if those addresses are connected by trust lines.<ul>
<li>If <code>SendMax</code> is omitted, or the <code>issuer</code> of the <code>SendMax</code> is the sender, the default path needs a trust line from the sending <code>Account</code> to the <code>issuer</code> of the destination <code>Amount</code> to work.</li>
<li>If the <code>SendMax</code> and <code>Amount</code> have different <code>issuer</code> values, and neither are the sender or receiver, the default path is probably not useful because it would need to ripple across a trust line between the two issuers. Ripple (the company) typically discourages issuers from trusting one another directly.</li>
</ul>
</li>
<li>For cross-currency transactions, the default path uses the order book between the source currency (as specified in the <code>SendMax</code> field) and the destination currency (as specified in the <code>Amount</code> field).</li>
</ul>
<p>The following diagram enumerates all possible default paths:
<a href="img/paths-default_paths.png"><img alt="Diagram of default paths" src="img/paths-default_paths.png"/></a></p>
<p>You can use the <a href="reference-transaction-format.html#payment-flags"><code>tfNoDirectRipple</code> flag</a> to disable the default path. In this case, the transaction can only execute using the paths explicitly included in the transaction. Traders can use this option to take arbitrage opportunities.</p>
<h2 id="path-specifications">Path Specifications</h2>
<p>A path set is an array. Each member of the path set is another array that represents an individual <em>path</em>. Each member of a path is an object that specifies the step. A step has the following fields:</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>account</td>
<td>String - Address</td>
<td>(Optional) If present, this path step represents rippling through the specified address.</td>
</tr>
<tr>
<td>currency</td>
<td>String - currency code</td>
<td>(Optional) If present, this path step represents changing currencies through an order book. The currency specified indicates the new currency.</td>
</tr>
<tr>
<td>issuer</td>
<td>String - Address</td>
<td>(Optional) If the path step represents changing currencies through an order book, this field indicates the issuer of the new currency. This field is not present when changing to XRP.</td>
</tr>
<tr>
<td>type</td>
<td>Integer</td>
<td><strong>DEPRECATED</strong> (Optional) An indicator of which other fields are present.</td>
</tr>
<tr>
<td>type_hex</td>
<td>String</td>
<td><strong>DEPRECATED</strong>: (Optional) A hexadecimal representation of the <code>type</code> field.</td>
</tr>
</tbody>
</table>
<p>The <code>type</code> field, used for the binary serialization of a path set, is actually constructed through bitwise operations on a single integer. The bits are defined as follows:</p>
<table>
<thead>
<tr>
<th>Value (Hex)</th>
<th>Value (Decimal)</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>0x01</td>
<td>1</td>
<td>A change of address (rippling): the <code>account</code> field is present.</td>
</tr>
<tr>
<td>0x10</td>
<td>16</td>
<td>A change of currency: the <code>currency</code> field is present.</td>
</tr>
<tr>
<td>0x20</td>
<td>32</td>
<td>A change of issuer: the <code>issuer</code> field is present.</td>
</tr>
</tbody>
</table>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

240
concept-reserves.html Normal file
View File

@@ -0,0 +1,240 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Reserves - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#reserves">Reserves</a></li>
<li class="level-2"><a href="#base-reserve-and-owner-reserve">Base Reserve and Owner Reserve</a></li>
<li class="level-3"><a href="#owner-reserves">Owner Reserves</a></li>
<li class="level-2"><a href="#going-below-the-reserve-requirement">Going Below the Reserve Requirement</a></li>
<li class="level-2"><a href="#changing-the-reserve-requirements">Changing the Reserve Requirements</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="reserves">Reserves</h1>
<p>The Ripple Consensus Ledger applies <em>reserve requirements</em>, in XRP, to protect the shared global ledger from growing excessively large as the result of spam or malicious usage. The goal is to constrain the growth of the ledger to match <a href="https://en.wikipedia.org/wiki/Moore's_law">Moore's Law</a> so that a current commodity-level machine can always fit the current ledger in RAM and the full ledger history on disk.</p>
<p>To submit transactions, an address must hold a minimum amount of XRP in the shared global ledger. You cannot send this XRP to other addresses. To fund a new address, you must send enough XRP to meet the reserve requirement.</p>
<p>The current minimum reserve requirement is <strong>20 XRP</strong>. (This is the cost of an address that owns no other objects in the ledger.)</p>
<h2 id="base-reserve-and-owner-reserve">Base Reserve and Owner Reserve</h2>
<p>The reserve requirement is divided into two parts:</p>
<ul>
<li>The <strong>Base Reserve</strong> is a minimum amount of XRP that is required for every address in the ledger. Currently, this is 20 XRP (<code>20000000</code> drops).</li>
<li>The <strong>Owner Reserve</strong> is an increase to the reserve requirement for each object that the address owns in the ledger. Currently, this is 5 XRP (<code>5000000</code> drops) per item.</li>
</ul>
<h3 id="owner-reserves">Owner Reserves</h3>
<p>Many objects in the ledger are owned by a particular address, and count toward the reserve requirement of that address. When objects are removed from the ledger, they no longer count against their owner's reserve requirement.</p>
<ul>
<li><a href="reference-ledger-format.html#offer">Offers</a> are owned by the address that placed them. Transaction automatically removes Offers that are fully consumed or found to be unfunded. Alternatively, the owner can cancel an Offer by sending an <a href="reference-transaction-format.html#offercancel">OfferCancel transaction</a>, or by sending an <a href="reference-transaction-format.html#offercreate">OfferCreate transaction</a> that contains an <code>OfferSequence</code> parameter.</li>
<li><a href="reference-ledger-format.html#ripplestate">Trust lines</a> are shared between two addresses. The owner reserve can apply to one or both of the addresses, depending on whether the fields that address controls are in their default state. See <a href="reference-ledger-format.html#contributing-to-the-owner-reserve">Contributing to the Owner Reserve</a> for details.</li>
<li>A single <a href="reference-ledger-format.html#signerlist">SignerList</a> counts as 3 to 10 objects for purposes of the owner reserve, depending on how many members it has. See also: <a href="reference-ledger-format.html#signerlists-and-reserves">SignerLists and Reserves</a>.</li>
<li><a href="reference-ledger-format.html#directorynode">Owner directories</a> list all the ledger nodes that contribute to an address's owner reserve. However, the owner directory itself does not count towards the reserve.</li>
</ul>
<h4 id="owner-reserve-edge-cases">Owner Reserve Edge Cases</h4>
<p>The Ripple Consensus Ledger considers an <a href="reference-transaction-format.html#offercreate">OfferCreate transaction</a> to be an explicit statement of willingness to hold an asset. Consuming the offer automatically creates a trust line (with limit 0, and a balance above that limit) for the <code>taker_pays</code> currency if such a trust line does not exist. However, if the offer's owner does not hold enough XRP to also meet the owner reserve requirement of the new trust line, the offer is considered unfunded. See also: <a href="reference-transaction-format.html#lifecycle-of-an-offer">Lifecycle of an Offer</a>.</p>
<h2 id="going-below-the-reserve-requirement">Going Below the Reserve Requirement</h2>
<p>During transaction processing, a transaction can only be successful if the sending address holds at least the reserve requirement in XRP. In the process, the <a href="concept-transaction-cost.html">transaction cost</a> destroys some of the sending address's XRP balance. This can cause an address's XRP to go below the reserve requirement.</p>
<p>When an address holds less XRP than its current reserve requirement, it cannot send new transactions. Even so, the address continues to exist in the ledger, as all addresses do. Unless the reserve requirements decrease, the only way for the address to become able to send transactions again is for it to receive enough XRP that it meets the reserve requirement.</p>
<p><strong>Exception:</strong> When an address is below the reserve requirement, it can send new <a href="reference-transaction-format.html#offercreate">OfferCreate transactions</a> to acquire more XRP, or other currencies on its existing trust lines. These transactions cannot create new <a href="reference-ledger-format.html#ripplestate">trust lines</a>, or <a href="reference-ledger-format.html#offer">Offer nodes in the ledger</a>, so they can only execute trades that consume Offers that are already in the order books.</p>
<h2 id="changing-the-reserve-requirements">Changing the Reserve Requirements</h2>
<p>The Ripple Consensus Ledger has a mechanism to adjust the reserve requirements for long-term changes in the value of XRP. Any changes have to be approved by the consensus process. See <a href="concept-fee-voting.html">Fee Voting</a> for more information.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

View File

@@ -0,0 +1,277 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Stand-Alone Mode - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#stand-alone-mode">Stand-Alone Mode</a></li>
<li class="level-2"><a href="#new-genesis-ledger">New Genesis Ledger</a></li>
<li class="level-2"><a href="#load-saved-ledger">Load Saved Ledger</a></li>
<li class="level-3"><a href="#1-start-rippled-normally">1. Start rippled normally.</a></li>
<li class="level-3"><a href="#2-wait-until-rippled-is-synced">2. Wait until rippled is synced.</a></li>
<li class="level-3"><a href="#3-optional-retrieve-specific-ledger-versions">3. (Optional) Retrieve specific ledger versions.</a></li>
<li class="level-3"><a href="#4-shut-down-rippled">4. Shut down rippled .</a></li>
<li class="level-3"><a href="#5-start-rippled-in-stand-alone-mode">5. Start rippled in stand-alone mode.</a></li>
<li class="level-3"><a href="#6-manually-advance-the-ledger">6. Manually advance the ledger.</a></li>
<li class="level-2"><a href="#advancing-ledgers-in-stand-alone-mode">Advancing Ledgers in Stand-Alone Mode</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="stand-alone-mode">Stand-Alone Mode</h1>
<p>You can run <code>rippled</code> in stand-alone mode without a consensus of trusted servers. In stand-alone mode, <code>rippled</code> does not communicate with any other servers in the Ripple peer-to-peer network, but you can do most of the same actions on your local server only. Stand-alone provides a method for testing <code>rippled</code> behavior without being tied to the live network. For example, you can <a href="concept-amendments.html#testing-amendments">test the effects of Amendments</a> before those Amendments have gone into effect across the decentralized network.</p>
<p>When you run <code>rippled</code> in stand-alone mode, you have to tell it what ledger version to start from:</p>
<ul>
<li>Create a <a href="#new-genesis-ledger">new genesis ledger</a> from scratch.</li>
<li><a href="#load-saved-ledger">Load an existing ledger version</a> from disk.</li>
</ul>
<p class="devportal-callout caution"><strong>Caution:</strong> In stand-alone mode, you must <a href="#advancing-ledgers-in-stand-alone-mode">manually advance the ledger</a>.</p>
<h2 id="new-genesis-ledger">New Genesis Ledger</h2>
<p>In stand-alone mode, you can have <code>rippled</code> create a new genesis ledger. This provides a known state, with none of the ledger history from the production Ripple Consensus Ledger. (This is very useful for unit tests, among other things.)</p>
<ul>
<li>To start <code>rippled</code> in stand-alone mode with a new genesis ledger, use the <a href="https://wiki.ripple.com/Rippled#--standalone.2C_-a"><code>-a</code></a> and <a href="https://wiki.ripple.com/Rippled#--start"><code>--start</code></a> options:</li>
</ul>
<pre><code>rippled -a --start --conf=/path/to/rippled.cfg
</code></pre>
<p>In a genesis ledger, the <a href="reference-rippled.html#special-addresses">genesis address</a> holds all 100 billion XRP. The keys of the genesis address are <a href="https://github.com/ripple/rippled/blob/94ed5b3a53077d815ad0dd65d490c8d37a147361/src/ripple/app/ledger/Ledger.cpp#L184">hardcoded</a> as follows:</p>
<p><strong>Address:</strong> <code>rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh</code></p>
<p><strong>Secret:</strong> <code>snoPBrXtMeMyMHUVTgbuqAfg1SUTb</code> ("masterpassphrase")</p>
<p class="devportal-callout caution"><strong>Caution:</strong> If you create a new genesis ledger, the hard-coded default <a href="concept-reserves.html">Reserve</a> is <strong>200 XRP</strong> minimum for funding a new address, with an increment of <strong>50 XRP</strong> per object in the ledger. These values are higher than the current reserve requirements of the production network. (See also: <a href="concept-fee-voting.html">Fee Voting</a>)</p>
<h2 id="load-saved-ledger">Load Saved Ledger</h2>
<p>You can start with a ledger version that was saved to disk if your <code>rippled</code> server was previously synced with the Ripple peer-to-peer network (either the production network or the <a href="tutorial-rippled-setup.html#parallel-networks">Test Net</a>).</p>
<h3 id="1-start-rippled-normally">1. Start <code>rippled</code> normally.</h3>
<p>To load an existing ledger, you must first retrieve that ledger from the network. Start <code>rippled</code> in online mode as normal:</p>
<pre><code>rippled --conf=/path/to/rippled.cfg
</code></pre>
<h3 id="2-wait-until-rippled-is-synced">2. Wait until <code>rippled</code> is synced.</h3>
<p>Use the <a href="reference-rippled.html#server-info"><code>server_info</code> command</a> to check the state of your server relative to the network. Your server is synced when the <code>server_state</code> value shows any of the following values:</p>
<ul>
<li><code>full</code></li>
<li><code>proposing</code></li>
<li><code>validating</code></li>
</ul>
<p>For more information, see <a href="reference-rippled.html#possible-server-states">Possible Server States</a>.</p>
<h3 id="3-optional-retrieve-specific-ledger-versions">3. (Optional) Retrieve specific ledger versions.</h3>
<p>If you only want the most recent ledger, you can skip this step.</p>
<p>If you want to load a specific historical ledger version, use the <a href="reference-rippled.html#ledger-request"><code>ledger_request</code> command</a> to make <code>rippled</code> fetch it. If <code>rippled</code> does not already have the ledger version, you may have to run the <code>ledger_request</code> command multiple times until it has finished retrieving the ledger.</p>
<p>If you want to replay a specific historical ledger version, you must fetch both the ledger version to replay and the ledger version before it. (The previous ledger version sets up the initial state upon which you apply the changes described by the ledger version you replay.)</p>
<h3 id="4-shut-down-rippled">4. Shut down <code>rippled</code>.</h3>
<p>Use the <a href="reference-rippled.html#stop"><code>stop</code> command</a>:</p>
<pre><code>rippled stop --conf=/path/to/rippled.cfg
</code></pre>
<h3 id="5-start-rippled-in-stand-alone-mode">5. Start <code>rippled</code> in stand-alone mode.</h3>
<p>To load the most recent ledger version, you can use the <a href="https://wiki.ripple.com/Rippled#--standalone.2C_-a"><code>-a</code></a> and <a href="https://wiki.ripple.com/Rippled#--load"><code>--load</code></a> options when starting the server:</p>
<pre><code>rippled -a --load --conf=/path/to/rippled.cfg
</code></pre>
<p>To instead load a specific historical ledger, use the <a href="https://wiki.ripple.com/Rippled#--load"><code>--load</code></a> parameter along with the <code>--ledger</code> parameter, providing the ledger index or identifying hash of the ledger version to load:</p>
<pre><code>rippled -a --load --ledger 19860944 --conf=/path/to/rippled.cfg
</code></pre>
<h3 id="6-manually-advance-the-ledger">6. Manually advance the ledger.</h3>
<p>When you load a ledger with <code>--ledger</code> in stand-alone mode, it goes to the current open ledger, so you must <a href="#advancing-ledgers-in-stand-alone-mode">manually advance the ledger</a>:</p>
<pre><code>rippled ledger_accept --conf=/path/to/rippled.cfg
</code></pre>
<h2 id="advancing-ledgers-in-stand-alone-mode">Advancing Ledgers in Stand-Alone Mode</h2>
<p>In stand-alone mode, <code>rippled</code> does not communicate to other members of the peer-to-peer network or participate in a consensus process. Instead, you must manually advance the ledger index using the <a href="reference-rippled.html#ledger-accept"><code>ledger_accept</code> command</a>:</p>
<pre><code>rippled ledger_accept --conf=/path/to/rippled.cfg
</code></pre>
<p>In stand-alone mode, <code>rippled</code> makes no distinction between a "closed" ledger version and a "validated" ledger version. (For more information about the difference, see <a href="https://ripple.com/knowledge_center/the-ripple-ledger-consensus-process/">The Ripple Ledger Consensus Process</a>.)</p>
<p>Whenever <code>rippled</code> closes a ledger, it reorders the transactions according to a deterministic but hard-to-game algorithm. (This is an important part of consensus, since transactions may arrive at different parts of the network in different order.) When using <code>rippled</code> in stand-alone mode, you should manually advance the ledger before submitting a transaction that depends on the result of a transaction from a different address. Otherwise, the two transactions might be executed in reverse order when the ledger is closed. <strong>Note:</strong> You can safely submit multiple transactions from a single address to a single ledger, because <code>rippled</code> sorts transactions from the same address in ascending order by <a href="reference-transaction-format.html#common-fields"><code>Sequence</code> number</a>.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

View File

@@ -0,0 +1,365 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Transaction Cost - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#transaction-cost">Transaction Cost</a></li>
<li class="level-2"><a href="#current-transaction-cost">Current Transaction Cost</a></li>
<li class="level-3"><a href="#special-transaction-costs">Special Transaction Costs</a></li>
<li class="level-2"><a href="#beneficiaries-of-the-transaction-cost">Beneficiaries of the Transaction Cost</a></li>
<li class="level-2"><a href="#load-cost-and-open-ledger-cost">Load Cost and Open Ledger Cost</a></li>
<li class="level-2"><a href="#local-load-cost">Local Load Cost</a></li>
<li class="level-2"><a href="#open-ledger-cost">Open Ledger Cost</a></li>
<li class="level-3"><a href="#queued-transactions">Queued Transactions</a></li>
<li class="level-2"><a href="#reference-transaction-cost">Reference Transaction Cost</a></li>
<li class="level-3"><a href="#fee-levels">Fee Levels</a></li>
<li class="level-2"><a href="#querying-the-transaction-cost">Querying the Transaction Cost</a></li>
<li class="level-3"><a href="#server-info">server_info</a></li>
<li class="level-3"><a href="#server-state">server_state</a></li>
<li class="level-2"><a href="#specifying-the-transaction-cost">Specifying the Transaction Cost</a></li>
<li class="level-3"><a href="#automatically-specifying-the-transaction-cost">Automatically Specifying the Transaction Cost</a></li>
<li class="level-2"><a href="#transaction-costs-and-failed-transactions">Transaction Costs and Failed Transactions</a></li>
<li class="level-3"><a href="#insufficient-xrp">Insufficient XRP</a></li>
<li class="level-2"><a href="#key-reset-transaction">Key Reset Transaction</a></li>
<li class="level-2"><a href="#changing-the-transaction-cost">Changing the Transaction Cost</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="transaction-cost">Transaction Cost</h1>
<p>To protect the Ripple Consensus Ledger from being disrupted by spam and denial-of-service attacks, each transaction must destroy a small amount of <a href="https://ripple.com/knowledge_center/math-based-currency-2/">XRP</a>. This <em>transaction cost</em> is designed to increase along with the load on the network, making it very expensive to deliberately or inadvertently overload the network.</p>
<p>Every transaction must <a href="#specifying-the-transaction-cost">specify how much XRP to destroy</a> to pay the transaction cost.</p>
<h2 id="current-transaction-cost">Current Transaction Cost</h2>
<p>The current minimum transaction cost required by the network for a standard transaction is <strong>0.00001 XRP</strong> (10 drops). It sometimes increases due to higher than usual load.</p>
<p>You can also <a href="#querying-the-transaction-cost">query <code>rippled</code> for the current transaction cost</a>.</p>
<h3 id="special-transaction-costs">Special Transaction Costs</h3>
<p>Some transactions have different transaction costs:</p>
<table>
<thead>
<tr>
<th>Transaction</th>
<th>Cost Before Load Scaling</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#reference-transaction-cost">Reference Transaction</a> (Most transactions)</td>
<td>10 drops</td>
</tr>
<tr>
<td><a href="#key-reset-transaction">Key Reset Transaction</a></td>
<td>0</td>
</tr>
<tr>
<td><a href="reference-transaction-format.html#multi-signing">Multi-signed transaction</a></td>
<td>10 drops × (1 + Number of Signatures Provided)</td>
</tr>
</tbody>
</table>
<h2 id="beneficiaries-of-the-transaction-cost">Beneficiaries of the Transaction Cost</h2>
<p>The transaction cost is not paid to any party: the XRP is irrevocably destroyed. Since no new XRP can ever be created, this makes XRP more scarce and benefits all holders of XRP by making XRP more valuable.</p>
<h2 id="load-cost-and-open-ledger-cost">Load Cost and Open Ledger Cost</h2>
<p>When the <a href="concept-amendments.html#feeescalation">FeeEscalation amendment</a> is enabled, there are two thresholds for the transaction cost:</p>
<ul>
<li>If the transaction cost does not meet a <code>rippled</code> server's <a href="#local-load-cost">load-based transaction cost threshold</a>, the server ignores the transaction completely. (This logic is essentially unchanged with or without the amendment.)</li>
<li>If the transaction cost does not meet a <code>rippled</code> server's <a href="#open-ledger-cost">open ledger cost threshold</a>, the server queues the transaction for a later ledger.</li>
</ul>
<p>This divides transactions into roughly three categories:</p>
<ul>
<li>Transactions that specify a transaction cost so low that they get rejected by the load-based transaction cost.</li>
<li>Transactions that specify a transaction cost high enough to be included in the current open ledger.</li>
<li>Transactions in between, which get <a href="#queued-transactions">queued for a later ledger version</a>.</li>
</ul>
<h2 id="local-load-cost">Local Load Cost</h2>
<p>Each <code>rippled</code> server maintains a cost threshold based on its current load. If you submit a transaction with a <code>Fee</code> value that is lower than current load-based transaction cost of the <code>rippled</code> server, that server neither applies nor relays the transaction. (<strong>Note:</strong> If you submit a transaction through an <a href="reference-rippled.html#connecting-to-rippled">admin connection</a>, the server applies and relays the transaction as long as the transaction meets the un-scaled minimum transaction cost.) A transaction is very unlikely to survive <a href="https://ripple.com/knowledge_center/the-ripple-ledger-consensus-process/">the consensus process</a> unless its <code>Fee</code> value meets the requirements of a majority of servers.</p>
<h2 id="open-ledger-cost">Open Ledger Cost</h2>
<p>A <code>rippled</code> server with the <a href="concept-amendments.html#feeescalation">FeeEscalation amendment</a> enabled has a second mechanism for enforcing the transaction cost, called the <em>open ledger cost</em>. A transaction can only be included in the open ledger if it meets the open ledger cost requirement in XRP. Transactions that do not meet the open ledger cost are <a href="#queued-transactions">queued for a following ledger</a> instead.</p>
<p>For each new ledger version, the server picks a soft limit on the number of transactions to be included in the open ledger, based on the number of transactions in the previous ledger. The open ledger cost is equal to the minimum un-scaled transaction cost until the number of transactions in the open ledger is equal to the soft limit. After that, the open ledger cost increases exponentially for each transaction included in the open ledger. For the next ledger, the server increases the soft limit if the current ledger contained more transactions than the soft limit, and decreases the soft limit if the consensus process takes more than 5 seconds.</p>
<p>The open ledger cost requirement is <a href="#fee-levels">proportional to the normal cost of the transaction</a>, not the absolute transaction cost. Transaction types that have a higher-than-normal requirement, such as <a href="reference-transaction-format.html#multi-signing">multi-signed transactions</a> must pay more to meet the open ledger cost than transactions which have minimum transaction cost requirements.</p>
<p>See also: <a href="https://github.com/ripple/rippled/blob/release/src/ripple/app/misc/FeeEscalation.md">Fee Escalation explanation in <code>rippled</code> repository</a>.</p>
<h3 id="queued-transactions">Queued Transactions</h3>
<p>(Requires the <a href="concept-amendments.html#feeescalation">FeeEscalation amendment</a>)</p>
<p>When <code>rippled</code> receives a transaction that meet the server's local load cost but not the open ledger cost, the server estimates whether the transaction is "likely to be included" in a later ledger. If so, the server adds the transaction to the transaction queue and relays the transaction to other members of the network. Otherwise, the server discards the transaction. The server tries minimize the amount of network load caused by transactions that would not pay a transaction cost, since <a href="#transaction-costs-and-failed-transactions">the transaction cost only applies when a transaction is included in a validated ledger</a>.</p>
<p>The <code>rippled</code> server uses a variety of heuristics to estimate which transactions are "likely to be included in a ledger." Most importantly, those transactions must be properly-formed and <a href="reference-transaction-format.html#authorizing-transactions">authorized</a> with valid signatures.</p>
<p>When the current open ledger closes and the server starts a new open ledger, the server starts taking transactions from the queue to include in the new open ledger. The transaction queue is sorted with the transactions that would pay the highest transaction cost first, proportional to the un-scaled cost of those transactions. Transactions that pay the same transaction cost are queued in the order the server receives them.</p>
<p class="devportal-callout note"><strong>Note:</strong> As of <code>rippled</code> <strong>version 0.31.0</strong>, the transaction queue supports at most 1 transaction per sending address. This is expected to change in later versions.</p>
<p class="devportal-callout caution"><strong>Caution:</strong> The current implementation does not allow transactions with an <code>AccountTxnID</code> field in the transaction queue.</p>
<h2 id="reference-transaction-cost">Reference Transaction Cost</h2>
<p>The "Reference Transaction" is the cheapest (non-free) transaction, in terms of the necessary <a href="concept-transaction-cost.html">transaction cost</a> before load scaling. Most transactions have the same cost as the reference transaction. Some transactions, such as <a href="reference-transaction-format.html#multi-signing">multi-signed transactions</a>, require a multiple of this cost instead. When the open ledger cost escalates, the requirement is proportional to the basic cost of the transaction.</p>
<h3 id="fee-levels">Fee Levels</h3>
<p><em>Fee levels</em> represent the proportional difference between the minimum cost and the actual cost of a transaction. The <a href="#open-ledger-cost">Open Ledger Cost</a> is measured in fee levels instead of absolute cost. See the following table for a comparison:</p>
<table>
<thead>
<tr>
<th>Transaction</th>
<th>Minimum cost in drops</th>
<th>Minimum cost in Fee levels</th>
<th>Double cost in drops</th>
<th>Double cost in fee levels</th>
</tr>
</thead>
<tbody>
<tr>
<td>Reference transaction (most transactions)</td>
<td>10</td>
<td>256</td>
<td>20</td>
<td>512</td>
</tr>
<tr>
<td><a href="reference-transaction-format.html#multi-signing">Multi-signed transaction</a> with 4 signatures</td>
<td>50</td>
<td>256</td>
<td>100</td>
<td>512</td>
</tr>
<tr>
<td><a href="concept-transaction-cost.html#key-reset-transaction">Key reset transaction</a></td>
<td>0</td>
<td>(Effectively infinite)</td>
<td>N/A</td>
<td>(Effectively infinite)</td>
</tr>
</tbody>
</table>
<h2 id="querying-the-transaction-cost">Querying the Transaction Cost</h2>
<p>The <code>rippled</code> APIs have two ways to query the local load-based transaction cost: the <code>server_info</code> command (intended for humans) and the <code>server_state</code> command (intended for machines).</p>
<p>If the <a href="concept-amendments.html#feeescalation">FeeEscalation amendment</a> is enabled, you can use the <a href="reference-rippled.html#fee"><code>fee</code> command</a> to check the open ledger cost.</p>
<h3 id="server-info">server_info</h3>
<p>The <a href="reference-rippled.html#server-info"><code>server_info</code> command</a> reports the unscaled minimum XRP cost, as of the previous ledger, as <code>validated_ledger.base_fee_xrp</code>, in the form of decimal XRP. The actual cost necessary to relay a transaction is scaled by multiplying that <code>base_fee_xrp</code> value by the <code>load_factor</code> parameter in the same response, which represents the server's current load level. In other words:</p>
<p><strong>Current Transaction Cost in XRP = <code>base_fee_xrp</code> × <code>load_factor</code></strong></p>
<h3 id="server-state">server_state</h3>
<p>The <a href="reference-rippled.html#server-state"><code>server_state</code> command</a> returns a direct representation of <code>rippled</code>'s internal load calculations. In this case, the effective load rate is the ratio of the current <code>load_factor</code> to the <code>load_base</code>. The <code>validated_ledger.base_fee</code> parameter reports the minimum transaction cost in <a href="reference-rippled.html#specifying-currency-amounts">drops of XRP</a>. This design enables <code>rippled</code> to calculate the transaction cost using only integer math, while still allowing a reasonable amount of fine-tuning for server load. The actual calculation of the transaction cost is as follows:</p>
<p><strong>Current Transaction Cost in Drops = (<code>base_fee</code> × <code>load_factor</code>) ÷ <code>load_base</code></strong></p>
<h2 id="specifying-the-transaction-cost">Specifying the Transaction Cost</h2>
<p>Every signed transaction must include the transaction cost in the <a href="reference-transaction-format.html#common-fields"><code>Fee</code> field</a>. Like all fields of a signed transaction, this field cannot be changed without invalidating the signature.</p>
<p>As a rule, the Ripple Consensus Ledger executes transactions <em>exactly</em> as they are signed. (To do anything else would be difficult to coordinate across a decentralized consensus network, at the least.) As a consequence of this, every transaction destroys the exact amount of XRP specified by the <code>Fee</code> field, even if the specified amount is much more than the current minimum transaction cost for any part of the network. The transaction cost can even destroy XRP that would otherwise be set aside for an account's <a href="concept-reserves.html">reserve requirement</a>.</p>
<p>Before signing a transaction, we recommend <a href="#querying-the-transaction-cost">looking up the current load-based transaction cost</a>. If the transaction cost is high due to load scaling, you may want to wait for it to decrease. If you do not plan on submitting the transaction immediately, we recommend specifying a slightly higher transaction cost to account for future load-based fluctuations in the transaction cost.</p>
<h3 id="automatically-specifying-the-transaction-cost">Automatically Specifying the Transaction Cost</h3>
<p>When you sign a transaction online, you can omit the <code>Fee</code> field. In this case, <code>rippled</code> or <a href="reference-rippleapi.html">RippleAPI</a> checks the state of the peer-to-peer network for the current requirement and adds a <code>Fee</code> value before signing the transaction. However, there are several drawbacks and limitations to automatically filling in the transaction cost in this manner:</p>
<ul>
<li>If the network's transaction cost goes up between signing and distributing the transaction, the transaction may not be confirmed.<ul>
<li>In the worst case, the transaction may be stuck in a state of being neither definitively confirmed or rejected, unless it included a <code>LastLedgerSequence</code> parameter or until you cancel it with a new transaction that uses the same <code>Sequence</code> number. See <a href="tutorial-reliable-transaction-submission.html">reliable transaction submission</a> for best practices.</li>
</ul>
</li>
<li>You do not know in advance exactly what value you are signing for the <code>Fee</code> field.<ul>
<li>If you are using <code>rippled</code>, you can also use the <code>fee_mult_max</code> and <code>fee_div_max</code> parameters of the <a href="reference-rippled.html#sign"><code>sign</code> command</a> to set a limit to the load scaling you are willing to sign.</li>
</ul>
</li>
<li>You cannot look up the current transaction cost from an offline machine.</li>
<li>You cannot automatically specify the transaction cost when <a href="reference-transaction-format.html#multi-signing">multi-signing</a>.</li>
</ul>
<h2 id="transaction-costs-and-failed-transactions">Transaction Costs and Failed Transactions</h2>
<p>Since the purpose of the transaction cost is to protect the Ripple peer-to-peer network from excessive load, it should apply to any transaction that gets distributed to the network, regardless of whether or not that transaction succeeds. However, to affect the shared global ledger, a transaction must be included in a validated ledger. Thus, <code>rippled</code> servers try to include failed transactions in ledgers, with <a href="reference-transaction-format.html#result-categories"><code>tec</code> status codes</a> ("tec" stands for "Transaction Engine - Claimed fee only").</p>
<p>The transaction cost is only debited from the sender's XRP balance when the transaction actually becomes included in a validated ledger. This is true whether the transaction is considered successful or fails with a <code>tec</code> code.</p>
<p>If a transaction's failure is <a href="reference-transaction-format.html#finality-of-results">final</a>, the <code>rippled</code> server does not relay it to the network. The transaction does not get included in a validated ledger, so it cannot have any effect on anyone's XRP balance.</p>
<h3 id="insufficient-xrp">Insufficient XRP</h3>
<p>When a <code>rippled</code> server initially evaluates a transaction, it rejects the transaction with the error code <code>terINSUF_FEE_B</code> if the sending account does not have a high enough XRP balance to pay the XRP transaction cost. Since this is a <code>ter</code> (Retry) code, the <code>rippled</code> server retries the transaction without relaying it to the network, until the transaction's outcome is <a href="reference-transaction-format.html#finality-of-results">final</a>.</p>
<p>When a transaction has already been distributed to the network, but the account does not have enough XRP to pay the transaction cost, the result code <code>tecINSUFF_FEE</code> occurs instead. In this case, the account pays all the XRP it can, ending with 0 XRP. This can occur because <code>rippled</code> decides whether to relay the transaction to the network based on its in-progress ledger, but transactions may be dropped or reordered when building the consensus ledger.</p>
<h2 id="key-reset-transaction">Key Reset Transaction</h2>
<p>As a special case, an account can send a <a href="reference-transaction-format.html#setregularkey">SetRegularKey</a> transaction with a transaction cost of <code>0</code>, as long as the account's <a href="reference-ledger-format.html#accountroot-flags">lsfPasswordSpent flag</a> is disabled. This transaction must be signed by the account's <em>master key pair</em>. Sending this transaction enables the lsfPasswordSpent flag.</p>
<p>This feature is designed to allow you to recover an account if the regular key is compromised, without worrying about whether the compromised account has any XRP available. This way, you can regain control of the account before you send more XRP to it.</p>
<p>The <a href="reference-ledger-format.html#accountroot-flags">lsfPasswordSpent flag</a> starts out disabled. It gets enabled when you send a SetRegularKey transaction signed by the master key pair. It gets disabled again when the account receives a <a href="reference-transaction-format.html#payment">Payment</a> of XRP.</p>
<p>When the <a href="concept-amendments.html#feeescalation">FeeEscalation amendment</a> is enabled, <code>rippled</code> prioritizes key reset transactions above other transactions even though the nominal transaction cost of a key reset transaction is zero.</p>
<h2 id="changing-the-transaction-cost">Changing the Transaction Cost</h2>
<p>The Ripple Consensus Ledger has a mechanism for changing the minimum transaction cost to account for long-term changes in the value of XRP. Any changes have to be approved by the consensus process. See <a href="concept-fee-voting.html">Fee Voting</a> for more information.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

239
concept-transfer-fees.html Normal file
View File

@@ -0,0 +1,239 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title>Transfer Fees - Ripple Developer Portal</title>
<!-- favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- jQuery -->
<script src="assets/vendor/jquery-1.11.1.min.js"></script>
<!-- Custom Stylesheets. ripple.css includes bootstrap, font stuff -->
<link href="assets/css/ripple.css" rel="stylesheet" />
<link href="assets/css/devportal.css" rel="stylesheet" />
<!-- Bootstrap JS -->
<script src="assets/vendor/bootstrap.min.js"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" href="assets/vendor/docco.min.css" />
<script src="assets/vendor/highlight.min.js"></script>
<!-- syntax selection js -->
<script src="assets/js/multicodetab.js"></script>
<script>
$(document).ready(function() {
$(".multicode").minitabs();
hljs.initHighlighting();
make_code_expandable();
});
</script>
<script src="assets/js/expandcode.js"></script>
<script src="assets/js/fixsidebarscroll.js"></script>
<!-- fontawesome icons -->
<link rel="stylesheet" href="assets/vendor/fontawesome/css/font-awesome.min.css" />
</head>
<body class="page page-template page-template-template-dev-portal page-template-template-dev-portal-php sidebar-primary wpb-js-composer js-comp-ver-3.6.2 vc_responsive">
<header role="banner" class="banner navbar navbar-default navbar-fixed-top initial_header">
<div class="container">
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img src="assets/img/ripple-logo-color.png" class="logo"></a>
</div><!-- /.navbar-header -->
<div class="nav">
<div class="draft-warning">DRAFT PAGE</div>
</div><!-- /.nav -->
</div><!-- /.container -->
<div class="subnav dev_nav">
<div class="container">
<ul id="menu-dev-menu" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">References <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="reference-rippleapi.html">RippleAPI</a></li>
<li><a href="reference-rippled.html">rippled</a></li>
<li><a href="reference-transaction-format.html">Transaction Format</a></li>
<li><a href="reference-ledger-format.html">Ledger Format</a></li>
<li><a href="reference-data-api.html">Ripple Data API v2</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorials <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="tutorial-multisign.html">How to Multi-Sign</a></li>
<li><a href="concept-issuing-and-operational-addresses.html">Issuing and Operational Addresses</a></li>
<li><a href="tutorial-reliable-transaction-submission.html">Reliable Transaction Submission</a></li>
<li><a href="tutorial-rippleapi-beginners-guide.html">RippleAPI Beginners Guide</a></li>
<li><a href="tutorial-rippled-setup.html">rippled Setup</a></li>
<li><a href="tutorial-gateway-guide.html">Gateway Guide</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">RCL Features <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="concept-amendments.html">Amendments</a></li>
<li><a href="concept-fee-voting.html">Fee Voting</a></li>
<li><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li><a href="concept-freeze.html">Freeze</a></li>
<li><a href="concept-paths.html">Paths</a></li>
<li><a href="concept-reserves.html">Reserves</a></li>
<li><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Tools <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="ripple-api-tool.html">WebSocket API Tool</a></li>
<li><a href="data-api-v2-tool.html">Data API v2 Tool</a></li>
<li><a href="tool-jsonrpc.html">rippled JSON-RPC Tool</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Resources <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://forum.ripple.com/viewforum.php?f=2">Forums</a></li>
<li><a href="https://www.bountysource.com/teams/ripple/bounties">Bounties</a></li>
<li><a href="https://ripplelabs.atlassian.net/">Bug Tracking</a></li>
<li><a href="https://ripple.com/category/dev-blog/">Dev Blog</a></li>
<li><a href="https://ripple.com/press-releases/">Press Center</a></li>
<li><a href="https://ripple.com/brand-guidelines/">Brand Guidelines</a></li>
</ul>
<li><a href="https://github.com/ripple/ripple-dev-portal" title="GitHub">Site Source</a></li>
</ul><!-- /#dev-menu -->
</div><!-- /.subnav .container -->
</div><!-- /.subnav -->
</header>
<div class="wrap container" role="document">
<aside class="sidebar" role="complementary">
<div class="dev_nav_wrapper">
<div id="cont">
<h5>In this category:</h5>
<ul class="dev_nav_sidebar">
<li class="level-1"><a href="index.html">Category: RCL Features</a></li>
<li class="level-2"><a href="concept-amendments.html">Amendments</a></li>
<li class="level-2"><a href="concept-fee-voting.html">Fee Voting</a></li>
<li class="level-2"><a href="concept-fees.html">Fees (Disambiguation)</a></li>
<li class="level-2"><a href="concept-freeze.html">Freeze</a></li>
<li class="level-2"><a href="concept-paths.html">Paths</a></li>
<li class="level-2"><a href="concept-reserves.html">Reserves</a></li>
<li class="level-2"><a href="concept-stand-alone-mode.html">Stand-Alone Mode</a></li>
<li class="level-2"><a href="concept-transaction-cost.html">Transaction Cost</a></li>
<li class="level-2"><a href="concept-transfer-fees.html">Transfer Fees</a></li>
<li class="level-2"><a href="concept-noripple.html">Understanding the NoRipple flag</a></li>
</ul>
<hr />
<h5>In this page:</h5>
<ul class="dev_nav_sidebar" id="dactyl_toc_sidebar">
<li class="level-1"><a href="#transfer-fees">Transfer Fees</a></li>
<li class="level-2"><a href="#transfer-fees-in-payment-paths">Transfer Fees in Payment Paths</a></li>
<li class="level-1"><a href="#technical-details">Technical Details</a></li>
<li class="level-2"><a href="#rippleapi">RippleAPI</a></li>
<li class="level-2"><a href="#rippled">rippled</a></li>
</ul>
</div>
</div>
</aside>
<main class="main" role="main">
<div class='content'>
<h1 id="transfer-fees">Transfer Fees</h1>
<p>The <code>TransferRate</code> setting in the Ripple Consensus Ledger (RCL) allows <a href="https://ripple.com/knowledge_center/gateways/">financial institutions that issue currency in the RCL</a> to charge users a <em>transfer fee</em> for sending the currencies issued by that financial institution. The sender of the transfer is debited an extra percentage based on the transfer fee, while the recipient of the transfer is credited the intended amount. The difference is the transfer fee, which becomes the property of the issuing address, and is no longer tracked in the Ripple Consensus Ledger. The transfer fee does not apply when sending or receiving <em>directly</em> to and from the issuing account, but it does apply when transferring from an <a href="concept-issuing-and-operational-addresses.html">operational address</a> to another user.</p>
<p>XRP never has a transfer fee, because it never has an issuer.</p>
<p>For example, ACME Bank might set the transfer fee to 0.5% for ACME issuances. For the recipient of a payment to get 2 EUR.ACME, the sender must send 2.01 EUR.ACME. After the transaction, ACME's outstanding obligations in Ripple have decreased by 0.01€, which means that ACME no longer needs to hold that amount in the account backing its Ripple issuances.</p>
<p>The following diagram shows a Ripple payment of 2 EUR.ACME from Alice to Charlie with a transfer fee of 1%:</p>
<p><img alt="Alice sends 2,02€, Charlie receives 2,00€, and ACME owes 0,02€ less in Ripple" src="img/e2g-with_transferrate.png"/></p>
<h2 id="transfer-fees-in-payment-paths">Transfer Fees in Payment Paths</h2>
<p>A transfer fee applies whenever an individual transfer would shift issuances from one party to another through the issuing account. In more complex transactions, this can occur multiple times. Transfer fees apply starting from the end and working backwards, so that ultimately the sender of a payment must send enough to account for all fees. For example:</p>
<p><img alt="Diagram of cross-currency payment with transfer fees" src="img/transfer_fees_example.png"/></p>
<p>In this scenario, Salazar (the sender) holds EUR issued by ACME, and wants to deliver 100 USD issued by WayGate to Rosa (the recipient). FXMaker is a currency trader with the best offer in the order book, at a rate of 1 USD.WayGate for every 0.9 EUR.ACME. If there were no transfer fees, Salazar could deliver 100 USD to Rosa by sending 90 EUR. However, ACME has a transfer fee of 1% and WayGate has a transfer fee of 0.2%. This means:</p>
<ul>
<li>FXMaker must send 100.20 USD.WayGate for Rosa to receive 100 USD.WayGate.</li>
<li>FXMaker's current ask is 90.18 EUR.ACME to send 100.20 USD.WayGate.</li>
<li>For FXMaker to receive 90.18 EUR.ACME, Salazar must send 91.0818 EUR.ACME.</li>
</ul>
<h1 id="technical-details">Technical Details</h1>
<p>The transfer fee is represented by a setting on the <a href="concept-issuing-and-operational-addresses.html">issuing address</a>. The transfer fee has a maximum precision of 9 digits, and cannot be less than 0%. The TransferRate setting applies to all currencies issued by the same account. If you want to have different transfer fee percentages for different currencies, use different <a href="concept-issuing-and-operational-addresses.html">issuing addresses</a> for each currency.</p>
<h2 id="rippleapi">RippleAPI</h2>
<p>In RippleAPI, the transfer fee is specified in the <code>transferRate</code> field, as a decimal which represents the amount you must send for the recipient to get 1 unit of the same currency. A <code>transferRate</code> of <code>1.005</code> is equivalent to a transfer fee of 0.5%. By default, the <code>transferRate</code> is set to no fee. The value of <code>transferRate</code> cannot be less than <code>1.0</code> or more than <code>4.294967295</code>. The value <code>null</code> is a special case for no fee, equivalent to <code>1000000000</code>.</p>
<p>A financial institution can send a <a href="reference-rippleapi.html#settings">Settings transaction</a> from its <a href="concept-issuing-and-operational-addresses.html">issuing address</a> to change the <code>transferRate</code> for its issuances.</p>
<p>You can check an account's <code>transferRate</code> with the <a href="reference-rippleapi.html#getsettings">getSettings method</a>.</p>
<h2 id="rippled">rippled</h2>
<p>In <code>rippled</code>'s JSON-RPC and WebSocket APIs, the transfer fee is specified in the <code>TransferRate</code> field, as an integer which represents the amount you must send for the recipient to get 1 billion units of the same currency. A <code>TransferRate</code> of <code>1005000000</code> is equivalent to a transfer fee of 0.5%. By default, the <code>TransferRate</code> is set to no fee. The value of <code>TransferRate</code> cannot be less than <code>1000000000</code> or more than <code>4294967295</code> (the maximum value of a 32-bit unsigned integer). The value <code>0</code> is special case for no fee, equivalent to <code>1000000000</code>.</p>
<p>A financial institution can submit an <a href="reference-transaction-format.html#accountset">AccountSet transaction</a> from its <a href="concept-issuing-and-operational-addresses.html">issuing address</a> to change the <code>TransferRate</code> for its issuances.</p>
<p>You can check an account's <code>TransferRate</code> with the <a href="reference-rippled.html#account-info"><code>account_info</code> command</a>. If the <code>TransferRate</code> is omitted, then that indicates no fee.</p>
</div>
</main>
</div>
<footer class="content-info" role="contentinfo">
<div class="container">
<div class="row">
<section class="col-sm-3 widget nav_menu-3 widget_nav_menu">
<h4>Resources<hr></h4>
<ul id="menu-resources" class="menu">
<li class="menu-insights"><a href="https://ripple.com/insights/">Insights</a></li>
<li class="menu-press-center"><a href="https://ripple.com/press-center/">Press Center</a></li>
<li class="menu-media-resources"><a href="https://ripple.com/media-resources/">Media Resources</a></li>
<li class="menu-videos"><a href="https://ripple.com/videos/">Videos</a></li>
<li class="menu-whitepapers-reports"><a href="https://ripple.com/whitepapers-reports/">Whitepapers &#038; Reports</a></li>
<li class="menu-xrp-portal"><a href="https://ripple.com/xrp-portal/">XRP Portal</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-5 widget_nav_menu">
<h4>Regulators<hr></h4>
<ul id="menu-compliance-regulatory-relations" class="menu"><li class="menu-compliance"><a href="https://ripple.com/compliance/">Compliance</a></li>
<li class="menu-policy-framework"><a href="https://ripple.com/policy-framework/">Policy Framework</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-4 widget_nav_menu">
<h4>Support<hr></h4>
<ul id="menu-dev-footer-menu" class="menu">
<li class="menu-contact-us"><a href="https://ripple.com/contact/">Contact Us</a></li>
<li class="active menu-developer-center"><a href="https://ripple.com/build/">Developer Center</a></li>
<li class="menu-knowledge-center"><a href="https://ripple.com/learn/">Knowledge Center</a></li>
<li class="menu-ripple-forum"><a target="_blank" href="https://forum.ripple.com/">Ripple Forum</a></li>
</ul>
</section>
<section class="col-sm-3 widget nav_menu-2 widget_nav_menu">
<h4>About<hr></h4>
<ul id="menu-company-footer" class="menu">
<li class="menu-our-company"><a href="https://ripple.com/company/">Our Company</a></li>
<li class="menu-careers"><a href="https://ripple.com/company/careers/">Careers</a></li>
</ul>
</section>
<div class="col-sm-12 absolute_bottom_footer">
<div class="col-sm-8">
<span>&copy; 2013-2015 Ripple Labs, Inc. All Rights Reserved.</span>
<span><a href="https://ripple.com/terms-of-use/">Terms</a></span>
<span><a href="https://ripple.com/privacy-policy/">Privacy</a></span>
</div>
</div><!-- /.absolute_bottom_footer -->
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</body>
</html>

View File

@@ -1,45 +0,0 @@
'use strict';
const assert = require('assert');
const crypto = require('crypto');
const R_B58_DICT = 'rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz';
const base58 = require('base-x')(R_B58_DICT);
assert(crypto.getHashes().includes('sha256'));
assert(crypto.getHashes().includes('ripemd160'));
// Start with a public key. secp256k1 keys should be 33 bytes;
// Ed25519 keys should be 32 bytes prefixed with 0xED (a total of 33 bytes).
// Ed25519 key:
const pubkey_hex =
'ED9434799226374926EDA3B54B1B461B4ABF7237962EAE18528FEA67595397FA32';
//// secp256k1 key:
// const pubkey_hex =
// '0303E20EC6B4A39A629815AE02C0A1393B9225E3B890CAE45B59F42FA29BE9668D';
const pubkey = Buffer.from(pubkey_hex, 'hex');
assert(pubkey.length == 33);
// Calculate the RIPEMD160 hash of the SHA-256 hash of the public key
// This is the "Account ID"
const pubkey_inner_hash = crypto.createHash('sha256').update(pubkey);
const pubkey_outer_hash = crypto.createHash('ripemd160');
pubkey_outer_hash.update(pubkey_inner_hash.digest());
const account_id = pubkey_outer_hash.digest();
// Prefix the Account ID with the type prefix for "Ripple Address", then
// calculate a checksum as the first 4 bytes of the SHA-256 of the SHA-256
// of the Account ID
const address_type_prefix = Buffer.from([0x00]);
const payload = Buffer.concat([address_type_prefix, account_id]);
const chksum_hash1 = crypto.createHash('sha256').update(payload).digest();
const chksum_hash2 = crypto.createHash('sha256').update(chksum_hash1).digest();
const checksum = chksum_hash2.slice(0,4);
// Concatenate the address type prefix, the payload, and the checksum.
// Base-58 encode the encoded value to get the address.
const dataToEncode = Buffer.concat([payload, checksum]);
const address = base58.encode(dataToEncode);
console.log(address);
// rnBFvgZphmN39GWzUJeUitaP22Fr9be75H (secp256k1 example)
// rDTXLQ7ZKZVKz33zJbHjgVShjsBnqMBhmN (Ed25519 example)

View File

@@ -1,9 +0,0 @@
{
"name": "address_encoding",
"version": "0.0.1",
"license": "MIT",
"//": "Change the license to something appropriate. You may want to use 'UNLICENSED' if you are just starting out.",
"dependencies": {
"base-x": "*",
}
}

View File

@@ -1,100 +0,0 @@
{
"result": {
"account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"account_objects": [
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"Flags": 0,
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "37D90463CDE0497DB12F18099296DA0E1E52334A785710B5F56BC9637F62429C",
"PreviousTxnLgrSeq": 8003261,
"SendMax": "999999000000",
"Sequence": 5,
"index": "2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2"
},
{
"Balance": {
"currency": "BAR",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 1179648,
"HighLimit": {
"currency": "BAR",
"issuer": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"value": "1234567890123450e79"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "BAR",
"issuer": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"value": "0"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "D7687E275546322995764632799040CF5BDB597691683DE7C532A60BA64E5414",
"PreviousTxnLgrSeq": 8003321,
"index": "5A157543E6A19F14E559A3BE14876B48103502F3258893D4F6DF83E61884F20E"
},
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"DestinationTag": 1,
"Flags": 0,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"PreviousTxnLgrSeq": 7841263,
"SendMax": "100000000",
"Sequence": 4,
"index": "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9"
},
{
"Balance": {
"currency": "FOO",
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value": "0"
},
"Flags": 2162688,
"HighLimit": {
"currency": "FOO",
"issuer": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"value": "0"
},
"HighNode": "0000000000000000",
"LedgerEntryType": "RippleState",
"LowLimit": {
"currency": "FOO",
"issuer": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"value": "10000"
},
"LowNode": "0000000000000000",
"PreviousTxnID": "119400AC7A5B8BD3CC98265D0AB89FC59E6469ED64917425AEA52D40D83164A7",
"PreviousTxnLgrSeq": 8003297,
"index": "88003CF8348313E5CD720FBCCFADF4C4CE6C2C7F4093C943A3E01E8F547DBCAF"
},
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"Flags": 0,
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441",
"PreviousTxnLgrSeq": 7835887,
"SendMax": "100000000",
"Sequence": 2,
"index": "CEA5F0BD7B2B5C85A70AE735E4CE722C43C86410A79AB87C11938AA13A11DBF9"
}
],
"ledger_hash": "386FE87ED505E28134AC7171A0B690BA87112334B22DD83194A4C7C3C9810E84",
"ledger_index": 8003351,
"status": "success",
"validated": true
}
}

View File

@@ -1,100 +0,0 @@
{
"result" : {
"account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"account_objects" : [
{
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode" : "0000000000000000",
"Flags" : 0,
"LedgerEntryType" : "Check",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "37D90463CDE0497DB12F18099296DA0E1E52334A785710B5F56BC9637F62429C",
"PreviousTxnLgrSeq" : 8003261,
"SendMax" : "999999000000",
"Sequence" : 5,
"index" : "2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2"
},
{
"Balance" : {
"currency" : "BAR",
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value" : "0"
},
"Flags" : 1179648,
"HighLimit" : {
"currency" : "BAR",
"issuer" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"value" : "1234567890123450e79"
},
"HighNode" : "0000000000000000",
"LedgerEntryType" : "RippleState",
"LowLimit" : {
"currency" : "BAR",
"issuer" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"value" : "0"
},
"LowNode" : "0000000000000000",
"PreviousTxnID" : "D7687E275546322995764632799040CF5BDB597691683DE7C532A60BA64E5414",
"PreviousTxnLgrSeq" : 8003321,
"index" : "5A157543E6A19F14E559A3BE14876B48103502F3258893D4F6DF83E61884F20E"
},
{
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode" : "0000000000000000",
"DestinationTag" : 1,
"Flags" : 0,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"LedgerEntryType" : "Check",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"PreviousTxnLgrSeq" : 7841263,
"SendMax" : "100000000",
"Sequence" : 4,
"index" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9"
},
{
"Balance" : {
"currency" : "FOO",
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
"value" : "0"
},
"Flags" : 2162688,
"HighLimit" : {
"currency" : "FOO",
"issuer" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"value" : "0"
},
"HighNode" : "0000000000000000",
"LedgerEntryType" : "RippleState",
"LowLimit" : {
"currency" : "FOO",
"issuer" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"value" : "10000"
},
"LowNode" : "0000000000000000",
"PreviousTxnID" : "119400AC7A5B8BD3CC98265D0AB89FC59E6469ED64917425AEA52D40D83164A7",
"PreviousTxnLgrSeq" : 8003297,
"index" : "88003CF8348313E5CD720FBCCFADF4C4CE6C2C7F4093C943A3E01E8F547DBCAF"
},
{
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode" : "0000000000000000",
"Flags" : 0,
"LedgerEntryType" : "Check",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441",
"PreviousTxnLgrSeq" : 7835887,
"SendMax" : "100000000",
"Sequence" : 2,
"index" : "CEA5F0BD7B2B5C85A70AE735E4CE722C43C86410A79AB87C11938AA13A11DBF9"
}
],
"ledger_hash" : "386FE87ED505E28134AC7171A0B690BA87112334B22DD83194A4C7C3C9810E84",
"ledger_index" : 8003351,
"status" : "success",
"validated" : true
}
}

View File

@@ -1,6 +0,0 @@
rippled sign s████████████████████████████ '{
"TransactionType": "CheckCancel",
"Account": "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"CheckID": "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
"Fee": "12"
}'

View File

@@ -1,20 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:11:07 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "12001222800000002400000003501849647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB068400000000000000C7321022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78744630440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A181147990EC5D1D8DF69E070A968D4B186986FDF06ED0",
"tx_json" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"CheckID" : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 3,
"SigningPubKey" : "022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78",
"TransactionType" : "CheckCancel",
"TxnSignature" : "30440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A1",
"hash" : "414558223CA8595916BB1FEF238B3BB601B7C0E52659292251CE613E6B4370F9"
}
}
}

View File

@@ -1,7 +0,0 @@
rippled sign s████████████████████████████ '{
"Account": "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"TransactionType": "CheckCash",
"Amount": "100000000",
"CheckID": "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334",
"Fee": "12"
}'

View File

@@ -1,21 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:17:54 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "120011228000000024000000015018838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334614000000005F5E10068400000000000000C732102F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED74473045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C811449FF0C73CA6AF9733DA805F76CA2C37776B7C46B",
"tx_json" : {
"Account" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"Amount" : "100000000",
"CheckID" : "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 1,
"SigningPubKey" : "02F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED",
"TransactionType" : "CheckCash",
"TxnSignature" : "3045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C",
"hash" : "0521707D510858BC8AF69D2227E1D1ADA7DB7C5B4B74115BCD0D91B62AFA8EDC"
}
}
}

View File

@@ -1,6 +0,0 @@
rippled sign s████████████████████████████ '{
"Account": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"TransactionType": "CheckCash",
"DeliverMin": "95000000",
"CheckID": "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9"
}'

View File

@@ -1,21 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Apr-03 00:09:53 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "12001122800000002400000004501884C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD968400000000000000A6A4000000005A995C073210361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C7446304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC8114A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json" : {
"Account" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"CheckID" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"DeliverMin" : "95000000",
"Fee" : "10",
"Flags" : 2147483648,
"Sequence" : 4,
"SigningPubKey" : "0361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C",
"TransactionType" : "CheckCash",
"TxnSignature" : "304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC",
"hash" : "A0AFE572E4736CBF49FF4D0D3FF8FDB0C4D31BD10CB4EB542230F85F0F2DD222"
}
}
}

View File

@@ -1,10 +0,0 @@
rippled sign s████████████████████████████ '{
"TransactionType": "CheckCreate",
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"SendMax": "100000000",
"Expiration": 570113521,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"DestinationTag": 1,
"Fee": "12"
}'

View File

@@ -1,24 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Mar-21 21:00:05 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"status" : "success",
"tx_blob" : "120010228000000024000000012A21FB3DF12E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074473045022100EB5A9001E14FC7304C4C2DF66507F9FC59D17FDCF98B43A4E30356658AB2A7CF02207127187EE0F287665D9552D15BEE6B00D3C6691C6773CE416E8A714B853F44FC8114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag" : 1,
"Expiration" : 570113521,
"Fee" : "12",
"Flags" : 2147483648,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax" : "100000000",
"Sequence" : 1,
"SigningPubKey" : "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType" : "CheckCreate",
"TxnSignature" : "3045022100EB5A9001E14FC7304C4C2DF66507F9FC59D17FDCF98B43A4E30356658AB2A7CF02207127187EE0F287665D9552D15BEE6B00D3C6691C6773CE416E8A714B853F44FC",
"hash" : "07C3B2878B6941FED97BA647244531B7E2203268B05C71C3A1A014045ADDF408"
}
}
}

View File

@@ -1 +0,0 @@
rippled submit 12001222800000002400000003501849647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB068400000000000000C7321022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78744630440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A181147990EC5D1D8DF69E070A968D4B186986FDF06ED0

View File

@@ -1,23 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:11:07 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"engine_result" : "tesSUCCESS",
"engine_result_code" : 0,
"engine_result_message" : "The transaction was applied. Only final in a validated ledger.",
"status" : "success",
"tx_blob" : "12001222800000002400000003501849647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB068400000000000000C7321022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78744630440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A181147990EC5D1D8DF69E070A968D4B186986FDF06ED0",
"tx_json" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"CheckID" : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 3,
"SigningPubKey" : "022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78",
"TransactionType" : "CheckCancel",
"TxnSignature" : "30440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A1",
"hash" : "414558223CA8595916BB1FEF238B3BB601B7C0E52659292251CE613E6B4370F9"
}
}
}

View File

@@ -1 +0,0 @@
rippled submit 120011228000000024000000015018838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334614000000005F5E10068400000000000000C732102F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED74473045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C811449FF0C73CA6AF9733DA805F76CA2C37776B7C46B

View File

@@ -1,24 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:17:54 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"engine_result" : "tesSUCCESS",
"engine_result_code" : 0,
"engine_result_message" : "The transaction was applied. Only final in a validated ledger.",
"status" : "success",
"tx_blob" : "120011228000000024000000015018838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334614000000005F5E10068400000000000000C732102F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED74473045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C811449FF0C73CA6AF9733DA805F76CA2C37776B7C46B",
"tx_json" : {
"Account" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"Amount" : "100000000",
"CheckID" : "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 1,
"SigningPubKey" : "02F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED",
"TransactionType" : "CheckCash",
"TxnSignature" : "3045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C",
"hash" : "0521707D510858BC8AF69D2227E1D1ADA7DB7C5B4B74115BCD0D91B62AFA8EDC"
}
}
}

View File

@@ -1 +0,0 @@
rippled submit 12001122800000002400000004501884C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD968400000000000000A6A4000000005A995C073210361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C7446304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC8114A8B6B9FF3246856CADC4A0106198C066EA1F9C39

View File

@@ -1,24 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Apr-03 00:10:30 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"engine_result" : "tesSUCCESS",
"engine_result_code" : 0,
"engine_result_message" : "The transaction was applied. Only final in a validated ledger.",
"status" : "success",
"tx_blob" : "12001122800000002400000004501884C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD968400000000000000A6A4000000005A995C073210361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C7446304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC8114A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json" : {
"Account" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"CheckID" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"DeliverMin" : "95000000",
"Fee" : "10",
"Flags" : 2147483648,
"Sequence" : 4,
"SigningPubKey" : "0361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C",
"TransactionType" : "CheckCash",
"TxnSignature" : "304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC",
"hash" : "A0AFE572E4736CBF49FF4D0D3FF8FDB0C4D31BD10CB4EB542230F85F0F2DD222"
}
}
}

View File

@@ -1 +0,0 @@
rippled submit 120010228000000024000000042E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074463044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C408114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39

View File

@@ -1,26 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Mar-28 01:52:49 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result": {
"engine_result": "terQUEUED",
"engine_result_code": -89,
"engine_result_message": "Held until escalated fee drops.",
"status" : "success",
"tx_blob": "120010228000000024000000042E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074463044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C408114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag": 1,
"Fee": "12",
"Flags": 2147483648,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax": "100000000",
"Sequence": 4,
"SigningPubKey": "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType": "CheckCreate",
"TxnSignature": "3044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C40",
"hash": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB"
}
}
}

View File

@@ -1 +0,0 @@
rippled tx 414558223CA8595916BB1FEF238B3BB601B7C0E52659292251CE613E6B4370F9

View File

@@ -1,89 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:11:53 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"CheckID" : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 3,
"SigningPubKey" : "022C53CD19049F32F31848DD3B3BE5CEF6A2DD1EFDA7971AB3FA49B1BAF12AEF78",
"TransactionType" : "CheckCancel",
"TxnSignature" : "30440220615F9D19FA182F08530CD978A4C216C8676D0BA9EDB53A620AC909AA0EF0FE7E02203A09CC34C3DB85CCCB3137E78081F8F2B441FB0A3B9E40901F312D3CBA0A67A1",
"date" : 570071520,
"hash" : "414558223CA8595916BB1FEF238B3BB601B7C0E52659292251CE613E6B4370F9",
"inLedger" : 7,
"ledger_index" : 7,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"RootIndex" : "032D861D151E38E86F46805ED1896D1A50144F65459717B6D12470A9E6E3B66E"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "032D861D151E38E86F46805ED1896D1A50144F65459717B6D12470A9E6E3B66E"
}
},
{
"DeletedNode" : {
"FinalFields" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"Destination" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"DestinationNode" : "0000000000000000",
"DestinationTag" : 1,
"Expiration" : 570113521,
"Flags" : 0,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "5463C6E08862A1FAE5EDAC12D70ADB16546A1F674930521295BC082494B62924",
"PreviousTxnLgrSeq" : 6,
"SendMax" : "100000000",
"Sequence" : 2
},
"LedgerEntryType" : "Check",
"LedgerIndex" : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"RootIndex" : "AD136EC2A266027D8F202C97D294BBE32F6FC2AD5501D9853F785FE77AB94C94"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "AD136EC2A266027D8F202C97D294BBE32F6FC2AD5501D9853F785FE77AB94C94"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"Balance" : "4999999999964",
"Flags" : 0,
"OwnerCount" : 1,
"Sequence" : 4
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "D3A1DBAA28717975A9119EC4CBC891BA9A66236C484F03C9911F463AD3B66DE0",
"PreviousFields" : {
"Balance" : "4999999999976",
"OwnerCount" : 2,
"Sequence" : 3
},
"PreviousTxnID" : "5463C6E08862A1FAE5EDAC12D70ADB16546A1F674930521295BC082494B62924",
"PreviousTxnLgrSeq" : 6
}
}
],
"TransactionIndex" : 0,
"TransactionResult" : "tesSUCCESS"
},
"status" : "success",
"validated" : true
}
}

View File

@@ -1 +0,0 @@
rippled tx 0521707D510858BC8AF69D2227E1D1ADA7DB7C5B4B74115BCD0D91B62AFA8EDC

View File

@@ -1,108 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Jan-24 01:18:39 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"Account" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"Amount" : "100000000",
"CheckID" : "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334",
"Fee" : "12",
"Flags" : 2147483648,
"Sequence" : 1,
"SigningPubKey" : "02F135B14C552968B0ABE8493CC4C5795A7484D73F6BFD01379F73456F725F66ED",
"TransactionType" : "CheckCash",
"TxnSignature" : "3045022100C64278AC90B841CD3EA9889A4847CAB3AC9927057A34130810FAA7FAC0C6E3290220347260A4C0A6DC9B699DA12510795B2B3414E1FA222AF743226345FBAAEF937C",
"date" : 570071920,
"hash" : "0521707D510858BC8AF69D2227E1D1ADA7DB7C5B4B74115BCD0D91B62AFA8EDC",
"inLedger" : 9,
"ledger_index" : 9,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"RootIndex" : "032D861D151E38E86F46805ED1896D1A50144F65459717B6D12470A9E6E3B66E"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "032D861D151E38E86F46805ED1896D1A50144F65459717B6D12470A9E6E3B66E"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"Balance" : "1000099999988",
"Flags" : 0,
"OwnerCount" : 0,
"Sequence" : 2
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "38E1EF3284A45B090D549EFFB014ACF68927FE0884CDAF01CE3629DF90542D66",
"PreviousFields" : {
"Balance" : "1000000000000",
"Sequence" : 1
},
"PreviousTxnID" : "3E14D859F6B4BE923323EFC94571606455921E65173147A89BC6EDDA4374B294",
"PreviousTxnLgrSeq" : 5
}
},
{
"DeletedNode" : {
"FinalFields" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"Destination" : "rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy",
"DestinationNode" : "0000000000000000",
"DestinationTag" : 1,
"Expiration" : 570113521,
"Flags" : 0,
"InvoiceID" : "6F1DFD1D0FE8A32E40E1F2C05CF1C15545BAB56B617F9C6C2D63A6B704BEF59B",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "0FD9F719CDE29E6F6DF752B93EB9AC6FBB493BF989F2CB63B8C0E73A8DCDF61A",
"PreviousTxnLgrSeq" : 8,
"SendMax" : "100000000",
"Sequence" : 4
},
"LedgerEntryType" : "Check",
"LedgerIndex" : "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"RootIndex" : "AD136EC2A266027D8F202C97D294BBE32F6FC2AD5501D9853F785FE77AB94C94"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "AD136EC2A266027D8F202C97D294BBE32F6FC2AD5501D9853F785FE77AB94C94"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
"Balance" : "4999899999952",
"Flags" : 0,
"OwnerCount" : 1,
"Sequence" : 5
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "D3A1DBAA28717975A9119EC4CBC891BA9A66236C484F03C9911F463AD3B66DE0",
"PreviousFields" : {
"Balance" : "4999999999952",
"OwnerCount" : 2
},
"PreviousTxnID" : "0FD9F719CDE29E6F6DF752B93EB9AC6FBB493BF989F2CB63B8C0E73A8DCDF61A",
"PreviousTxnLgrSeq" : 8
}
}
],
"TransactionIndex" : 0,
"TransactionResult" : "tesSUCCESS"
},
"status" : "success",
"validated" : true
}
}

View File

@@ -1 +0,0 @@
rippled tx A0AFE572E4736CBF49FF4D0D3FF8FDB0C4D31BD10CB4EB542230F85F0F2DD222

View File

@@ -1,107 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Apr-03 00:11:17 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"Account" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"CheckID" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"DeliverMin" : "95000000",
"Fee" : "10",
"Flags" : 2147483648,
"Sequence" : 4,
"SigningPubKey" : "0361ACFCB478BCAE01451F95060AF94F70365BF00D7B4661EC2C69EA383762516C",
"TransactionType" : "CheckCash",
"TxnSignature" : "304402203D7EC220D48AA040D6915C160275D202F7F808E2B58F11B1AB05FB5E5CFCC6C00220304BBD3AD32E13150E0ED7247F2ADFAE83D0ECE329E20CFE0F8DF352934DD2FC",
"date" : 576029432,
"hash" : "A0AFE572E4736CBF49FF4D0D3FF8FDB0C4D31BD10CB4EB542230F85F0F2DD222",
"inLedger" : 8005386,
"ledger_index" : 8005386,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"RootIndex" : "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"Balance" : "10099999960",
"Flags" : 0,
"OwnerCount" : 2,
"Sequence" : 5
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "7939126A732EBBDEC715FD3CCB056EB31E65228CA17E3B2901E7D30B90FD03D3",
"PreviousFields" : {
"Balance" : "9999999970",
"Sequence" : 4
},
"PreviousTxnID" : "0283465F0D21BE6B1E91ABDE17266C24C1B4915BAAA9A88CC098A98D5ECD3E9E",
"PreviousTxnLgrSeq" : 8005334
}
},
{
"DeletedNode" : {
"FinalFields" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode" : "0000000000000000",
"DestinationTag" : 1,
"Flags" : 0,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"OwnerNode" : "0000000000000000",
"PreviousTxnID" : "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"PreviousTxnLgrSeq" : 7841263,
"SendMax" : "100000000",
"Sequence" : 4
},
"LedgerEntryType" : "Check",
"LedgerIndex" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9"
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Balance" : "9899999920",
"Flags" : 0,
"OwnerCount" : 2,
"Sequence" : 8
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "A9A591BA661F69433D5BEAA49F10BA2B8DEA5183EF414B9130BFE5E0328FE875",
"PreviousFields" : {
"Balance" : "9999999920",
"OwnerCount" : 3
},
"PreviousTxnID" : "54A7A917BE9AC13962251BCF1D09803C7BBE75882B8BFC987B5933A566A48215",
"PreviousTxnLgrSeq" : 8004870
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"RootIndex" : "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
}
}
],
"TransactionIndex" : 4,
"TransactionResult" : "tesSUCCESS"
},
"status" : "success",
"validated" : true
}
}

View File

@@ -1 +0,0 @@
rippled tx 09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB

View File

@@ -1,86 +0,0 @@
Loading: "/home/mduo13/.config/ripple/rippled.cfg"
2018-Mar-28 02:17:55 HTTPClient:NFO Connecting to 127.0.0.1:5005
{
"result" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag" : 1,
"Fee" : "12",
"Flags" : 2147483648,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax" : "100000000",
"Sequence" : 4,
"SigningPubKey" : "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType" : "CheckCreate",
"TxnSignature" : "3044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C40",
"date" : 575516100,
"hash" : "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"inLedger" : 7841263,
"ledger_index" : 7841263,
"meta" : {
"AffectedNodes" : [
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"RootIndex" : "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
}
},
{
"CreatedNode" : {
"LedgerEntryType" : "Check",
"LedgerIndex" : "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"NewFields" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag" : 1,
"InvoiceID" : "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax" : "100000000",
"Sequence" : 4
}
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Account" : "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Balance" : "9999999952",
"Flags" : 0,
"OwnerCount" : 2,
"Sequence" : 5
},
"LedgerEntryType" : "AccountRoot",
"LedgerIndex" : "A9A591BA661F69433D5BEAA49F10BA2B8DEA5183EF414B9130BFE5E0328FE875",
"PreviousFields" : {
"Balance" : "9999999964",
"OwnerCount" : 1,
"Sequence" : 4
},
"PreviousTxnID" : "45AF36CF7A810D0054C38C82C898EFC7E4898DF94FA7A3AAF80CB868708F7CE0",
"PreviousTxnLgrSeq" : 7841237
}
},
{
"ModifiedNode" : {
"FinalFields" : {
"Flags" : 0,
"Owner" : "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"RootIndex" : "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
},
"LedgerEntryType" : "DirectoryNode",
"LedgerIndex" : "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
}
}
],
"TransactionIndex" : 0,
"TransactionResult" : "tesSUCCESS"
},
"status" : "success",
"validated" : true
}
}

View File

@@ -1,16 +0,0 @@
Connected
Final transaction result: { type: 'checkCancel',
address: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
sequence: 7,
id: '54A7A917BE9AC13962251BCF1D09803C7BBE75882B8BFC987B5933A566A48215',
specification:
{ checkID: '2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2' },
outcome:
{ result: 'tesSUCCESS',
timestamp: '2018-04-02T23:42:22.000Z',
fee: '0.000012',
balanceChanges: { rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za: [Array] },
orderbookChanges: {},
ledgerVersion: 8004870,
indexInLedger: 3 } }
Disconnected

View File

@@ -1,53 +0,0 @@
Connected
account_objects response: { account: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
account_objects:
[ { Account: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
Destination: 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis',
DestinationNode: '0000000000000000',
Flags: 0,
LedgerEntryType: 'Check',
OwnerNode: '0000000000000000',
PreviousTxnID: '37D90463CDE0497DB12F18099296DA0E1E52334A785710B5F56BC9637F62429C',
PreviousTxnLgrSeq: 8003261,
SendMax: '999999000000',
Sequence: 5,
index: '2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2' },
{ Account: 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis',
Destination: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
DestinationNode: '0000000000000000',
Flags: 0,
LedgerEntryType: 'Check',
OwnerNode: '0000000000000000',
PreviousTxnID: 'EF462F1D004E97850AECFB8EC4836DA57706FAFADF8E0914010853C1EC7F2055',
PreviousTxnLgrSeq: 8003480,
SendMax: [Object],
Sequence: 2,
index: '323CE1D169135513085268EF81ED40775725C97E7922DBABCCE48FE3FD138861' },
{ Account: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
Destination: 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis',
DestinationNode: '0000000000000000',
DestinationTag: 1,
Flags: 0,
InvoiceID: '46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291',
LedgerEntryType: 'Check',
OwnerNode: '0000000000000000',
PreviousTxnID: '09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB',
PreviousTxnLgrSeq: 7841263,
SendMax: '100000000',
Sequence: 4,
index: '84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9' },
{ Account: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
Destination: 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis',
DestinationNode: '0000000000000000',
Flags: 0,
LedgerEntryType: 'Check',
OwnerNode: '0000000000000000',
PreviousTxnID: 'C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441',
PreviousTxnLgrSeq: 7835887,
SendMax: '100000000',
Sequence: 2,
index: 'CEA5F0BD7B2B5C85A70AE735E4CE722C43C86410A79AB87C11938AA13A11DBF9' } ],
ledger_hash: 'DD577D96A1064E16A5DB64C3C25BFF5EF0D8E36A18E4540B162731FA6320C46D',
ledger_index: 8004101,
validated: true }
Disconnected

View File

@@ -1,18 +0,0 @@
Connected
Final transaction result: { type: 'checkCreate',
address: 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za',
sequence: 2,
id: 'C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441',
specification:
{ destination: 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis',
sendMax: { currency: 'XRP', value: '100' } },
outcome:
{ result: 'tesSUCCESS',
timestamp: '2018-03-27T20:47:40.000Z',
fee: '0.000012',
balanceChanges: { rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za: [Array] },
orderbookChanges: {},
ledgerVersion: 7835887,
indexInLedger: 0 } }
Calculated checkID: CEA5F0BD7B2B5C85A70AE735E4CE722C43C86410A79AB87C11938AA13A11DBF9
Disconnected

View File

@@ -1,21 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const tx_hash = "54A7A917BE9AC13962251BCF1D09803C7BBE75882B8BFC987B5933A566A48215"
return api.getTransaction(tx_hash)
}).then(response => {
console.log("Final transaction result:", response)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,26 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const account_objects_request = {
command: "account_objects",
account: "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
ledger_index: "validated",
type: "check"
}
return api.connection.request(account_objects_request)
}).then(response => {
console.log("account_objects response:", response)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,33 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
const decodeAddress = require('ripple-address-codec').decodeAddress;
const createHash = require('crypto').createHash;
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const tx_hash = "C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441"
return api.getTransaction(tx_hash)
}).then(response => {
console.log("Final transaction result:", response)
// Re-calculate checkID to work around issue ripple-lib#876
const checkIDhasher = createHash('sha512')
checkIDhasher.update(Buffer.from('0043', 'hex'))
checkIDhasher.update(new Buffer(decodeAddress(response.address)))
const seqBuf = Buffer.alloc(4)
seqBuf.writeUInt32BE(response.sequence, 0)
checkIDhasher.update(seqBuf)
const checkID = checkIDhasher.digest('hex').slice(0,64).toUpperCase()
console.log("Calculated checkID:", checkID)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,9 +0,0 @@
{
"name": "checks-examples",
"description": "Example code for signing and submitting Checks with RippleAPI",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"ripple-lib": "^0.19.0"
}
}

View File

@@ -1,41 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const sender = 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za'
const options = {
// Allow up to 60 ledger versions (~5 min) instead of the default 3 versions
// before this transaction fails permanently.
"maxLedgerVersionOffset": 60
}
return api.prepareCheckCancel(sender, {
"checkID": "2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2"
}, options)
}).then(prepared => {
console.log("txJSON:", prepared.txJSON);
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)
// Example output:
//
// Connected
// txJSON: {"Account":"rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
// "TransactionType":"CheckCancel",
// "CheckID":"2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2",
// "Flags":2147483648,
// "LastLedgerSequence":8004884,
// "Fee":"12",
// "Sequence":7}
// Disconnected

View File

@@ -1,46 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const sender = 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis'
const options = {
// Allow up to 60 ledger versions (~5 min) instead of the default 3 versions
// before this transaction fails permanently.
"maxLedgerVersionOffset": 60
}
return api.prepareCheckCash(sender, {
"checkID": "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"amount": {
"currency": "XRP",
"value": "95" // Cash for exactly 95 XRP
}
}, options)
}).then(prepared => {
console.log("txJSON:", prepared.txJSON);
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)
// Example output:
//
// Connected
// txJSON: {"Account":"rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
// "TransactionType":"CheckCash",
// "CheckID":"84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
// "Amount":"95000000",
// "Flags":2147483648,
// "LastLedgerSequence":8006841,
// "Fee":"12",
// "Sequence":5}
// Disconnected

View File

@@ -1,46 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const sender = 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis'
const options = {
// Allow up to 60 ledger versions (~5 min) instead of the default 3 versions
// before this transaction fails permanently.
"maxLedgerVersionOffset": 60
}
return api.prepareCheckCash(sender, {
"checkID": "C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441",
"deliverMin": {
"currency": "XRP",
"value": "95" // Cash for at least 95 XRP
}
}, options)
}).then(prepared => {
console.log("txJSON:", prepared.txJSON);
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)
// Example output:
//
// Connected
// txJSON: {"Account":"rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
// "TransactionType":"CheckCash",
// "CheckID":"C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441",
// "DeliverMin":"95000000",
// "Flags":2147483648,
// "LastLedgerSequence":8006858,
// "Fee":"12",
// "Sequence":5}
// Disconnected

View File

@@ -1,47 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const sender = 'rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za'
const receiver = 'rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis'
const options = {
// Allow up to 60 ledger versions (~5 min) instead of the default 3 versions
// before this transaction fails permanently.
"maxLedgerVersionOffset": 60
}
return api.prepareCheckCreate(sender, {
"destination": receiver,
"sendMax": {
"currency": "XRP",
"value": "100" // RippleAPI uses decimal XRP, not integer drops
}
"invoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291"
}, options)
}).then(prepared => {
console.log("txJSON:", prepared.txJSON);
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)
// Example output:
//
// Connected
// txJSON: {"Account":"rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
// "TransactionType":"CheckCreate",
// "Destination":"rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
// "SendMax":"100000000",
// "Flags":2147483648,
// "InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
// "LastLedgerSequence":7835917,"Fee":"12","Sequence":2}
// Disconnected

View File

@@ -1,2 +0,0 @@
tx_blob is: 12001222800000002400000007201B007A251450182E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C268400000000000000C732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB4007446304402205D77451B0D7BCDA1FE5B98763C5B3B2837453371FE93C2B86157C44B1867AE36022003800273848BC2F8E1C6EC7EE4B0CB2425A888AE80E586886C306C796B25678B8114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF
tx hash is: 54A7A917BE9AC13962251BCF1D09803C7BBE75882B8BFC987B5933A566A48215

View File

@@ -1,2 +0,0 @@
tx_blob is: 12001022800000002400000002201B0077911368400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400744630440220181FE2F945EBEE632966D5FB03114611E3047ACD155AA1BDB9DF8545C7A2431502201E873A4B0D177AB250AF790CE80621E16F141506CF507586038FC4A8E95887358114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39
tx hash is: C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441

View File

@@ -1,15 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// Can sign offline if the txJSON has all required fields
const api = new RippleAPI()
const txJSON = '{"Account":"rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za","TransactionType":"CheckCancel","CheckID":"2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2","Flags":2147483648,"LastLedgerSequence":8004884,"Fee":"12","Sequence":7}'
// Be careful where you store your real secret.
const secret = 's████████████████████████████'
const signed = api.sign(txJSON, secret)
console.log("tx_blob is:", signed.signedTransaction)
console.log("tx hash is:", signed.id)

View File

@@ -1,22 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// Can sign offline if the txJSON has all required fields
const api = new RippleAPI()
const txJSON = '{"Account":"rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za", \
"TransactionType":"CheckCreate", \
"Destination":"rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis", \
"SendMax":"100000000", \
"Flags":2147483648, \
"LastLedgerSequence":7835923, \
"Fee":"12", \
"Sequence":2}'
// Be careful where you store your real secret.
const secret = 's████████████████████████████'
const signed = api.sign(txJSON, secret)
console.log("tx_blob is:", signed.signedTransaction)
console.log("tx hash is:", signed.id)

View File

@@ -1,3 +0,0 @@
Connected
Preliminary transaction result: tesSUCCESS
Disconnected

View File

@@ -1,3 +0,0 @@
Connected
Preliminary transaction result: tesSUCCESS
Disconnected

View File

@@ -1,21 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const tx_blob = "12001222800000002400000007201B007A251450182E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C268400000000000000C732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB4007446304402205D77451B0D7BCDA1FE5B98763C5B3B2837453371FE93C2B86157C44B1867AE36022003800273848BC2F8E1C6EC7EE4B0CB2425A888AE80E586886C306C796B25678B8114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF"
return api.submit(tx_blob)
}).then(response => {
console.log("Preliminary transaction result:", response.resultCode)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,26 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
// This example connects to a public Test Net server
const api = new RippleAPI({server: 'wss://s.altnet.rippletest.net:51233'})
api.connect().then(() => {
console.log('Connected')
const tx_blob = "12001022800000002400000002201B0077911368400000000000000"+
"C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6"+
"CFCF2E359045FF4BB400744630440220181FE2F945EBEE632966D5FB03114611E3047"+
"ACD155AA1BDB9DF8545C7A2431502201E873A4B0D177AB250AF790CE80621E16F1415"+
"06CF507586038FC4A8E95887358114735FF88E5269C80CD7F7AF10530DAB840BBF6FD"+
"F8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39"
return api.submit(tx_blob)
}).then(response => {
console.log("Preliminary transaction result:", response.resultCode)
// Disconnect and return
}).then(() => {
api.disconnect().then(() => {
console.log('Disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,10 +0,0 @@
{
"method": "account_objects",
"params": [
{
"account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"ledger_index": "validated",
"type": "check"
}
]
}

View File

@@ -1,69 +0,0 @@
{
"result": {
"account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"account_objects": [
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"Flags": 0,
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "37D90463CDE0497DB12F18099296DA0E1E52334A785710B5F56BC9637F62429C",
"PreviousTxnLgrSeq": 8003261,
"SendMax": "999999000000",
"Sequence": 5,
"index": "2E0AD0740B79BE0AAE5EDD1D5FC79E3C5C221D23C6A7F771D85569B5B91195C2"
},
{
"Account": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"Destination": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"DestinationNode": "0000000000000000",
"Flags": 0,
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "EF462F1D004E97850AECFB8EC4836DA57706FAFADF8E0914010853C1EC7F2055",
"PreviousTxnLgrSeq": 8003480,
"SendMax": {
"currency": "BAR",
"issuer": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"value": "1000000000000000e-66"
},
"Sequence": 2,
"index": "323CE1D169135513085268EF81ED40775725C97E7922DBABCCE48FE3FD138861"
},
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"DestinationTag": 1,
"Flags": 0,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"PreviousTxnLgrSeq": 7841263,
"SendMax": "100000000",
"Sequence": 4,
"index": "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9"
},
{
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationNode": "0000000000000000",
"Flags": 0,
"LedgerEntryType": "Check",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "C0B27D20669BAB837B3CDF4B8148B988F17CE1EF8EDF48C806AE9BF69E16F441",
"PreviousTxnLgrSeq": 7835887,
"SendMax": "100000000",
"Sequence": 2,
"index": "CEA5F0BD7B2B5C85A70AE735E4CE722C43C86410A79AB87C11938AA13A11DBF9"
}
],
"ledger_hash": "4002E4E84CABAAF1BDD5636097F3042547EBAE2DEE647E1036E64AA9FDA2A10C",
"ledger_index": 8004173,
"status": "success",
"validated": true
}
}

View File

@@ -1,14 +0,0 @@
{
"id": "sign_req_1",
"command": "sign",
"tx_json": {
"TransactionType": "CheckCreate",
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"SendMax": "100000000",
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"DestinationTag": 1,
"Fee": "12"
},
"secret" : "s████████████████████████████"
}

View File

@@ -1,22 +0,0 @@
{
"id": "sign_req_1",
"result": {
"tx_blob": "120010228000000024000000042E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074463044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C408114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag": 1,
"Fee": "12",
"Flags": 2147483648,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax": "100000000",
"Sequence": 4,
"SigningPubKey": "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType": "CheckCreate",
"TxnSignature": "3044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C40",
"hash": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB"
}
},
"status": "success",
"type": "response"
}

View File

@@ -1,5 +0,0 @@
{
"id": "submit_req_1",
"command": "submit",
"tx_blob": "120010228000000024000000042E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074463044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C408114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39"
}

View File

@@ -1,25 +0,0 @@
{
"id": "submit_req_1",
"result": {
"engine_result": "terQUEUED",
"engine_result_code": -89,
"engine_result_message": "Held until escalated fee drops.",
"tx_blob": "120010228000000024000000042E00000001501146060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE29168400000000000000C694000000005F5E100732103B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB40074463044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C408114735FF88E5269C80CD7F7AF10530DAB840BBF6FDF8314A8B6B9FF3246856CADC4A0106198C066EA1F9C39",
"tx_json": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag": 1,
"Fee": "12",
"Flags": 2147483648,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax": "100000000",
"Sequence": 4,
"SigningPubKey": "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType": "CheckCreate",
"TxnSignature": "3044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C40",
"hash": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB"
}
},
"status": "success",
"type": "response"
}

View File

@@ -1,5 +0,0 @@
{
"id": "tx_req_1",
"command": "tx",
"transaction": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB"
}

View File

@@ -1,85 +0,0 @@
{
"id": "tx_req_1",
"result": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag": 1,
"Fee": "12",
"Flags": 2147483648,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax": "100000000",
"Sequence": 4,
"SigningPubKey": "03B6FCD7FAC4F665FE92415DD6E8450AD90F7D6B3D45A6CFCF2E359045FF4BB400",
"TransactionType": "CheckCreate",
"TxnSignature": "3044022071A341F911A8EF3B68399487CAF5BA3B59C6FE476B626698AEF044B8183721BC0220166053A859BD907251DFCCF34DD71202180EBABAE7098BB5903D16EBFC993C40",
"date": 575516100,
"hash": "09D992D4C89E2A24D4BA9BB57ED81C7003815940F39B7C87ADBF2E49034380BB",
"inLedger": 7841263,
"ledger_index": 7841263,
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"RootIndex": "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "3F248A0715ECCAFC3BEE0C63C8F429ACE54ABC403AAF5F2885C2B65D62D1FAC1"
}
},
{
"CreatedNode": {
"LedgerEntryType": "Check",
"LedgerIndex": "84C61BE9B39B2C4A2267F67504404F1EC76678806C1B901EA781D1E3B4CE0CD9",
"NewFields": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Destination": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"DestinationTag": 1,
"InvoiceID": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
"SendMax": "100000000",
"Sequence": 4
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rBXsgNkPcDN2runsvWmwxk3Lh97zdgo9za",
"Balance": "9999999952",
"Flags": 0,
"OwnerCount": 2,
"Sequence": 5
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "A9A591BA661F69433D5BEAA49F10BA2B8DEA5183EF414B9130BFE5E0328FE875",
"PreviousFields": {
"Balance": "9999999964",
"OwnerCount": 1,
"Sequence": 4
},
"PreviousTxnID": "45AF36CF7A810D0054C38C82C898EFC7E4898DF94FA7A3AAF80CB868708F7CE0",
"PreviousTxnLgrSeq": 7841237
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rGPnRH1EBpHeTF2QG8DCAgM7z5pb75LAis",
"RootIndex": "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "C6A30AD85346718C7148D161663F84A96A4F0CE7F4D68C3C74D176A6C50BA6B9"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"validated": true
},
"status": "success",
"type": "response"
}

View File

@@ -1,40 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
const myAddr = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn'
const mySecret = 's████████████████████████████'
const myEscrowCancellation = {
owner: myAddr,
escrowSequence: 366
}
const myInstructions = {
maxLedgerVersionOffset: 5
}
const api = new RippleAPI({server: 'wss://s2.ripple.com'})
function submitTransaction(lastClosedLedgerVersion, prepared, secret) {
const signedData = api.sign(prepared.txJSON, secret)
console.log('Transaction ID: ', signedData.id)
return api.submit(signedData.signedTransaction).then(data => {
console.log('Tentative Result: ', data.resultCode)
console.log('Tentative Message: ', data.resultMessage)
})
}
api.connect().then(() => {
console.log('Connected')
return api.prepareEscrowCancellation(myAddr, myEscrowCancellation, myInstructions)
}).then(prepared => {
console.log('EscrowCancellation Prepared')
return api.getLedger().then(ledger => {
console.log('Current Ledger', ledger.ledgerVersion)
return submitTransaction(ledger.ledgerVersion, prepared, mySecret)
})
}).then(() => {
api.disconnect().then(() => {
console.log('api disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,57 +0,0 @@
'use strict'
const RippleAPI = require('ripple-lib').RippleAPI
const cc = require('five-bells-condition')
const crypto = require('crypto')
const myAddr = 'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn'
const mySecret = 's████████████████████████████'
// Construct condition and fulfillment
const preimageData = crypto.randomBytes(32)
const myFulfillment = new cc.PreimageSha256()
myFulfillment.setPreimage(preimageData)
const conditionHex = myFulfillment.getConditionBinary().toString('hex').toUpperCase()
console.log('Condition:', conditionHex)
console.log('Fulfillment:', myFulfillment.serializeBinary().toString('hex').toUpperCase())
// Construct transaction
const currentTime = new Date()
const myEscrow = {
"destination": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", // Destination can be same as source
"destinationTag": 2017,
"amount": "0.1113", //decimal XRP
"condition": conditionHex,
"allowExecuteAfter": currentTime.toISOString() // can be executed right away if the condition is met
}
const myInstructions = {
maxLedgerVersionOffset: 5
}
// Connect and submit
const api = new RippleAPI({server: 'wss://s2.ripple.com'})
function submitTransaction(lastClosedLedgerVersion, prepared, secret) {
const signedData = api.sign(prepared.txJSON, secret)
console.log('Transaction ID: ', signedData.id)
return api.submit(signedData.signedTransaction).then(data => {
console.log('Tentative Result: ', data.resultCode)
console.log('Tentative Message: ', data.resultMessage)
})
}
api.connect().then(() => {
console.log('Connected')
return api.prepareEscrowCreation(myAddr, myEscrow, myInstructions)
}).then(prepared => {
console.log('EscrowCreation Prepared')
return api.getLedger().then(ledger => {
console.log('Current Ledger', ledger.ledgerVersion)
return submitTransaction(ledger.ledgerVersion, prepared, mySecret)
})
}).then(() => {
api.disconnect().then(() => {
console.log('api disconnected')
process.exit()
})
}).catch(console.error)

View File

@@ -1,9 +0,0 @@
const cc = require('five-bells-condition')
const crypto = require('crypto')
const preimageData = crypto.randomBytes(32)
const myFulfillment = new cc.PreimageSha256()
myFulfillment.setPreimage(preimageData)
console.log('Condition:', myFulfillment.getConditionBinary().toString('hex').toUpperCase())
console.log('Fulfillment:', myFulfillment.serializeBinary().toString('hex').toUpperCase())

View File

@@ -1,10 +0,0 @@
{
"name": "escrow-examples",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"ripple-lib": "^0.17.6",
"five-bells-condition": "*"
},
"//": "Intended for Node.js version ?.? and higher"
}

View File

@@ -1,7 +0,0 @@
{
"id": 2,
"command": "account_objects",
"account": "r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT",
"ledger": "validated",
"type": "escrow"
}

View File

@@ -1,7 +0,0 @@
{
"id": 5,
"command": "account_objects",
"account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"ledger_index": "validated",
"type": "escrow"
}

View File

@@ -1,26 +0,0 @@
{
"id": 2,
"status": "success",
"type": "response",
"result": {
"account": "r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT",
"account_objects": [
{
"Account": "r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT",
"Amount": "10000",
"CancelAfter": 559913895,
"Destination": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"FinishAfter": 559892324,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "4756C22BBB7FC23D9081FDB180806939D6FEBC967BE0EC2DB95B166AF9C086E9",
"PreviousTxnLgrSeq": 2764813,
"index": "7243A9750FA4BE3E63F75F6DACFD79AD6B6C76947F6BDC46CD0F52DBEEF64C89"
}
],
"ledger_hash": "82F24FFA72AED16F467BBE79D387E92FDA39F29038B26E79464CDEDFB506E366",
"ledger_index": 2764826,
"validated": true
}
}

View File

@@ -1,60 +0,0 @@
{
"id": 5,
"result": {
"account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"account_objects": [{
"Account": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
"Amount": "250",
"Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"DestinationNode": "0000000000000000",
"FinishAfter": 570672000,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC",
"PreviousTxnLgrSeq": 4602906,
"index": "2BF3226ACCA8FF7ACB7201F20A701F51D8666A2FA2FBFBE6A05C9161F9228A18"
}, {
"Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"Amount": "250",
"Destination": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
"DestinationNode": "0000000000000000",
"FinishAfter": 570672000,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "463D5A3CF09F4890B8471027F80414B3B438E6907425B71DC324D7118E90A107",
"PreviousTxnLgrSeq": 4603003,
"index": "35462CDC28AD830B29D101E8307AF5B6BFBC262F1BDCCA7EB45D1CA3F8B44F53"
}, {
"Account": "r9gyNNzhMtfwZara61u3ycfMLdkTpKJZHX",
"Amount": "250",
"Destination": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"DestinationNode": "0000000000000000",
"FinishAfter": 570672000,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "08C9B20AC9EB191238038A108CC4CBBC0243672484B466FB42DED0A7DF6A31A1",
"PreviousTxnLgrSeq": 4602954,
"index": "A7B0983A1B53D92278E21499064A4F8BBE08CB8D14DB6BBBA8F688AB1D3FDA45"
}, {
"Account": "rfztBskAVszuS3s5Kq7zDS74QtHrw893fm",
"Amount": "250",
"Destination": "rafD3taonqdnVpaxCCT6sjnScZUeFGf1JG",
"DestinationNode": "0000000000000000",
"FinishAfter": 570672000,
"Flags": 0,
"LedgerEntryType": "Escrow",
"OwnerNode": "0000000000000000",
"PreviousTxnID": "F4778F528AB3CB945BDB88036EF9FE6C0E899F1629D9E51129E3B93CD488395A",
"PreviousTxnLgrSeq": 4602977,
"index": "F99A4DDADDDF623908C9A048170AB107AFF78684AB8F3110E9F00BBBC606ABD2"
}],
"ledger_hash": "1D4850035F175CA6F1CD5CE3B53C01AA83E4F086C13085E4FBC1EEFCCB345A9B",
"ledger_index": 4603176,
"validated": true
},
"status": "success",
"type": "response"
}

View File

@@ -1,5 +0,0 @@
{
"id": 4,
"command": "ledger",
"ledger_index": "validated"
}

View File

@@ -1,5 +0,0 @@
{
"id": 4,
"command": "ledger",
"ledger_index": "validated"
}

View File

@@ -1,19 +0,0 @@
{
"id": 1,
"status": "success",
"type": "response",
"result": {
"ledger": {
... (trimmed) ...
"close_time": 560302643,
"close_time_human": "2017-Oct-02 23:37:23",
"close_time_resolution": 10,
... (trimmed) ...
},
"ledger_hash": "668F0647A6F3CC277496245DBBE9BD2E3B8E70E7AA824E97EF3237FE7E1EE3F2",
"ledger_index": 2906341,
"validated": true
}
}

View File

@@ -1,28 +0,0 @@
{
"id": 4,
"status": "success",
"type": "response",
"result": {
"ledger": {
"accepted": true,
"account_hash": "3B5A8FF5334F94F4D3D09F236F9D1B4C028FCAE30948ACC986D461DDEE1D886B",
"close_flags": 0,
"close_time": 557256670,
"close_time_human": "2017-Aug-28 17:31:10",
"close_time_resolution": 10,
"closed": true,
"hash": "A999223A80174A7CB39D766B625C9E476F24AD2F15860A712CD029EE5ED1C320",
"ledger_hash": "A999223A80174A7CB39D766B625C9E476F24AD2F15860A712CD029EE5ED1C320",
"ledger_index": "1908253",
"parent_close_time": 557256663,
"parent_hash": "6A70C5336ACFDA05760D827776079F7A544D2361CFD5B21BD55A92AA20477A61",
"seqNum": "1908253",
"totalCoins": "99997280690562728",
"total_coins": "99997280690562728",
"transaction_hash": "49A51DFB1CAB2F134D93D5D1C5FF55A15B12DA36DAF9F5862B17C47EE966647D"
},
"ledger_hash": "A999223A80174A7CB39D766B625C9E476F24AD2F15860A712CD029EE5ED1C320",
"ledger_index": 1908253,
"validated": true
}
}

View File

@@ -1,11 +0,0 @@
{
"id": 5,
"command": "submit",
"secret": "s████████████████████████████",
"tx_json": {
"Account": "rhgdnc82FwHFUKXp9ZcpgwXWRAxKf5Buqp",
"TransactionType": "EscrowCancel",
"Owner": "r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT",
"OfferSequence": 1
}
}

Some files were not shown because too many files have changed in this diff Show More