mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
Add descriptions to JSON schemas and organize for documentation generation
This commit is contained in:
@@ -12,6 +12,7 @@ function loadSchemas() {
|
||||
// listed explicitly for webpack (instead of scanning schemas directory)
|
||||
const schemas = [
|
||||
require('./schemas/objects/tx-json.json'),
|
||||
require('./schemas/objects/tx-type.json'),
|
||||
require('./schemas/objects/hash128.json'),
|
||||
require('./schemas/objects/hash256.json'),
|
||||
require('./schemas/objects/sequence.json'),
|
||||
@@ -19,6 +20,7 @@ function loadSchemas() {
|
||||
require('./schemas/objects/ledgerversion.json'),
|
||||
require('./schemas/objects/max-adjustment.json'),
|
||||
require('./schemas/objects/memo.json'),
|
||||
require('./schemas/objects/memos.json'),
|
||||
require('./schemas/objects/uint32.json'),
|
||||
require('./schemas/objects/value.json'),
|
||||
require('./schemas/objects/source-adjustment.json'),
|
||||
@@ -27,7 +29,8 @@ function loadSchemas() {
|
||||
require('./schemas/objects/lax-amount.json'),
|
||||
require('./schemas/objects/lax-lax-amount.json'),
|
||||
require('./schemas/objects/min-adjustment.json'),
|
||||
require('./schemas/objects/lax-adjustment.json'),
|
||||
require('./schemas/objects/source-exact-adjustment.json'),
|
||||
require('./schemas/objects/destination-exact-adjustment.json'),
|
||||
require('./schemas/objects/tx-hash.json'),
|
||||
require('./schemas/objects/address.json'),
|
||||
require('./schemas/objects/adjustment.json'),
|
||||
@@ -55,23 +58,19 @@ function loadSchemas() {
|
||||
require('./schemas/output/get-balance-sheet'),
|
||||
require('./schemas/output/get-ledger.json'),
|
||||
require('./schemas/output/get-orderbook.json'),
|
||||
require('./schemas/output/settings-transaction.json'),
|
||||
require('./schemas/output/get-orders.json'),
|
||||
require('./schemas/output/order-change.json'),
|
||||
require('./schemas/output/order-cancellation-transaction.json'),
|
||||
require('./schemas/output/prepare.json'),
|
||||
require('./schemas/output/ledger-closed.json'),
|
||||
require('./schemas/output/order-transaction.json'),
|
||||
require('./schemas/output/get-paths.json'),
|
||||
require('./schemas/output/trustline-transaction.json'),
|
||||
require('./schemas/output/get-server-info.json'),
|
||||
require('./schemas/output/get-settings.json'),
|
||||
require('./schemas/output/orderbook-orders.json'),
|
||||
require('./schemas/output/payment-transaction.json'),
|
||||
require('./schemas/output/outcome.json'),
|
||||
require('./schemas/output/get-transaction.json'),
|
||||
require('./schemas/output/get-transactions.json'),
|
||||
require('./schemas/output/get-trustlines.json'),
|
||||
require('./schemas/input/get-balances.json'),
|
||||
require('./schemas/input/get-balance-sheet.json'),
|
||||
require('./schemas/input/get-ledger.json'),
|
||||
require('./schemas/input/get-orders.json'),
|
||||
@@ -79,6 +78,7 @@ function loadSchemas() {
|
||||
require('./schemas/input/get-paths.json'),
|
||||
require('./schemas/input/api-options.json'),
|
||||
require('./schemas/input/get-settings.json'),
|
||||
require('./schemas/input/get-account-info.json'),
|
||||
require('./schemas/input/get-transaction.json'),
|
||||
require('./schemas/input/get-transactions.json'),
|
||||
require('./schemas/input/get-trustlines.json'),
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
"title": "computeLedgerHashParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ledger": {"$ref": "getLedger"}
|
||||
"ledger": {
|
||||
"$ref": "getLedger",
|
||||
"description": "The ledger header to hash."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["ledger"]
|
||||
|
||||
24
src/common/schemas/input/get-account-info.json
Normal file
24
src/common/schemas/input/get-account-info.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getAccountInfoParameters",
|
||||
"description": "Parameters for getAccountInfo",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account to get the account info of."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options that affect what to return.",
|
||||
"properties": {
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Get the account info as of this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["address"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -4,16 +4,24 @@
|
||||
"description": "Parameters for getBalanceSheet",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The Ripple address of the account to get the balance sheet of."
|
||||
},
|
||||
"options": {
|
||||
"properties": {
|
||||
"excludeAddresses": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "address"},
|
||||
"uniqueItems": true
|
||||
"uniqueItems": true,
|
||||
"description": "Addresses to exclude from the balance totals."
|
||||
},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Get the balance sheet as of this historical ledger version."
|
||||
}
|
||||
},
|
||||
"description": "Options to determine how the balances will be calculated.",
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
||||
37
src/common/schemas/input/get-balances.json
Normal file
37
src/common/schemas/input/get-balances.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getBalancesParameters",
|
||||
"description": "Parameters for getBalances",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account to get balances for."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options to filter and determine which balances to return.",
|
||||
"properties": {
|
||||
"counterparty": {
|
||||
"$ref": "address",
|
||||
"description": "Only return balances with this counterparty."
|
||||
},
|
||||
"currency": {
|
||||
"$ref": "currency",
|
||||
"description": "Only return balances for this currency."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": "Return at most this many balances."
|
||||
},
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return balances as they were in this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["address"]
|
||||
}
|
||||
@@ -5,11 +5,24 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"description": "Options affecting what ledger and how much data to return.",
|
||||
"properties": {
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"},
|
||||
"includeAllData": {"type": "boolean"},
|
||||
"includeTransactions": {"type": "boolean"},
|
||||
"includeState": {"type": "boolean"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Get ledger data for this historical ledger version."
|
||||
},
|
||||
"includeAllData": {
|
||||
"type": "boolean",
|
||||
"description": "Include full transactions and/or state information if `includeTransactions` and/or `includeState` is set."
|
||||
},
|
||||
"includeTransactions": {
|
||||
"type": "boolean",
|
||||
"description": "Return an array of hashes for each transaction or an array of all transactions that were validated in this ledger version, depending on whether `includeAllData` is set."
|
||||
},
|
||||
"includeState": {
|
||||
"type": "boolean",
|
||||
"description": "Return an array of hashes for all state data or an array of all state data in this ledger version, depending on whether `includeAllData` is set."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -8,14 +8,22 @@
|
||||
"$ref": "address",
|
||||
"description": "Address of an account to use as point-of-view. (This affects which unfunded offers are returned.)"
|
||||
},
|
||||
"orderbook": {"$ref": "orderbook"},
|
||||
"orderbook": {
|
||||
"$ref": "orderbook",
|
||||
"description": "The order book to get."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options to determine what to return.",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"description": "Return at most this many orders from the order book."
|
||||
},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return the order book as of this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -4,14 +4,22 @@
|
||||
"description": "Parameters for getOrders",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The Ripple address of the account to get open orders for."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options that determine what orders will be returned.",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"description": "At most this many orders will be returned."
|
||||
},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return orders as of this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -4,19 +4,32 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pathfind": {
|
||||
"description": "Specification of a pathfind request.",
|
||||
"properties": {
|
||||
"source": {
|
||||
"description": "Properties of the source of funds.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"amount": {"$ref": "laxAmount"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The Ripple address of the account where funds will come from."
|
||||
},
|
||||
"amount": {
|
||||
"$ref": "laxAmount",
|
||||
"description": "The amount of funds to send."
|
||||
},
|
||||
"currencies": {
|
||||
"description": "An array of currencies (with optional counterparty) that may be used in the payment paths.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "A currency with optional counterparty.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {"$ref": "currency"},
|
||||
"counterparty": {"$ref": "address"}
|
||||
"counterparty": {
|
||||
"$ref": "address",
|
||||
"description": "The counterparty for the currency; if omitted any counterparty may be used."
|
||||
}
|
||||
},
|
||||
"required": ["currency"],
|
||||
"additionalProperties": false
|
||||
@@ -31,10 +44,17 @@
|
||||
"required": ["address"]
|
||||
},
|
||||
"destination": {
|
||||
"description": "Properties of the destination of funds.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"amount": {"$ref": "laxLaxAmount"}
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address to send to."
|
||||
},
|
||||
"amount": {
|
||||
"$ref": "laxLaxAmount",
|
||||
"description": "The amount to be received by the receiver (`value` may be ommitted if a source amount is specified)."
|
||||
}
|
||||
},
|
||||
"required": ["address", "amount"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getSettingsParameters",
|
||||
"description": "Parameters for getSettings and getAccountInfo",
|
||||
"description": "Parameters for getSettings",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account to get the settings of."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options that affect what to return.",
|
||||
"properties": {
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Get the settings as of this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -4,15 +4,22 @@
|
||||
"description": "Parameters for getTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"identifier": {"$ref": "identifier"},
|
||||
"id": {"$ref": "id"},
|
||||
"options": {
|
||||
"description": "Options to limit the ledger versions to search.",
|
||||
"properties": {
|
||||
"minLedgerVersion": {"$ref": "ledgerVersion"},
|
||||
"maxLedgerVersion": {"$ref": "ledgerVersion"}
|
||||
"minLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The lowest ledger version to search."
|
||||
},
|
||||
"maxLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The highest ledger version to search"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["identifier"]
|
||||
"required": ["id"]
|
||||
}
|
||||
|
||||
@@ -4,33 +4,55 @@
|
||||
"description": "Parameters for getTransactions",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account to get transactions for."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options to filter the resulting transactions.",
|
||||
"properties": {
|
||||
"start": {"$ref": "hash256"},
|
||||
"start": {
|
||||
"$ref": "hash256",
|
||||
"description": "If specified, this transaction will be the first transaction in the result."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"description": "If specified, return at most this many transactions."
|
||||
},
|
||||
"minLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return only transactions in this ledger verion or higher."
|
||||
},
|
||||
"maxLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return only transactions in this ledger version or lower."
|
||||
},
|
||||
"earliestFirst": {
|
||||
"type": "boolean",
|
||||
"description": "If true, sort transactions so that the earliest ones come first. By default, the newest transactions will come first."
|
||||
},
|
||||
"excludeFailures": {
|
||||
"type": "boolean",
|
||||
"description": "If true, the result will omit transactions that did not succeed."
|
||||
},
|
||||
"initiated": {
|
||||
"type": "boolean",
|
||||
"description": "If true, return only transactions initiated by the account specified by `address`. If false, return only transactions not initiated by the account specified by `address`."
|
||||
},
|
||||
"counterparty": {
|
||||
"$ref": "address",
|
||||
"description": "If provided, only return transactions with this account as a counterparty to the transaction."
|
||||
},
|
||||
"minLedgerVersion": {"$ref": "ledgerVersion"},
|
||||
"maxLedgerVersion": {"$ref": "ledgerVersion"},
|
||||
"earliestFirst": {"type": "boolean"},
|
||||
"excludeFailures": {"type": "boolean"},
|
||||
"initiated": {"type": "boolean"},
|
||||
"counterparty": {"$ref": "address"},
|
||||
"types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"enum": [
|
||||
"payment",
|
||||
"trustline",
|
||||
"order",
|
||||
"orderCancellation",
|
||||
"settings"
|
||||
]
|
||||
}
|
||||
"items": {"$ref": "transactionType"},
|
||||
"description": "Only return transactions of the specified [Transaction Types](#transaction-types)."
|
||||
},
|
||||
"binary": {"type": "boolean"}
|
||||
"binary": {
|
||||
"type": "boolean",
|
||||
"description": "If true, the transactions will be sent from the server in a condensed binary format rather than JSON."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"not": {
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getTrustlinesParameters",
|
||||
"description": "Parameters for getTrustlines and getBalances",
|
||||
"description": "Parameters for getTrustlines",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account to get trustlines for."
|
||||
},
|
||||
"options": {
|
||||
"description": "Options to filter and determine which trustlines to return.",
|
||||
"properties": {
|
||||
"counterparty": {"$ref": "address"},
|
||||
"currency": {"$ref": "currency"},
|
||||
"counterparty": {
|
||||
"$ref": "address",
|
||||
"description": "Only return trustlines with this counterparty."
|
||||
},
|
||||
"currency": {
|
||||
"$ref": "currency",
|
||||
"description": "Only return trustlines for this currency."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
"minimum": 1,
|
||||
"description": "Return at most this many trustlines."
|
||||
},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "Return trustlines as they were in this historical ledger version."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareOrderCancellationParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The account sequence number of the transaction that created the order to cancel."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareOrderParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"order": {"$ref": "order"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"order": {
|
||||
"$ref": "order",
|
||||
"description": "The specification of the order to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "preparePaymentParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"payment": {"$ref": "payment"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"payment": {
|
||||
"$ref": "payment",
|
||||
"description": "The specification of the payment to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareSettingsParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"settings": {"$ref": "settings"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "settings",
|
||||
"description": "The specification of the settings to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareSuspendedPaymentCancellationParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"suspendedPaymentCancellation": {"$ref": "suspendedPaymentCancellation"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"suspendedPaymentCancellation": {
|
||||
"$ref": "suspendedPaymentCancellation",
|
||||
"description": "The specification of the suspended payment cancellation to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareSuspendedPaymentCreationParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"suspendedPaymentCreation": {"$ref": "suspendedPaymentCreation"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"suspendedPaymentCreation": {
|
||||
"$ref": "suspendedPaymentCreation",
|
||||
"description": "The specification of the suspended payment creation to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareSuspendedPaymentExecutionParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"suspendedPaymentExecution": {"$ref": "suspendedPaymentExecution"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"suspendedPaymentExecution": {
|
||||
"$ref": "suspendedPaymentExecution",
|
||||
"description": "The specification of the suspended payment execution to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "prepareTrustlineParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"trustline": {"$ref": "trustline"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that is creating the transaction."
|
||||
},
|
||||
"trustline": {
|
||||
"$ref": "trustline",
|
||||
"description": "The specification of the trustline to prepare."
|
||||
},
|
||||
"instructions": {"$ref": "instructions"}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
"title": "submitParameters",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"txBlob": {"$ref": "blob"}
|
||||
"signedTransaction": {
|
||||
"$ref": "blob",
|
||||
"description": "A signed transaction as returned by [sign](#sign)."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["txBlob"]
|
||||
"required": ["signedTransaction"]
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
"$ref": "value"
|
||||
},
|
||||
"currency": {
|
||||
"description": "The three-character code or hex string used to denote currencies",
|
||||
"description": "The three-character code or hexadecimal string used to denote currencies",
|
||||
"$ref": "currency"
|
||||
},
|
||||
"counterparty": {
|
||||
"description": "The Ripple account address of the currency's issuer or gateway",
|
||||
"description": "The Ripple address of the account that owes or is owed the funds (omitted if `currency` is \"XRP\")",
|
||||
"$ref": "address"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
"$ref": "signedValue"
|
||||
},
|
||||
"currency": {
|
||||
"description": "The three-character code or hex string used to denote currencies",
|
||||
"description": "The three-character code or hexadecimal string used to denote currencies",
|
||||
"$ref": "currency"
|
||||
},
|
||||
"counterparty": {
|
||||
"description": "The Ripple account address of the currency's issuer or gateway",
|
||||
"description": "The Ripple address of the account that owes or is owed the funds.",
|
||||
"$ref": "address"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "blob",
|
||||
"description": "An uppercase hex string representation of a transaction",
|
||||
"description": "An uppercase hexadecimal string representation of a transaction",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[0-9A-F]*$"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "currency",
|
||||
"description": "The three-character code or hex string used to denote currencies",
|
||||
"description": "The three-character code or hexadecimal string used to denote currencies",
|
||||
"type": "string",
|
||||
"link": "currency",
|
||||
"pattern": "^([a-zA-Z0-9<>(){}[\\]|?!@#$%^&*]{3}|[A-F0-9]{40})$"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"title": "destinationAdjustment",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{"$ref": "laxAdjustment"},
|
||||
{"$ref": "destinationExactAdjustment"},
|
||||
{"$ref": "minAdjustment"}
|
||||
]
|
||||
}
|
||||
|
||||
18
src/common/schemas/objects/destination-exact-adjustment.json
Normal file
18
src/common/schemas/objects/destination-exact-adjustment.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "destinationExactAdjustment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address to receive at."
|
||||
},
|
||||
"amount": {
|
||||
"$ref": "laxAmount",
|
||||
"description": "An exact amount to deliver to the recipient. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with destination.minAmount)."
|
||||
},
|
||||
"tag": {"$ref": "tag"}
|
||||
},
|
||||
"required": ["address", "amount"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "hash128",
|
||||
"description": "The hex representation of a 128-bit hash",
|
||||
"description": "The hexadecimal representation of a 128-bit hash",
|
||||
"type": "string",
|
||||
"pattern": "^[A-F0-9]{32}$"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "hash256",
|
||||
"description": "The hex representation of a 256-bit hash",
|
||||
"description": "The hexadecimal representation of a 256-bit hash",
|
||||
"type": "string",
|
||||
"pattern": "^[A-F0-9]{64}$"
|
||||
}
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "instructions",
|
||||
"link": "transaction-instructions",
|
||||
"description": "Instructions for executing a transaction",
|
||||
"description": "Instructions for executing the transaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sequence": {
|
||||
"description": "The sequence number, relative to the initiating account, of this transaction.",
|
||||
"description": "The initiating account's sequence number for this transaction.",
|
||||
"$ref": "sequence"
|
||||
},
|
||||
"fee": {
|
||||
"description": "Fixed Fee",
|
||||
"description": "An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",
|
||||
"$ref": "value"
|
||||
},
|
||||
"maxFee": {
|
||||
"description": "Max Fee",
|
||||
"description": "The maximum fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",
|
||||
"$ref": "value"
|
||||
},
|
||||
"maxLedgerVersion": {
|
||||
"description": "Highest ledger version number that a transaction can appear in.",
|
||||
"description": "The highest ledger version that the transaction can be included in.",
|
||||
"$ref": "ledgerVersion"
|
||||
},
|
||||
"maxLedgerVersionOffset": {
|
||||
"description": "Offset from current legder version to highest ledger version that a transaction can appear in.",
|
||||
"description": "Offset from current legder version to highest ledger version that the transaction can be included in.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "laxAdjustment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"amount": {"$ref": "laxAmount"},
|
||||
"tag": {"$ref": "tag"}
|
||||
},
|
||||
"required": ["address", "amount"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "maxAdjustment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"maxAmount": {"$ref": "laxAmount"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address to send from."
|
||||
},
|
||||
"maxAmount": {
|
||||
"$ref": "laxAmount",
|
||||
"description": "The maximum amount to send. (This field is exclusive with source.amount)"
|
||||
},
|
||||
"tag": {"$ref": "tag"}
|
||||
},
|
||||
"required": ["address", "maxAmount"],
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"pattern": "^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$"
|
||||
"pattern": "^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",
|
||||
"description": "Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted."
|
||||
},
|
||||
"format": {
|
||||
"pattern": "^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$"
|
||||
"pattern": "^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",
|
||||
"description": "Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted."
|
||||
},
|
||||
"data": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "Arbitrary string, conventionally containing the content of the memo."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
||||
9
src/common/schemas/objects/memos.json
Normal file
9
src/common/schemas/objects/memos.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "memos",
|
||||
"description": "Array of memos to attach to the transaction.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "memo"
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "minAdjustment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {"$ref": "address"},
|
||||
"minAmount": {"$ref": "laxAmount"},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address to send to."
|
||||
},
|
||||
"minAmount": {
|
||||
"$ref": "laxAmount",
|
||||
"description": "The minimum amount to be delivered. (This field is exclusive with destination.amount)"
|
||||
},
|
||||
"tag": {"$ref": "tag"}
|
||||
},
|
||||
"required": ["address", "minAmount"],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "sequence",
|
||||
"link": "account-sequence-number",
|
||||
"description": "An account transaction sequence number",
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
"title": "signedValue",
|
||||
"description": "A string representation of a floating point number",
|
||||
"type": "string",
|
||||
"link": "value",
|
||||
"pattern": "^[-]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"title": "sourceAdjustment",
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{"$ref": "laxAdjustment"},
|
||||
{"$ref": "sourceExactAdjustment"},
|
||||
{"$ref": "maxAdjustment"}
|
||||
]
|
||||
}
|
||||
|
||||
18
src/common/schemas/objects/source-exact-adjustment.json
Normal file
18
src/common/schemas/objects/source-exact-adjustment.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "sourceExactAdjustment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address to send from."
|
||||
},
|
||||
"amount": {
|
||||
"$ref": "laxAmount",
|
||||
"description": "An exact amount to send. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with source.maxAmount)"
|
||||
},
|
||||
"tag": {"$ref": "tag"}
|
||||
},
|
||||
"required": ["address", "amount"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "tag",
|
||||
"description": "A string representing an unsigned 32-bit integer most commonly used to refer to a sender's hosted account at a Ripple gateway",
|
||||
"description": "An arbitrary unsigned 32-bit integer most commonly used to identify a non-Ripple account.",
|
||||
"type": "integer",
|
||||
"$ref": "uint32"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "identifier",
|
||||
"link": "transaction-identifier",
|
||||
"title": "id",
|
||||
"link": "transaction-id",
|
||||
"description": "A hash of a transaction used to identify the transaction, represented in hexadecimal.",
|
||||
"type": "string",
|
||||
"pattern": "^[A-F0-9]{64}$"
|
||||
|
||||
10
src/common/schemas/objects/tx-type.json
Normal file
10
src/common/schemas/objects/tx-type.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "transactionType",
|
||||
"link": "transaction-types",
|
||||
"description": "The type of the tranasction.",
|
||||
"type": "string",
|
||||
"enum": ["payment", "order", "orderCancellation", "trustline", "settings",
|
||||
"suspendedPaymentCreation", "suspendedPaymentCancellation",
|
||||
"suspendedPaymentExecution"]
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "value",
|
||||
"link": "value",
|
||||
"description": "A string representation of a non-negative floating point number",
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"
|
||||
|
||||
18
src/common/schemas/output/generate-address.json
Normal file
18
src/common/schemas/output/generate-address.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "generateAddress",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "A randomly generated Ripple account address."
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"format": "secret",
|
||||
"description": "The secret corresponding to the `address`."
|
||||
}
|
||||
},
|
||||
"required": ["address", "secret"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -3,12 +3,31 @@
|
||||
"title": "getAccountInfo",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"xrpBalance": {"$ref": "value"},
|
||||
"ownerCount": {"type": "integer", "minimum": 0},
|
||||
"previousInitiatedTransactionID": {"$ref": "hash256"},
|
||||
"previousAffectingTransactionID": {"$ref": "hash256"},
|
||||
"previousAffectingTransactionLedgerVersion": {"$ref": "ledgerVersion"}
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The next (smallest unused) sequence number for this account."
|
||||
},
|
||||
"xrpBalance": {
|
||||
"$ref": "value",
|
||||
"description": "The XRP balance owned by the account."
|
||||
},
|
||||
"ownerCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Number of other ledger entries (specifically, trust lines and offers) attributed to this account. This is used to calculate the total reserve required to use the account."
|
||||
},
|
||||
"previousInitiatedTransactionID": {
|
||||
"$ref": "hash256",
|
||||
"description": "Hash value representing the most recent transaction that was initiated by this account."
|
||||
},
|
||||
"previousAffectingTransactionID": {
|
||||
"$ref": "hash256",
|
||||
"description": "Hash value representing the most recent transaction that affected this account node directly. **Note:** This does not include changes to the account’s trust lines and offers."
|
||||
},
|
||||
"previousAffectingTransactionLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sequence",
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
"properties": {
|
||||
"balances": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "amount"}
|
||||
"items": {"$ref": "amount"},
|
||||
"description": "Amounts issued to the hotwallet accounts from the request. The keys are hot wallet addresses and the values are arrays of currency amounts they hold. The issuer (omitted from the currency amounts) is the account from the request."
|
||||
},
|
||||
"assets": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "amount"}
|
||||
"items": {"$ref": "amount"},
|
||||
"description": "Total amounts held that are issued by others. For the recommended gateway configuration, there should be none."
|
||||
},
|
||||
"obligations": {
|
||||
"type": "array",
|
||||
@@ -21,8 +23,10 @@
|
||||
"properties": {
|
||||
"currency": {"$ref": "currency"},
|
||||
"value": {"$ref": "value"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "An amount that is owed."
|
||||
},
|
||||
"description": "Total amounts issued to accounts that are not hot wallets, as a map of currencies to the total value issued."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -3,26 +3,86 @@
|
||||
"title": "getLedger",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accepted": {"type": "boolean"},
|
||||
"closed": {"type": "boolean"},
|
||||
"stateHash": {"$ref": "hash256"},
|
||||
"closeTime": {"type": "string", "format": "date-time"},
|
||||
"closeTimeResolution": {"type": "integer", "minimum": 1},
|
||||
"closeFlags": {"type": "integer", "minimum": 0},
|
||||
"ledgerHash": {"$ref": "hash256"},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"},
|
||||
"parentLedgerHash": {"$ref": "hash256"},
|
||||
"parentCloseTime": {"type": "string", "format": "date-time"},
|
||||
"totalDrops": {"$ref": "value"},
|
||||
"transactionHash": {"$ref": "hash256"},
|
||||
"transactions": {"type": "array", "items": {"type": "object"}},
|
||||
"rawTransactions": {"type": "string"},
|
||||
"transactionHashes": {"type": "array", "items": {"$ref": "hash256"}},
|
||||
"rawState": {"type": "string"},
|
||||
"stateHashes": {"type": "array", "items": {"$ref": "hash256"}}
|
||||
"closed": {
|
||||
"type": "boolean",
|
||||
"description": "Whether or not this ledger has been closed. This should always be true."
|
||||
},
|
||||
"stateHash": {
|
||||
"$ref": "hash256",
|
||||
"description": "Hash of all state information in this ledger."
|
||||
},
|
||||
"closeTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time at which this ledger was closed."
|
||||
},
|
||||
"closeTimeResolution": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": "Approximate number of seconds between closing one ledger version and closing the next one."
|
||||
},
|
||||
"closeFlags": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "TODO"
|
||||
},
|
||||
"ledgerHash": {
|
||||
"$ref": "hash256",
|
||||
"description": "Unique identifying hash of the entire ledger."
|
||||
},
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The ledger version of this ledger."
|
||||
},
|
||||
"parentLedgerHash": {
|
||||
"$ref": "hash256",
|
||||
"description": "Unique identifying hash of the ledger that came immediately before this one."
|
||||
},
|
||||
"parentCloseTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time at which the previous ledger was closed."
|
||||
},
|
||||
"totalDrops": {
|
||||
"$ref": "value",
|
||||
"description": "Total number of drops (1/1,000,000th of an XRP) in the network, as a quoted integer. (This decreases as transaction fees cause XRP to be destroyed.)"
|
||||
},
|
||||
"transactionHash": {
|
||||
"$ref": "hash256",
|
||||
"description": "Hash of the transaction information included in this ledger."
|
||||
},
|
||||
"transactions": {
|
||||
"description": "Array of all transactions that were validated in this ledger. Transactions are represented in the same format as the return value of [getTransaction](#gettransaction).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "getTransaction",
|
||||
"description": "A transaction in the same format as the return value of [getTransaction](#gettransaction)."
|
||||
}
|
||||
},
|
||||
"rawTransactions": {
|
||||
"type": "string",
|
||||
"description": "A JSON string containing rippled format transaction JSON for all transactions that were validated in this ledger."
|
||||
},
|
||||
"transactionHashes": {
|
||||
"description": "An array of hashes of all transactions that were validated in this ledger.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "id"
|
||||
}
|
||||
},
|
||||
"rawState": {
|
||||
"type": "string",
|
||||
"description": "A JSON string containing all state data for this ledger in rippled JSON format."
|
||||
},
|
||||
"stateHashes": {
|
||||
"description": "An array of hashes of all state data in this ledger.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "hash256"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accepted",
|
||||
"closed",
|
||||
"stateHash",
|
||||
"closeTime",
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
"title": "getOrderbook",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bids": {"$ref": "orderbookOrders"},
|
||||
"asks": {"$ref": "orderbookOrders"}
|
||||
"bids": {
|
||||
"$ref": "orderbookOrders",
|
||||
"description": "The buy orders in the order book."
|
||||
},
|
||||
"asks": {
|
||||
"$ref": "orderbookOrders",
|
||||
"description": "The sell orders in the order book."
|
||||
}
|
||||
},
|
||||
"required": ["bids", "asks"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -5,13 +5,26 @@
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"specification": {"$ref": "order"},
|
||||
"specification": {
|
||||
"$ref": "order",
|
||||
"description": "An order specification that would create an order equivalent to the current state of this order."
|
||||
},
|
||||
"properties": {
|
||||
"description": "Properties of the order not in the specification.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"maker": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"makerExchangeRate": {"$ref": "value"}
|
||||
"maker": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that submitted the order."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The account sequence number of the transaction that created this order."
|
||||
},
|
||||
"makerExchangeRate": {
|
||||
"$ref": "value",
|
||||
"description": "The exchange rate from the point of view of the account that submitted the order (also known as \"quality\")."
|
||||
}
|
||||
},
|
||||
"required": ["maker", "sequence", "makerExchangeRate"],
|
||||
"addtionalProperties": false
|
||||
|
||||
@@ -5,9 +5,18 @@
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source": {"$ref": "sourceAdjustment"},
|
||||
"destination": {"$ref": "destinationAdjustment"},
|
||||
"paths": {"type": "string"}
|
||||
"source": {
|
||||
"$ref": "sourceAdjustment",
|
||||
"description": "Properties of the source of the payment."
|
||||
},
|
||||
"destination": {
|
||||
"$ref": "destinationAdjustment",
|
||||
"description": "Properties of the destination of the payment."
|
||||
},
|
||||
"paths": {
|
||||
"type": "string",
|
||||
"description": "The paths of trustlines and orders to use in executing the payment."
|
||||
}
|
||||
},
|
||||
"required": ["source", "destination", "paths"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
},
|
||||
"hash": {
|
||||
"$ref": "hash256",
|
||||
"description": "Unique hash for the ledger, as hex."
|
||||
"description": "Unique hash for the ledger, as an uppercase hexadecimal string."
|
||||
},
|
||||
"reserveBaseXrp": {
|
||||
"type": "integer",
|
||||
|
||||
@@ -1,41 +1,85 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getSettings",
|
||||
"link": "settings-specification",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"passwordSpent": {"type": "boolean"},
|
||||
"requireDestinationTag": {"type": "boolean"},
|
||||
"requireAuthorization": {"type": "boolean"},
|
||||
"disallowIncomingXRP": {"type": "boolean"},
|
||||
"disableMasterKey": {"type": "boolean"},
|
||||
"enableTransactionIDTracking": {"type": "boolean"},
|
||||
"noFreeze": {"type": "boolean"},
|
||||
"globalFreeze": {"type": "boolean"},
|
||||
"defaultRipple": {"type": "boolean"},
|
||||
"passwordSpent": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates that the account has used its free SetRegularKey transaction."
|
||||
},
|
||||
"requireDestinationTag": {
|
||||
"type": "boolean",
|
||||
"description": "Requires incoming payments to specify a destination tag."
|
||||
},
|
||||
"requireAuthorization": {
|
||||
"type": "boolean",
|
||||
"description": "If set, this account must individually approve other users in order for those users to hold this account’s issuances."
|
||||
},
|
||||
"disallowIncomingXRP": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates that client applications should not send XRP to this account. Not enforced by rippled."
|
||||
},
|
||||
"disableMasterKey": {
|
||||
"type": "boolean",
|
||||
"description": "Disallows use of the master key to sign transactions for this account."
|
||||
},
|
||||
"enableTransactionIDTracking": {
|
||||
"type": "boolean",
|
||||
"description": "Track the ID of this account’s most recent transaction."
|
||||
},
|
||||
"noFreeze": {
|
||||
"type": "boolean",
|
||||
"description": "Permanently give up the ability to freeze individual trust lines. This flag can never be disabled after being enabled."
|
||||
},
|
||||
"globalFreeze": {
|
||||
"type": "boolean",
|
||||
"description": "Freeze all assets issued by this account."
|
||||
},
|
||||
"defaultRipple": {
|
||||
"type": "boolean",
|
||||
"description": "Enable [rippling](https://ripple.com/knowledge_center/understanding-the-noripple-flag/) on this account’s trust lines by default. (New in [rippled 0.27.3](https://github.com/ripple/rippled/releases/tag/0.27.3))"
|
||||
},
|
||||
"emailHash": {
|
||||
"description": "Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.",
|
||||
"oneOf": [
|
||||
{"type": "null"},
|
||||
{"$ref": "hash128"}
|
||||
]
|
||||
},
|
||||
"walletLocator": {
|
||||
"description": "Not used.",
|
||||
"oneOf": [
|
||||
{"type": "null"},
|
||||
{"$ref": "hash256"}
|
||||
]
|
||||
},
|
||||
"walletSize": {"type": ["integer", "null"]},
|
||||
"messageKey": {"type": "string"},
|
||||
"domain": {"type": "string"},
|
||||
"walletSize": {
|
||||
"type": ["integer", "null"],
|
||||
"description": "Not used."
|
||||
},
|
||||
"messageKey": {
|
||||
"type": "string",
|
||||
"description": "Public key for sending encrypted messages to this account. Conventionally, it should be a secp256k1 key, the same encryption that is used by the rest of Ripple."
|
||||
},
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": " The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."
|
||||
},
|
||||
"transferRate": {
|
||||
"description": " The fee to charge when users transfer this account’s issuances, represented as billionths of a unit. Use `null` to set no fee.",
|
||||
"oneOf": [
|
||||
{"type": "null"},
|
||||
{"type": "number", "minimum": 1, "maximum": 4.294967295}
|
||||
]
|
||||
},
|
||||
"signers": {"type": "string"},
|
||||
"regularKey": {"$ref": "address"}
|
||||
"signers": {
|
||||
"type": "string",
|
||||
"description": "TODO"
|
||||
},
|
||||
"regularKey": {
|
||||
"$ref": "address",
|
||||
"description": "The public key of a new keypair, to use as the regular key to this account, as a base-58-encoded string in the same format as an account address."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -1,11 +1,61 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "getTransaction",
|
||||
"link": "gettransaction",
|
||||
"properties": {
|
||||
"type": {"$ref": "transactionType"},
|
||||
"specification": {
|
||||
"description": "A specification that would produce the same outcome as this transaction. The structure of the specification depends on the value of the `type` field (see [Transaction Types](#transaction-types) for details). *Note:* This is **not** necessarily the same as the original specification."
|
||||
},
|
||||
"outcome": {
|
||||
"$ref": "outcome",
|
||||
"description": "The outcome of the transaction (what effects it had)."
|
||||
},
|
||||
"id": {
|
||||
"$ref": "id",
|
||||
"description": "A hash of the transaction that can be used to identify it."
|
||||
},
|
||||
"address": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that initiated the transaction."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The account sequence number of the transaction for the account that initiated it."
|
||||
}
|
||||
},
|
||||
"required": ["id", "address", "sequence", "type", "specification", "outcome"],
|
||||
"additionalProperties": false,
|
||||
"oneOf": [
|
||||
{"$ref": "paymentTransaction"},
|
||||
{"$ref": "orderTransaction"},
|
||||
{"$ref": "orderCancellationTransaction"},
|
||||
{"$ref": "trustlineTransaction"},
|
||||
{"$ref": "settingsTransaction"}
|
||||
{
|
||||
"properties": {
|
||||
"type": {"enum": ["payment"]},
|
||||
"specification": {"$ref": "payment"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {"enum": ["order"]},
|
||||
"specification": {"$ref": "order"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {"enum": ["orderCancellation"]},
|
||||
"specification": {"$ref": "orderCancellation"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {"enum": ["trustline"]},
|
||||
"specification": {"$ref": "trustline"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"type": {"enum": ["settings"]},
|
||||
"specification": {"$ref": "getSettings"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,21 +4,41 @@
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"specification": {"$ref": "trustline"},
|
||||
"specification": {
|
||||
"$ref": "trustline",
|
||||
"description": "A trustline specification that would produce this trustline in its current state."
|
||||
},
|
||||
"counterparty": {
|
||||
"properties": {
|
||||
"limit": {"$ref": "value"},
|
||||
"ripplingDisabled": {"type": "boolean"},
|
||||
"frozen": {"type": "boolean"},
|
||||
"authorized": {"type": "boolean"}
|
||||
"limit": {
|
||||
"$ref": "value",
|
||||
"description": "The maximum amount that the counterparty can be owed through the trustline."
|
||||
},
|
||||
"ripplingDisabled": {
|
||||
"type": "boolean",
|
||||
"description": "If true, payments cannot ripple through this trustline."
|
||||
},
|
||||
"frozen": {
|
||||
"type": "boolean",
|
||||
"description": "If true, the trustline is frozen, which means that funds can only be sent to the counterparty."
|
||||
},
|
||||
"authorized": {
|
||||
"type": "boolean",
|
||||
"description": "If true, the counterparty authorizes this party to hold issuances from the counterparty."
|
||||
}
|
||||
},
|
||||
"description": "Properties of the trustline from the perspective of the counterparty.",
|
||||
"required": ["limit"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"state": {
|
||||
"properties": {
|
||||
"balance": {"$ref": "value"}
|
||||
"balance": {
|
||||
"$ref": "value",
|
||||
"description": "The balance on the trustline, representing which party owes the other and by how much."
|
||||
}
|
||||
},
|
||||
"description": "Properties of the trustline regarding it's current state that are not part of the specification.",
|
||||
"required": ["balance"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "orderCancellationTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"enum": ["orderCancellation"]},
|
||||
"specification": {"$ref": "orderCancellation"},
|
||||
"outcome": {"$ref": "outcome"},
|
||||
"id": {"$ref": "hash256"},
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"}
|
||||
},
|
||||
"required": ["type", "id", "address", "sequence", "specification", "outcome"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -2,17 +2,38 @@
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "orderChange",
|
||||
"type": "object",
|
||||
"description": "A change to an order.",
|
||||
"properties": {
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": ["buy", "sell"]
|
||||
"enum": ["buy", "sell"],
|
||||
"description": "Equal to \"buy\" for buy orders and \"sell\" for sell orders."
|
||||
},
|
||||
"quantity": {"$ref": "amount"},
|
||||
"totalPrice": {"$ref": "amount"},
|
||||
"makerExchangeRate": {"$ref": "value"},
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"status": {"enum": ["created", "filled", "partially-filled", "cancelled"]},
|
||||
"expirationTime": {"type": "string", "format": "date-time"}
|
||||
"quantity": {
|
||||
"$ref": "amount",
|
||||
"description": "The amount to be bought or sold by the maker."
|
||||
},
|
||||
"totalPrice": {
|
||||
"$ref": "amount",
|
||||
"description": "The total amount to be paid or received by the taker."
|
||||
},
|
||||
"makerExchangeRate": {
|
||||
"$ref": "value",
|
||||
"description": "The exchange rate between the `quantity` currency and the `totalPrice` currency from the point of view of the maker."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The order sequence number, used to identify the order for cancellation"
|
||||
},
|
||||
"status": {
|
||||
"enum": ["created", "filled", "partially-filled", "cancelled"],
|
||||
"description": "The status of the order. One of \"created\", \"filled\", \"partially-filled\", \"cancelled\"."
|
||||
},
|
||||
"expirationTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The time after which the order expires, if any."
|
||||
}
|
||||
},
|
||||
"required": ["direction", "quantity", "totalPrice", "sequence", "status"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "orderTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"enum": ["order"]},
|
||||
"specification": {"$ref": "order"},
|
||||
"outcome": {"$ref": "outcome"},
|
||||
"id": {"$ref": "hash256"},
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"}
|
||||
},
|
||||
"required": ["type", "id", "address", "sequence", "specification", "outcome"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -3,24 +3,45 @@
|
||||
"title": "orderbookOrders",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "An order in the order book.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"specification": {"$ref": "order"},
|
||||
"specification": {
|
||||
"$ref": "order",
|
||||
"description": "An order specification that would create an order equivalent to the current state of this order."
|
||||
},
|
||||
"properties": {
|
||||
"description": "Properties of the order not in the specification.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"maker": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"makerExchangeRate": {"$ref": "value"}
|
||||
"maker": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account that submitted the order."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The account sequence number of the transaction that created this order."
|
||||
},
|
||||
"makerExchangeRate": {
|
||||
"$ref": "value",
|
||||
"description": "The exchange rate from the point of view of the account that submitted the order (also known as \"quality\")."
|
||||
}
|
||||
},
|
||||
"required": ["maker", "sequence", "makerExchangeRate"],
|
||||
"addtionalProperties": false
|
||||
},
|
||||
"state": {
|
||||
"description": "The state of the order.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fundedAmount": {"$ref": "amount"},
|
||||
"priceOfFundedAmount": {"$ref": "amount"}
|
||||
"fundedAmount": {
|
||||
"$ref": "amount",
|
||||
"description": "How much of the amount the maker would have to pay that the maker currently holds."
|
||||
},
|
||||
"priceOfFundedAmount": {
|
||||
"$ref": "amount",
|
||||
"description": "How much the `fundedAmount` would convert to through the exchange rate of this order."
|
||||
}
|
||||
},
|
||||
"required": ["fundedAmount", "priceOfFundedAmount"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -2,29 +2,46 @@
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "outcome",
|
||||
"type": "object",
|
||||
"link": "transaction-outcome",
|
||||
"description": "The outcome of the transaction (what effects it had).",
|
||||
"properties": {
|
||||
"result": {"type": "string"},
|
||||
"timestamp": {"type": "string", "format": "date-time"},
|
||||
"fee": {"$ref": "value"},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"description": "Result code returned by rippled. See [Transaction Results](https://ripple.com/build/transactions/#full-transaction-response-list) for a complete list."
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "The timestamp when the transaction was validated. (May be missing when requesting transactions in binary mode.)"
|
||||
},
|
||||
"fee": {
|
||||
"$ref": "value",
|
||||
"description": "The XRP fee that was charged for the transaction."
|
||||
},
|
||||
"balanceChanges": {
|
||||
"type": "object",
|
||||
"description": "Key is the ripple address; value is an array of changes",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"description": "Key is the ripple address; value is an array of signed amounts representing changes of balances for that address.",
|
||||
"items": {"$ref": "balance"}
|
||||
}
|
||||
},
|
||||
"orderbookChanges": {
|
||||
"type": "object",
|
||||
"description": "Key is the maker's ripple address; value is an array of changes",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"description": "Key is the maker's ripple address; value is an array of changes",
|
||||
"items": {"$ref": "orderChange"}
|
||||
}
|
||||
},
|
||||
"ledgerVersion": {"$ref": "ledgerVersion"},
|
||||
"indexInLedger": {"type": "integer", "minimum": 0}
|
||||
"ledgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The ledger version that the transaction was validated in."
|
||||
},
|
||||
"indexInLedger": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The ordering index of the transaction in the ledger."
|
||||
}
|
||||
},
|
||||
"required": ["result", "fee", "balanceChanges",
|
||||
"orderbookChanges", "ledgerVersion", "indexInLedger"],
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "paymentTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"enum": ["payment"]},
|
||||
"specification": {"$ref": "payment"},
|
||||
"outcome": {"$ref": "outcome"},
|
||||
"id": {"$ref": "hash256"},
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"}
|
||||
},
|
||||
"required": ["type", "id", "address", "sequence", "specification", "outcome"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -4,13 +4,26 @@
|
||||
"description": "Result of prepare function",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"txJSON": {"type": "string"},
|
||||
"txJSON": {
|
||||
"type": "string",
|
||||
"description": "The prepared transaction in rippled JSON format."
|
||||
},
|
||||
"instructions": {
|
||||
"description": "The instructions for how to execute the transaction after adding automatic defaults.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fee": {"$ref": "value"},
|
||||
"sequence": {"$ref": "sequence"},
|
||||
"maxLedgerVersion": {"$ref": "ledgerVersion"}
|
||||
"fee": {
|
||||
"$ref": "value",
|
||||
"description": "An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information."
|
||||
},
|
||||
"sequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The initiating account's sequence number for this transaction."
|
||||
},
|
||||
"maxLedgerVersion": {
|
||||
"$ref": "ledgerVersion",
|
||||
"description": "The highest ledger version that the transaction can be included in."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"required": ["fee", "sequence"]
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "settingsTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"enum": ["settings"]},
|
||||
"specification": {"$ref": "getSettings"},
|
||||
"outcome": {"$ref": "outcome"},
|
||||
"id": {"$ref": "hash256"},
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"}
|
||||
},
|
||||
"required": ["type", "id", "address", "sequence", "specification", "outcome"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -5,9 +5,13 @@
|
||||
"properties": {
|
||||
"signedTransaction": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-F0-9]+$"
|
||||
"pattern": "^[A-F0-9]+$",
|
||||
"description": "The signed transaction represented as an uppercase hexadecimal string."
|
||||
},
|
||||
"id": {"$ref": "hash256"}
|
||||
"id": {
|
||||
"$ref": "id",
|
||||
"description": "The [Transaction ID](#transaction-id) of the signed transaction."
|
||||
}
|
||||
},
|
||||
"required": ["signedTransaction", "id"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -3,12 +3,30 @@
|
||||
"title": "submit",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {"type": "boolean"},
|
||||
"engineResult": {"type": "string"},
|
||||
"engineResultCode": {"type": "integer"},
|
||||
"engineResultMessage": {"type": "string"},
|
||||
"txBlob": {"type": "string"},
|
||||
"txJson": {"type": "object"}
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates whether the transaction submission was successful; this does **not** indicate whether the transaction itself was successful."
|
||||
},
|
||||
"engineResult": {
|
||||
"type": "string",
|
||||
"description": "The result code returned by rippled. [List of tranasction responses](http://pages.lightthenight.org/gba/SanFran15/ripple)"
|
||||
},
|
||||
"engineResultCode": {
|
||||
"type": "integer",
|
||||
"description": "Numeric code indicating the status of the transaction, corresponding to `engineResult`."
|
||||
},
|
||||
"engineResultMessage": {
|
||||
"type": "string",
|
||||
"description": "Human-readable explanation of the status of the transaction."
|
||||
},
|
||||
"txBlob": {
|
||||
"type": "string",
|
||||
"description": "The signed transaction (identical to parameter)."
|
||||
},
|
||||
"txJson": {
|
||||
"type": "object",
|
||||
"description": "The signed transaction decoded to rippled JSON format."
|
||||
}
|
||||
},
|
||||
"required": ["success", "engineResult", "engineResultCode"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "trustlineTransaction",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"enum": ["trustline"]},
|
||||
"specification": {"$ref": "trustline"},
|
||||
"outcome": {"$ref": "outcome"},
|
||||
"id": {"$ref": "hash256"},
|
||||
"address": {"$ref": "address"},
|
||||
"sequence": {"$ref": "sequence"}
|
||||
},
|
||||
"required": ["type", "id", "address", "sequence", "specification", "outcome"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "orderCancellation",
|
||||
"link": "order-cancellation-specification",
|
||||
"link": "order-cancellation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"orderSequence": {"$ref": "sequence"}
|
||||
"orderSequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The [account sequence number](#account-sequence-number) of the order to cancel."
|
||||
}
|
||||
},
|
||||
"required": ["orderSequence"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,22 +1,39 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "order",
|
||||
"link": "order-specification",
|
||||
"link": "order",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"direction": {
|
||||
"type": "string",
|
||||
"enum": ["buy", "sell"]
|
||||
"enum": ["buy", "sell"],
|
||||
"description": "Equal to \"buy\" for buy orders and \"sell\" for sell orders."
|
||||
},
|
||||
"quantity": {
|
||||
"$ref": "amount",
|
||||
"description": "The amount of currency to buy or sell."
|
||||
},
|
||||
"totalPrice": {
|
||||
"$ref": "amount",
|
||||
"description": "The total price to be paid for the `quantity` to be bought or sold."
|
||||
},
|
||||
"immediateOrCancel": {
|
||||
"type": "boolean",
|
||||
"description": "Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger."
|
||||
},
|
||||
"fillOrKill": {
|
||||
"type": "boolean",
|
||||
"description": "Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged."
|
||||
},
|
||||
"quantity": {"$ref": "amount"},
|
||||
"totalPrice": {"$ref": "amount"},
|
||||
"immediateOrCancel": {"type": "boolean"},
|
||||
"fillOrKill": {"type": "boolean"},
|
||||
"passive": {
|
||||
"description": "If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"expirationTime": {"type": "string", "format": "date-time"}
|
||||
"expirationTime": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)."
|
||||
}
|
||||
},
|
||||
"required": ["direction", "quantity", "totalPrice"],
|
||||
"additionalProperties": false,
|
||||
|
||||
@@ -1,31 +1,38 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "payment",
|
||||
"link": "payment-specification",
|
||||
"link": "payment",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source": {"$ref": "sourceAdjustment"},
|
||||
"destination": {"$ref": "destinationAdjustment"},
|
||||
"paths": {"type": "string"},
|
||||
"memos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "memo"
|
||||
}
|
||||
"source": {
|
||||
"$ref": "sourceAdjustment",
|
||||
"description": "The source of the funds to be sent."
|
||||
},
|
||||
"destination": {
|
||||
"$ref": "destinationAdjustment",
|
||||
"description": "The destination of the funds to be sent."
|
||||
},
|
||||
"paths": {
|
||||
"type": "string",
|
||||
"description": "The paths of trustlines and orders to use in executing the payment."
|
||||
},
|
||||
"memos": {"$ref": "memos"},
|
||||
"invoiceID": {
|
||||
"description": "A 256-bit hash that can be used to identify a particular payment",
|
||||
"description": "A 256-bit hash that can be used to identify a particular payment.",
|
||||
"$ref": "hash256"
|
||||
},
|
||||
"allowPartialPayment": {
|
||||
"description": "A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source_account account",
|
||||
"description": "A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source account account",
|
||||
"type": "boolean"
|
||||
},
|
||||
"noDirectRipple": {
|
||||
"description": "A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source_account to the destination_account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet",
|
||||
"description": "A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet",
|
||||
"type": "boolean"
|
||||
},
|
||||
"limitQuality": {"type": "boolean"}
|
||||
"limitQuality": {
|
||||
"description": "Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": ["source", "destination"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "settings",
|
||||
"link": "settings-specification",
|
||||
"link": "settings",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "getSettings"
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "suspendedPaymentCancellation",
|
||||
"link": "suspended-payment-cancellation-specification",
|
||||
"link": "suspended-payment-cancellation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"memos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "memo"
|
||||
}
|
||||
"memos": {"$ref": "memos"},
|
||||
"owner": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the owner of the suspended payment to cancel."
|
||||
},
|
||||
"owner": {"$ref": "address"},
|
||||
"paymentSequence": {"$ref": "uint32"}
|
||||
"paymentSequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The [account sequence number](#account-sequence-number) of the [Suspended Payment Creation](#suspended-payment-creation) transaction for the suspended payment to cancel."
|
||||
}
|
||||
},
|
||||
"required": ["owner", "paymentSequence"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,20 +1,32 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "suspendedPaymentCreation",
|
||||
"link": "suspended-payment-creation-specification",
|
||||
"link": "suspended-payment-creation",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"source": {"$ref": "maxAdjustment"},
|
||||
"destination": {"$ref": "adjustment"},
|
||||
"memos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "memo"
|
||||
}
|
||||
"source": {
|
||||
"$ref": "maxAdjustment",
|
||||
"description": "Fields pertaining to the source of the payment."
|
||||
},
|
||||
"digest": {"$ref": "hash256"},
|
||||
"allowCancelAfter": {"type": "string", "format": "date-time"},
|
||||
"allowExecuteAfter": {"type": "string", "format": "date-time"}
|
||||
"destination": {
|
||||
"$ref": "destinationExactAdjustment",
|
||||
"description": "Fields pertaining to the destination of the payment."
|
||||
},
|
||||
"memos": {"$ref": "memos"},
|
||||
"digest": {
|
||||
"$ref": "hash256",
|
||||
"description": "If present, proof is required upon execution."
|
||||
},
|
||||
"allowCancelAfter": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "If present, the suspended payment may be cancelled after this time."
|
||||
},
|
||||
"allowExecuteAfter": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "If present, the suspended payment can not be executed before this time."
|
||||
}
|
||||
},
|
||||
"required": ["source", "destination"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,20 +1,32 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "suspendedPaymentExecution",
|
||||
"link": "suspended-payment-execution-specification",
|
||||
"link": "suspended-payment-execution",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"memos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "memo"
|
||||
}
|
||||
"memos": {"$ref": "memos"},
|
||||
"owner": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the owner of the suspended payment to execute."
|
||||
},
|
||||
"owner": {"$ref": "address"},
|
||||
"paymentSequence": {"$ref": "uint32"},
|
||||
"method": {"type": "integer", "minimum": 0, "maximum": 255},
|
||||
"digest": {"$ref": "hash256"},
|
||||
"proof": {"type": "string"}
|
||||
"paymentSequence": {
|
||||
"$ref": "sequence",
|
||||
"description": "The [account sequence number](#account-sequence-number) of the [Suspended Payment Creation](#suspended-payment-creation) transaction for the suspended payment to execute."
|
||||
},
|
||||
"method": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 255,
|
||||
"description": "The method for verifying the proof; only method `1` is supported."
|
||||
},
|
||||
"digest": {
|
||||
"$ref": "hash256",
|
||||
"description": "TODO"
|
||||
},
|
||||
"proof": {
|
||||
"type": "string",
|
||||
"description": "This value will be hashed to produce the digest."
|
||||
}
|
||||
},
|
||||
"required": ["owner", "paymentSequence"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -1,17 +1,41 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "trustline",
|
||||
"link": "trustline-specification",
|
||||
"link": "trustline",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {"$ref": "currency"},
|
||||
"counterparty": {"$ref": "address"},
|
||||
"limit": {"$ref": "value"},
|
||||
"qualityIn": {"$ref": "quality"},
|
||||
"qualityOut": {"$ref": "quality"},
|
||||
"ripplingDisabled": {"type": "boolean"},
|
||||
"authorized": {"type": "boolean"},
|
||||
"frozen": {"type": "boolean"}
|
||||
"currency": {
|
||||
"$ref": "currency",
|
||||
"description": "The currency this trustline applies to."
|
||||
},
|
||||
"counterparty": {
|
||||
"$ref": "address",
|
||||
"description": "The address of the account this trustline extends trust to."
|
||||
},
|
||||
"limit": {
|
||||
"$ref": "value",
|
||||
"description": "The maximum amount that the owner of the trustline can be owed through the trustline."
|
||||
},
|
||||
"qualityIn": {
|
||||
"$ref": "quality",
|
||||
"description": "Incoming balances on this trustline are valued at this ratio."
|
||||
},
|
||||
"qualityOut": {
|
||||
"$ref": "quality",
|
||||
"description": "Outgoing balances on this trustline are valued at this ratio."
|
||||
},
|
||||
"ripplingDisabled": {
|
||||
"type": "boolean",
|
||||
"description": "If true, payments cannot ripple through this trustline."
|
||||
},
|
||||
"authorized": {
|
||||
"type": "boolean",
|
||||
"description": "If true, authorize the counterparty to hold issuances from this account."
|
||||
},
|
||||
"frozen": {
|
||||
"type": "boolean",
|
||||
"description": "If true, the trustline is frozen, which means that funds can only be sent to the owner."
|
||||
}
|
||||
},
|
||||
"required": ["currency", "counterparty", "limit"],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -26,9 +26,9 @@ module.exports = {
|
||||
getPaths: _.partial(schemaValidate, 'getPathsParameters'),
|
||||
getTransactions: _.partial(validateOptions, 'getTransactionsParameters'),
|
||||
getSettings: _.partial(validateOptions, 'getSettingsParameters'),
|
||||
getAccountInfo: _.partial(validateOptions, 'getSettingsParameters'),
|
||||
getAccountInfo: _.partial(validateOptions, 'getAccountInfoParameters'),
|
||||
getTrustlines: _.partial(validateOptions, 'getTrustlinesParameters'),
|
||||
getBalances: _.partial(validateOptions, 'getTrustlinesParameters'),
|
||||
getBalances: _.partial(validateOptions, 'getBalancesParameters'),
|
||||
getBalanceSheet: _.partial(validateOptions, 'getBalanceSheetParameters'),
|
||||
getOrders: _.partial(validateOptions, 'getOrdersParameters'),
|
||||
getOrderbook: _.partial(validateOptions, 'getOrderbookParameters'),
|
||||
|
||||
@@ -5,13 +5,17 @@ const {removeUndefined, rippleTimeToISO8601} = require('./utils');
|
||||
const parseTransaction = require('./transaction');
|
||||
import type {GetLedger} from '../types.js';
|
||||
|
||||
function parseTransactionWrapper(tx) {
|
||||
function parseTransactionWrapper(ledgerVersion, tx) {
|
||||
const transaction = _.assign({}, _.omit(tx, 'metaData'),
|
||||
{meta: tx.metaData});
|
||||
return parseTransaction(transaction);
|
||||
const result = parseTransaction(transaction);
|
||||
if (!result.outcome.ledgerVersion) {
|
||||
result.outcome.ledgerVersion = ledgerVersion;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function parseTransactions(transactions) {
|
||||
function parseTransactions(transactions, ledgerVersion) {
|
||||
if (_.isEmpty(transactions)) {
|
||||
return {};
|
||||
}
|
||||
@@ -19,7 +23,8 @@ function parseTransactions(transactions) {
|
||||
return {transactionHashes: transactions};
|
||||
}
|
||||
return {
|
||||
transactions: _.map(transactions, parseTransactionWrapper),
|
||||
transactions: _.map(transactions,
|
||||
_.partial(parseTransactionWrapper, ledgerVersion)),
|
||||
rawTransactions: JSON.stringify(transactions)
|
||||
};
|
||||
}
|
||||
@@ -35,21 +40,21 @@ function parseState(state) {
|
||||
}
|
||||
|
||||
function parseLedger(ledger: Object): GetLedger {
|
||||
const ledgerVersion = parseInt(ledger.ledger_index || ledger.seqNum, 10);
|
||||
return removeUndefined(_.assign({
|
||||
accepted: ledger.accepted,
|
||||
closed: ledger.closed,
|
||||
stateHash: ledger.account_hash,
|
||||
closeTime: rippleTimeToISO8601(ledger.close_time),
|
||||
closeTimeResolution: ledger.close_time_resolution,
|
||||
closeFlags: ledger.close_flags,
|
||||
ledgerHash: ledger.hash || ledger.ledger_hash,
|
||||
ledgerVersion: parseInt(ledger.ledger_index || ledger.seqNum, 10),
|
||||
ledgerVersion: ledgerVersion,
|
||||
parentLedgerHash: ledger.parent_hash,
|
||||
parentCloseTime: rippleTimeToISO8601(ledger.parent_close_time),
|
||||
totalDrops: ledger.total_coins || ledger.totalCoins,
|
||||
transactionHash: ledger.transaction_hash
|
||||
},
|
||||
parseTransactions(ledger.transactions),
|
||||
parseTransactions(ledger.transactions, ledgerVersion),
|
||||
parseState(ledger.accountState)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ function removeEmptyCounterpartyInOrderbookChanges(orderbookChanges) {
|
||||
}
|
||||
|
||||
function parseOutcome(tx: Object): ?Object {
|
||||
if (!tx.validated) {
|
||||
const metadata = tx.meta || tx.metaData;
|
||||
if (!metadata) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const balanceChanges = transactionParser.parseBalanceChanges(tx.meta);
|
||||
const orderbookChanges = transactionParser.parseOrderbookChanges(tx.meta);
|
||||
const balanceChanges = transactionParser.parseBalanceChanges(metadata);
|
||||
const orderbookChanges = transactionParser.parseOrderbookChanges(metadata);
|
||||
removeEmptyCounterpartyInBalanceChanges(balanceChanges);
|
||||
removeEmptyCounterpartyInOrderbookChanges(orderbookChanges);
|
||||
|
||||
|
||||
@@ -75,14 +75,13 @@ function formatResponse(options: TransactionOptions, tx: TransactionType
|
||||
return parseTransaction(tx);
|
||||
}
|
||||
|
||||
function getTransaction(identifier: string,
|
||||
options: TransactionOptions = {}
|
||||
function getTransaction(id: string, options: TransactionOptions = {}
|
||||
): Promise<TransactionType> {
|
||||
validate.getTransaction({identifier, options});
|
||||
validate.getTransaction({id, options});
|
||||
|
||||
const request = {
|
||||
command: 'tx',
|
||||
transaction: identifier,
|
||||
transaction: id,
|
||||
binary: false
|
||||
};
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ function formatResponse(response) {
|
||||
return convertKeysFromSnakeCaseToCamelCase(response);
|
||||
}
|
||||
|
||||
function submit(txBlob: string): Promise<Submit> {
|
||||
validate.submit({txBlob});
|
||||
function submit(signedTransaction: string): Promise<Submit> {
|
||||
validate.submit({signedTransaction});
|
||||
const request = {
|
||||
command: 'submit',
|
||||
tx_blob: txBlob
|
||||
tx_blob: signedTransaction
|
||||
};
|
||||
return this.connection.request(request).then(formatResponse);
|
||||
}
|
||||
|
||||
@@ -15,17 +15,6 @@ const utils = RippleAPI._PRIVATE.ledgerUtils;
|
||||
const ledgerClosed = require('./fixtures/rippled/ledger-close-newer');
|
||||
const schemaValidator = RippleAPI._PRIVATE.schemaValidator;
|
||||
|
||||
const orderbook = {
|
||||
base: {
|
||||
currency: 'USD',
|
||||
counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B'
|
||||
},
|
||||
counter: {
|
||||
currency: 'BTC',
|
||||
counterparty: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B'
|
||||
}
|
||||
};
|
||||
|
||||
function closeLedger(connection) {
|
||||
connection._ws.emit('message', JSON.stringify(ledgerClosed));
|
||||
}
|
||||
@@ -574,12 +563,13 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
|
||||
it('getOrderbook', function() {
|
||||
return this.api.getOrderbook(address, orderbook).then(
|
||||
return this.api.getOrderbook(address, requests.getOrderbook).then(
|
||||
_.partial(checkResult, responses.getOrderbook, 'getOrderbook'));
|
||||
});
|
||||
|
||||
it('getOrderbook - sorted so that best deals come first', function() {
|
||||
return this.api.getOrderbook(address, orderbook).then(data => {
|
||||
return this.api.getOrderbook(address, requests.getOrderbook)
|
||||
.then(data => {
|
||||
const bidRates = data.bids.map(bid => bid.properties.makerExchangeRate);
|
||||
const askRates = data.asks.map(ask => ask.properties.makerExchangeRate);
|
||||
// makerExchangeRate = quality = takerPays.value/takerGets.value
|
||||
@@ -591,12 +581,13 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
|
||||
it('getOrderbook - currency & counterparty are correct', function() {
|
||||
return this.api.getOrderbook(address, orderbook).then(data => {
|
||||
return this.api.getOrderbook(address, requests.getOrderbook)
|
||||
.then(data => {
|
||||
const orders = _.flatten([data.bids, data.asks]);
|
||||
_.forEach(orders, order => {
|
||||
const quantity = order.specification.quantity;
|
||||
const totalPrice = order.specification.totalPrice;
|
||||
const {base, counter} = orderbook;
|
||||
const {base, counter} = requests.getOrderbook;
|
||||
assert.strictEqual(quantity.currency, base.currency);
|
||||
assert.strictEqual(quantity.counterparty, base.counterparty);
|
||||
assert.strictEqual(totalPrice.currency, counter.currency);
|
||||
@@ -606,7 +597,8 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
|
||||
it('getOrderbook - direction is correct for bids and asks', function() {
|
||||
return this.api.getOrderbook(address, orderbook).then(data => {
|
||||
return this.api.getOrderbook(address, requests.getOrderbook)
|
||||
.then(data => {
|
||||
assert(_.every(data.bids, bid => bid.specification.direction === 'buy'));
|
||||
assert(_.every(data.asks, ask => ask.specification.direction === 'sell'));
|
||||
});
|
||||
|
||||
10
test/fixtures/requests/get-orderbook.json
vendored
Normal file
10
test/fixtures/requests/get-orderbook.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"base": {
|
||||
"currency": "USD",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
},
|
||||
"counter": {
|
||||
"currency": "BTC",
|
||||
"counterparty": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
|
||||
}
|
||||
}
|
||||
1
test/fixtures/requests/index.js
vendored
1
test/fixtures/requests/index.js
vendored
@@ -31,6 +31,7 @@ module.exports = {
|
||||
NoPathsWithCurrencies: require('./getpaths/no-paths-with-currencies'),
|
||||
sendAll: require('./getpaths/send-all')
|
||||
},
|
||||
getOrderbook: require('./get-orderbook'),
|
||||
computeLedgerHash: {
|
||||
header: require('./compute-ledger-hash'),
|
||||
transactions: require('./compute-ledger-hash-transactions')
|
||||
|
||||
22
test/fixtures/responses/get-ledger-full.json
vendored
22
test/fixtures/responses/get-ledger-full.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"accepted": true,
|
||||
"closed": true,
|
||||
"stateHash": "2C23D15B6B549123FB351E4B5CDE81C564318EB845449CD43C3EA7953C4DB452",
|
||||
"closeTime": "2013-01-02T06:43:20.000Z",
|
||||
@@ -32,6 +31,27 @@
|
||||
"value": "10000"
|
||||
}
|
||||
}
|
||||
},
|
||||
"outcome": {
|
||||
"result": "tesSUCCESS",
|
||||
"fee": "0.00001",
|
||||
"balanceChanges": {
|
||||
"rLQBHVhFnaC5gLEkgr6HgBJJ3bgeZHg9cj": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "10000"
|
||||
}
|
||||
],
|
||||
"r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-10000.00001"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"indexInLedger": 0,
|
||||
"ledgerVersion": 38129
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"accepted": true,
|
||||
"closed": true,
|
||||
"stateHash": "2FC964BBFE22DF77A132FE12B5D2B58A09226EBCA73EF2CFF5BE29E56B3315F5",
|
||||
"closeTime": "2014-01-01T00:03:30.000Z",
|
||||
@@ -17,7 +16,22 @@
|
||||
"address": "rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38",
|
||||
"sequence": 6478,
|
||||
"id": "FEEFC959B0351156F58A2275F5A6B37B07AA85CCCE2C4AF8A1342A0196A3CD4D",
|
||||
"specification": {}
|
||||
"specification": {},
|
||||
"outcome": {
|
||||
"result": "tesSUCCESS",
|
||||
"fee": "0.00001",
|
||||
"ledgerVersion": 4181996,
|
||||
"balanceChanges": {
|
||||
"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38": [
|
||||
{
|
||||
"currency": "XRP",
|
||||
"value": "-0.00001"
|
||||
}
|
||||
]
|
||||
},
|
||||
"orderbookChanges": {},
|
||||
"indexInLedger": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"rawTransactions": "[{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Fee\":\"10\",\"Flags\":0,\"Sequence\":6478,\"SigningPubKey\":\"02CAB6F3A798712136DB5F105A98B0DE27C99AEDB68500181706B087CF1B6D0F2D\",\"TransactionType\":\"AccountSet\",\"TxnSignature\":\"304402202144BD33CC30793455B0F90954576EEE80F13C4C73538D2AEE012564C48E522E02207A8A4AD2CF2B4DB549FB2F05D38E065B5DD1EAA386310698E5247F1BB515E99F\",\"hash\":\"FEEFC959B0351156F58A2275F5A6B37B07AA85CCCE2C4AF8A1342A0196A3CD4D\",\"metaData\":{\"AffectedNodes\":[{\"ModifiedNode\":{\"FinalFields\":{\"Account\":\"rEGy9CxMTFGXFgUHUMreTy2FbqArabGy38\",\"Balance\":\"403657865\",\"Flags\":0,\"OwnerCount\":2,\"Sequence\":6479},\"LedgerEntryType\":\"AccountRoot\",\"LedgerIndex\":\"F64FAA4CAFDB9931DC06890FE30B4E29C32F7AD574FC7C3362B81265682BFAEA\",\"PreviousFields\":{\"Balance\":\"403657875\",\"Sequence\":6478},\"PreviousTxnID\":\"B257B95A637C6C396507AD0AE122161A849C701F065B67009BB939690DB74BC9\",\"PreviousTxnLgrSeq\":4181972}}],\"TransactionIndex\":0,\"TransactionResult\":\"tesSUCCESS\"}}]"
|
||||
|
||||
1
test/fixtures/responses/get-ledger.json
vendored
1
test/fixtures/responses/get-ledger.json
vendored
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"accepted": true,
|
||||
"closed": true,
|
||||
"stateHash": "EC028EC32896D537ECCA18D18BEBE6AE99709FEFF9EF72DBD3A7819E918D8B96",
|
||||
"closeTime": "2014-09-24T21:21:50.000Z",
|
||||
|
||||
Reference in New Issue
Block a user