Files
xahau.js/docs/api.html
2015-08-04 14:53:46 -07:00

359 lines
11 KiB
HTML

<html>
<head>
<style>
a {
text-decoration: none;
}
.method {
margin-bottom: 10px;
}
.details {
font-family: "Courier New", monospace;
white-space: pre;
display: none;
}
</style>
<script type="text/javascript">
function toggle(element) {
var results = element.parentElement.getElementsByClassName('details');
if (results.length > 0) {
var style = results[0].style;
style.display = (style.display === 'block') ? 'none' : 'block';
}
}
</script>
</head>
<body>
<h2><a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/index.js">RippleAPI</a></h2>
<div class="method">
connect()
</div>
<div class="method">
disconnect()
</div>
<div class="method">
isConnected()
</div>
<div class="method">
getServerInfo()
</div>
<div class="method">
getFee()
</div>
<div class="method">
getLedgerVersion()
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-transaction.json">getTransaction</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/hash256.json">identifier</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/transaction-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
identifier: txhash
options: {minLedgerVersion: int, maxLedgerVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-transactions.json">getTransactions</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/transactions-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {
start: txhash,
limit: int,
minLedgerVersion: int,
maxLedgerVersion: int,
earliestFirst: bool,
excludeFailures: bool,
initiated: bool,
counterparty: address,
types: [string],
binary: bool
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-trustlines.json">getTrustlines</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/trustlines-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {counterparty: address, currency: string, limit: int, ledgerVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-balances.json">getBalances</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/trustlines-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {counterparty: address, currency: string, limit: int, ledgerVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-paths.json">getPaths</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/pathfind.json">pathfind</a>
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
pathfind: {
source: {
address: address,
currencies: [{
currency: string,
counterparty: address
}]
},
destination: adjustment
}
adjustment = {address: address, amount: amount, tag?: int}
amount = {currency: string, counterparty: address, value: floatstr}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-orders.json">getOrders</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/orders-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {limit: int, ledverVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-orderbook.json">getOrderbook</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/orderbook.json">orderbook</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/orders-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
orderbook: {
base: {
currency,
counterparty
},
counter: {
currency,
counterparty
}
}
options: {limit: int, ledverVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-settings.json">getSettings</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/settings-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {ledgerVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/get-account-info.json">getAccountInfo</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/settings-options.json">options</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
options: {ledgerVersion: int}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">preparePayment</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/payment.json">payment</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/instructions.json">instructions</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
payment: {
source: adjustment,
destination: adjustment,
paths?: string,
slippage?: strfloat,
memos?: [{
type: string,
format: string,
data: string
}],
invoiceID?: hash256,
allowPartialPayment?: bool,
noDirectRipple?: bool,
limitQuality?: bool
}
adjustment = {address: address, amount: amount, tag?: int}
amount = {currency: string, counterparty: address, value: floatstr}
instructions: {
sequence: int,
fee: floatstr,
maxFee: floatstr,
maxLedgerVersion: int,
maxLedgerVersionOffset: int
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">prepareTrustline</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/trustline.json">trustline</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/instructions.json">instructions</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
trustline: {
currency: string,
counterparty: address,
limit: strfloat,
qualityIn?: float,
qualityOut?: float,
allowRippling?: bool,
authorized?: bool,
frozen?: bool
}
instructions: {
sequence: int,
fee: floatstr,
maxFee: floatstr,
maxLedgerVersion: int,
maxLedgerVersionOffset: int
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">prepareOrder</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/order.json">order</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/instructions.json">instructions</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
order: {
direction: ("buy"|"sell"),
quantity: amount,
totalPrice: amount,
immediateOrCancel?: bool,
fillOrKill?: bool,
passive?: bool
}
amount = {currency: string, counterparty: address, value: floatstr}
instructions: {
sequence: int,
fee: floatstr,
maxFee: floatstr,
maxLedgerVersion: int,
maxLedgerVersionOffset: int
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">prepareOrderCancellation</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/sequence.json">sequence</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/instructions.json">instructions</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
sequence: int
instructions: {
sequence: int,
fee: floatstr,
maxFee: floatstr,
maxLedgerVersion: int,
maxLedgerVersionOffset: int
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">prepareSettings</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/address.json">account</a>,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/settings.json">settings</a>[,
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/instructions.json">instructions</a>]
)
<a href="#" onclick="javascript:toggle(this)">+</a>
<div class="details">
settings: {
passwordSpent: bool,
requireDestinationTag: bool,
requireAuthorization: bool,
disallowIncomingXRP: bool,
disableMasterKey: bool,
enableTransactionIDTracking: bool,
noFreeze: bool,
globalFreeze: bool,
defaultRipple: bool,
emailHash: hash128,
walletLocator: hash256,
walletSize: int,
messageKey: string,
domain: string,
transferRate: float,
signers: string,
regularKey: address
}
instructions: {
sequence: int,
fee: floatstr,
maxFee: floatstr,
maxLedgerVersion: int,
maxLedgerVersionOffset: int
}
</div>
</div>
<div class="method">
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/sign.json">sign</a>(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/tx.json">txJSON</a>,
secret)
</div>
<div class="method">
submit(
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/schemas/blob.json">txBlob</a>
)
</div>
<div class="method">
generateWallet()
</div>
<a href="https://github.com/ripple/ripple-lib/blob/develop/src/api/common/errors.js">errors</a>
</body>
</html>