mirror of
				https://github.com/XRPLF/xrpl-dev-portal.git
				synced 2025-11-04 11:55:50 +00:00 
			
		
		
		
	Fix headings, add HTML
This commit is contained in:
		@@ -155,7 +155,7 @@ Return the result.
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Create Time Escrow
 | 
			
		||||
### Create Time-based Escrow
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
async function createTimeEscrow() {
 | 
			
		||||
@@ -236,7 +236,7 @@ Disconnect from the XRP Ledger.
 | 
			
		||||
} // End of createTimeEscrow()
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
##Finish Time-based Escrow
 | 
			
		||||
### Finish Time-based Escrow
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
async function finishEscrow() {
 | 
			
		||||
@@ -354,7 +354,7 @@ Disconnect from the XRP Ledger
 | 
			
		||||
} // End of getStandbyEscrows()
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Get Operational Escrows
 | 
			
		||||
### Get Operational Escrows
 | 
			
		||||
 | 
			
		||||
This function is the same as `getStandbyEscrows()`, but for the Operational account.
 | 
			
		||||
 | 
			
		||||
@@ -514,4 +514,313 @@ Disconnect from the XRP Ledger instance.
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 8.escrow.html
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <title>Escrow Test Harness</title>
 | 
			
		||||
    <link href='https://fonts.googleapis.com/css?family=Work Sans' rel='stylesheet'>
 | 
			
		||||
    <style>
 | 
			
		||||
       body{font-family: "Work Sans", sans-serif;padding: 20px;background: #fafafa;}
 | 
			
		||||
       h1{font-weight: bold;}
 | 
			
		||||
       input, button {padding: 6px;margin-bottom: 8px;}
 | 
			
		||||
       button{font-weight: bold;font-family: "Work Sans", sans-serif;}
 | 
			
		||||
       td{vertical-align: middle;}
 | 
			
		||||
    </style>    
 | 
			
		||||
    <script src='https://unpkg.com/xrpl@2.2.3'></script>
 | 
			
		||||
    <script src='ripplex1-send-xrp.js'></script>
 | 
			
		||||
    <script src='ripplex2-send-currency.js'></script>
 | 
			
		||||
    <script src='ripplex8-escrow.js'></script>
 | 
			
		||||
  </head>
 | 
			
		||||
  
 | 
			
		||||
<!-- ************************************************************** -->
 | 
			
		||||
<!-- ********************** The Form ****************************** -->
 | 
			
		||||
<!-- ************************************************************** -->
 | 
			
		||||
 | 
			
		||||
  <body>
 | 
			
		||||
    <h1>Escrow Test Harness</h1>
 | 
			
		||||
    <form id="theForm">
 | 
			
		||||
      Choose your ledger instance:  
 | 
			
		||||
        
 | 
			
		||||
      <input type="radio" id="tn" name="server"
 | 
			
		||||
        value="wss://s.altnet.rippletest.net:51233" checked>
 | 
			
		||||
      <label for="tn">Testnet</label>
 | 
			
		||||
        
 | 
			
		||||
      <input type="radio" id="dn" name="server"
 | 
			
		||||
        value="wss://s.devnet.rippletest.net:51233">
 | 
			
		||||
      <label for="dn">Devnet</label>
 | 
			
		||||
      <br/><br/>
 | 
			
		||||
      <button type="button" onClick="getAccountsFromSeeds()">Get Accounts From Seeds</button>
 | 
			
		||||
      <br/>
 | 
			
		||||
      <textarea id="seeds" cols="40" rows= "2"></textarea>
 | 
			
		||||
      <br/><br/>
 | 
			
		||||
      <table>
 | 
			
		||||
        <tr valign="top">
 | 
			
		||||
          <td>
 | 
			
		||||
            <table>
 | 
			
		||||
              <tr valign="top">
 | 
			
		||||
                <td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <button type="button" onClick="getAccount('standby')">Get New Standby Account</button>
 | 
			
		||||
                  <table>
 | 
			
		||||
                    <tr valign="top">
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Standby Account
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyAccountField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        XRP Balance
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyBalanceField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Amount
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyAmountField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Destination Account
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyDestinationField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Escrow Finish (seconds)
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyEscrowFinishDateField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Escrow Cancel (seconds)
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyEscrowCancelDateField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Escrow Sequence Number
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyEscrowSequenceNumberField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr valign="top">
 | 
			
		||||
                      <td><button type="button" onClick="configureAccount('standby',document.querySelector('#standbyDefault').checked)">Configure Account</button></td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="checkbox" id="standbyDefault" checked="true"/>
 | 
			
		||||
                        <label for="standbyDefault">Allow Rippling</label>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Public Key
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyPubKeyField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Private Key
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbyPrivKeyField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    <tr>
 | 
			
		||||
                      <td align="right">
 | 
			
		||||
                        Seed
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td>
 | 
			
		||||
                        <input type="text" id="standbySeedField" size="40"></input>
 | 
			
		||||
                        <br>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                  </table>
 | 
			
		||||
                  <p align="left">
 | 
			
		||||
                    <textarea id="standbyResultField" cols="80" rows="20" ></textarea>
 | 
			
		||||
                  </p>
 | 
			
		||||
                </td>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <table>
 | 
			
		||||
                    <tr valign="top">
 | 
			
		||||
                      <td align="center" valign="top">
 | 
			
		||||
                        <button type="button" onClick="sendXRP()">Send XRP ></button>
 | 
			
		||||
                        <br/><br/>
 | 
			
		||||
                        <button type="button" onClick="getBalances()">Get Balances</button>       
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="createTimeEscrow()">Create Escrow</button>
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="getStandbyEscrows()">Get Escrows</button>
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="cancelEscrow()">Cancel Escrow</button>
 | 
			
		||||
                      </td>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                  </table>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
            </table>
 | 
			
		||||
          </td>
 | 
			
		||||
          <td>
 | 
			
		||||
            <table>
 | 
			
		||||
              <tr>
 | 
			
		||||
                <td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <table>
 | 
			
		||||
                    <tr valign="top">
 | 
			
		||||
                      <td align="center" valign="top">
 | 
			
		||||
                        <button type="button" onClick="oPsendXRP()">< Send XRP</button>
 | 
			
		||||
                        <br/><br/>
 | 
			
		||||
                        <button type="button" onClick="getBalances()">Get Balances</button>
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="finishEscrow()">Finish Escrow</button>
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="getOperationalEscrows()">Get Escrows</button>
 | 
			
		||||
                        <br/>
 | 
			
		||||
                        <button type="button" onClick="getTransaction()">Get Transaction</button>
 | 
			
		||||
                      </td>
 | 
			
		||||
                      <td valign="top" align="right">
 | 
			
		||||
                        <button type="button" onClick="getAccount('operational')">Get New Operational Account</button>
 | 
			
		||||
                        <table>
 | 
			
		||||
                          <tr valign="top">
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Operational Account
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalAccountField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              XRP Balance
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalBalanceField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Amount
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalAmountField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Destination
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalDestinationField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Escrow Sequence Number
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalEscrowSequenceField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>                            <td align="right">
 | 
			
		||||
                              Transaction to Look Up
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalTransactionField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                          <td>
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                            <input type="checkbox" id="operationalDefault" checked="true"/>
 | 
			
		||||
                              <label for="operationalDefault">Allow Rippling</label>
 | 
			
		||||
                              <button type="button" onClick="configureAccount('operational',document.querySelector('#operationalDefault').checked)">Configure Account</button>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Public Key
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalPubKeyField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Private Key
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalPrivKeyField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                          <tr>
 | 
			
		||||
                            <td align="right">
 | 
			
		||||
                              Seed
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td>
 | 
			
		||||
                              <input type="text" id="operationalSeedField" size="40"></input>
 | 
			
		||||
                              <br>
 | 
			
		||||
                            </td>
 | 
			
		||||
                          </tr>
 | 
			
		||||
                        </table>
 | 
			
		||||
                        <p align="right">
 | 
			
		||||
                          <textarea id="operationalResultField" cols="80" rows="20" ></textarea>
 | 
			
		||||
                        </p>
 | 
			
		||||
                      </td>
 | 
			
		||||
                      </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                    </td>
 | 
			
		||||
                    </tr>
 | 
			
		||||
                  </table>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
            </table>
 | 
			
		||||
          </td>
 | 
			
		||||
        </tr>
 | 
			
		||||
      </table>
 | 
			
		||||
    </form>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user