ClientAPI

Implementation.ClientAPI History

Hide minor edits - Show changes to output

February 25, 2011, at 02:12 AM by Romualdo Grillo -
Added lines 12-16:
* [[#Requirements|Requirements]]
* [[#Design|Design]]
* [[#Issues|Issues between standalone and distributed engines]]
* [[#Future_directions|Future directions]]

Added line 19:
[[#Requirements]]
Changed line 60 from:
to:
[[#Design]]
Changed line 210 from:
to:
[[#Issues]]
Changed line 221 from:
to:
[[#Future_directions]]
February 22, 2011, at 01:16 PM by Romualdo Grillo -
Changed line 223 from:
!!! Alternative Proposals
to:
!!! An implementation proposal
February 15, 2011, at 10:26 AM by Romualdo Grillo -
Changed line 8 from:
[[Implementation/Components|See how this components fits in the system]]
to:
[[Implementation/Components|See how this component fits in the system]]
February 10, 2011, at 05:04 PM by Romualdo Grillo -
Deleted line 11:
* [[Main/Definitions]]
February 10, 2011, at 10:44 AM by Romualdo Grillo -
Changed line 7 from:
%thumb% Attach:RedInterface.png.png"Ripple Merchant API"
to:
%thumb% Attach:RedInterface.png"Ripple Merchant API"
February 10, 2011, at 10:44 AM by Romualdo Grillo -
Changed line 7 from:
%thumb% Attach:RedLink2.png"Ripple Merchant API"
to:
%thumb% Attach:RedInterface.png.png"Ripple Merchant API"
February 08, 2011, at 03:18 PM by Romualdo Grillo -
Changed line 7 from:
%thumb% Attach:Main/RedLink.png"Ripple Merchant API"
to:
%thumb% Attach:RedLink2.png"Ripple Merchant API"
February 08, 2011, at 12:27 PM by Romualdo Grillo -
Added lines 1-2:
(:table border=1 width=100% align=center cellspacing=0 :)
(:cellnr align=center :)
Deleted line 3:
Added lines 5-10:
(:cellnr align=center :)

%thumb% Attach:Main/RedLink.png"Ripple Merchant API"
[[Implementation/Components|See how this components fits in the system]]
(:tableend:)

Added lines 215-219:


!!! Alternative Proposals

https://ripplexchange.com/viewtopic.php?f=9&t=12#p71
March 12, 2008, at 04:50 AM by 190.33.59.5 -
Changed lines 5-7 from:
[[Main/Definitions]]
[[Main/Client API Request Examples]]
to:
* [[Main/Definitions]]
* [[Main/Client API Request Examples]]
March 12, 2008, at 03:05 AM by 190.33.59.5 -
Changed lines 6-7 from:
to:
[[Main/Client API Request Examples]]
March 08, 2008, at 03:10 PM by 190.33.59.5 -
Added lines 5-6:
[[Main/Definitions]]
Changed lines 9-39 from:
!!!! Definitions

'''A Client'''
* Software that manages accounts that involve lines of credit between parties.
** See [[Main/RippleClientExamples]]

'''A Node'''
* has credit relationships (lines of credit) with other nodes
* can be a payment endpoint, either payer or recipient
* can be a payment intermediary, receiving value from one node and passing it along to another as part of a payment chain
** when routing, can charge a transaction fee
** can be friendly, and not charge a fee
* nodes store [[Credit Relationship Exchange Rates]]. These rates determine transaction fees, if any, when acting as a payment intermediary
* a ripple user might well register only a single node, but a user might also have [[UsersAndNodes|reasons to register multiple nodes]]

'''A credit relationship'''
* exists between two nodes, say node A and node B
* describes a line of credit that node A has with node B, and the reciprocal line of credit node B has with node A
* has a specific unit of value, such as USD, Euro, or oz. of gold
* has an account for each node, each containing the following data:
** the balance of payments between the two nodes (kept as two balances in case there is disagreement between the nodes)
** an upper limit, which is the maximum balance on this account
** a lower limit, which is the minimum balance on this account
* Two nodes connected by a credit relationship are called ''neighbours''.
*  [[Implementation/CreditRelationshipBalanceExample | Example of account balance and limits in action.]]
* Two nodes may have more than one credit relationships connecting them, for instance to allow for credit relationships in more than one currency

'''A User'''
* a user may interact with the ripple system via a single registered node, or may choose to register multiple nodes, just as an email user might choose to have more than one email address
**

to:
March 08, 2008, at 04:53 AM by 190.33.59.5 -
Changed lines 20-21 from:
* depending on their needs, a user might use only a single node, but they might also have [[reasons to use multiple nodes]]
to:
* a ripple user might well register only a single node, but a user might also have [[UsersAndNodes|reasons to register multiple nodes]]
March 08, 2008, at 04:49 AM by 190.33.59.5 -
Changed lines 9-10 from:
'''A client'''
* is software that manages accounts that involve lines of credit between parties.
to:
'''A Client'''
* Software that manages accounts that involve lines of credit between parties.
Changed line 13 from:
'''A node'''
to:
'''A Node'''
Changed lines 20-21 from:
to:
* depending on their needs, a user might use only a single node, but they might also have [[reasons to use multiple nodes]]
Changed lines 34-37 from:
'''Users'''
* a user may interact with the ripple system via a single registered node, or may choose to use multiple nodes, just as a user might choose to have more than one email address
** a single registered node works... to do...
to:
'''A User'''
* a user may interact with the ripple system via a single registered node, or may choose to register multiple nodes, just as an email user might choose to have more than one email address
**
March 08, 2008, at 04:05 AM by 190.33.59.5 -
Changed lines 19-20 from:
** nodes store [[Credit Relationship Exchange Rates]]. These rates determine transaction fees, if any, when acting as a payment intermediary
to:
* nodes store [[Credit Relationship Exchange Rates]]. These rates determine transaction fees, if any, when acting as a payment intermediary
March 08, 2008, at 03:47 AM by 190.33.59.5 -
Changed lines 17-18 from:
* a user may interact with the ripple system via a single registered node, or may choose to use multiple nodes -- just as a user might choose to have more than one email address
to:
** when routing, can charge a transaction fee
** can be friendly, and not charge a fee
** nodes store [[Credit Relationship Exchange Rates]]. These rates determine transaction fees, if any, when acting as a payment intermediary

Added lines 33-36:
'''Users'''
* a user may interact with the ripple system via a single registered node, or may choose to use multiple nodes, just as a user might choose to have more than one email address
** a single registered node works... to do...

March 08, 2008, at 02:09 AM by 190.33.59.5 -
Changed line 37 from:
** With Node A's request
to:
** Node A's request
March 08, 2008, at 01:37 AM by 190.33.59.5 -
Changed lines 17-18 from:
to:
* a user may interact with the ripple system via a single registered node, or may choose to use multiple nodes -- just as a user might choose to have more than one email address
March 08, 2008, at 01:31 AM by 190.33.59.5 -
Changed lines 36-37 from:
** Node A's request establishes the unit of value for the relationship, and node A's account data; node B's confirmation establishes node B's account data.
** Node A's request establishes incoming and outgoing exchange rates between all of node A's other relationships; node B's confirmation does the same for node B.  If a node is unwilling to exchange between certain subsets of its relationships when available credit permits, it should properly be represented as two nodes for the routing system to function optimally.
to:
** With Node A's request
*** Establishes
the unit of value for the relationship, and node A's account data; node B's confirmation establishes node B's account data.
*** If Node A has already established credit relationships with other nodes, incoming and outgoing exchange rates are established between all of node A's other relationships and the new relationship with node B
** Node B's confirmation
*** If Node B has already established credit relationships with other nodes, exchange rates are established between them and the new credit relationship with Node A
*
If a node is unwilling to exchange between certain subsets of its relationships when available credit permits, it should properly be represented as two nodes for the routing system to function optimally.
March 08, 2008, at 01:15 AM by 190.33.59.5 -
Changed lines 28-29 from:
* Two nodes can have one or more credit relationships between each other, for instance to allow for credit relationships in more than one currency
to:
* Two nodes may have more than one credit relationships connecting them, for instance to allow for credit relationships in more than one currency
March 08, 2008, at 01:13 AM by 190.33.59.5 -
Changed lines 28-29 from:

to:
* Two nodes can have one or more credit relationships between each other, for instance to allow for credit relationships in more than one currency
March 08, 2008, at 01:02 AM by 190.33.59.5 -
Changed line 19 from:
* exists between two nodes (node A and node B below)
to:
* exists between two nodes, say node A and node B
Changed lines 19-20 from:
* exists between two nodes (node a and node b below)
* describes a line of credit that node a has with node b, and the reciprocal line of credit node b has with node a
to:
* exists between two nodes (node A and node B below)
* describes a line of credit that node A has with node B, and the reciprocal line of credit node B has with node A
Changed lines 22-26 from:
* contains the following:
** the balance of payments (e.g. credit spends) between
the two nodes. The balance of payment is a single number. From one node's point of view the number is positive, from the other node's point of view it is negative. (Maybe not so simple -- what about reconciliation... see below... )
** credit limits and issuance limits for each node, where
*** the credit limit is the maximum amount of credit one node will issue to the other
*** the issuance limit is the maximum amount of indebtedness one node will permit itself to get into with the other
to:
* has an account for each node, each containing the following data:
**
the balance of payments between the two nodes (kept as two balances in case there is disagreement between the nodes)
** an upper limit, which is the maximum balance on this account
** a lower limit, which is the minimum balance on this account
March 07, 2008, at 09:38 PM by 190.33.59.5 -
Changed line 23 from:
** the balance of payments (e.g. credit spends) between the two nodes. The balance of payment is a single number. From one node's point of view the number is positive, from the other node's point of view it is negative.
to:
** the balance of payments (e.g. credit spends) between the two nodes. The balance of payment is a single number. From one node's point of view the number is positive, from the other node's point of view it is negative. (Maybe not so simple -- what about reconciliation... see below... )
March 07, 2008, at 09:14 PM by 190.33.59.5 -
Changed line 14 from:
* has lines of credit with other nodes
to:
* has credit relationships (lines of credit) with other nodes
Changed lines 19-26 from:
* is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists.
* consists of
the following data:
** a unit of value (eg, USD, Euro, oz. of gold)
** an account for each node
, containing:
*** balance of payments on this credit relationship (the sum of
the balances of both lines of credit)
*** the credit limit for the other node (the maximum amount of obligations this node will accept from the other; range: zero-infinite)
***
the issuance limit for this node (the maximum amount of obligations this node will issue to the other; range: zero-infinite)
***  [[Implementation/CreditRelationshipBalanceExample | Example
of account balance and limits in action.]]
to:
* exists between two nodes (node a and node b below)
* describes a
line of credit that node a has with node b, and the reciprocal line of credit node b has with node a
* has a specific unit of value
, such as USD, Euro, or oz. of gold
* contains the following:
**
the balance of payments (e.g. credit spends) between the two nodes. The balance of payment is a single number. From one node's point of view the number is positive, from the other node's point of view it is negative.
** credit limits and issuance limits for each node, where
*** the credit limit is the maximum amount
of credit one node will issue to the other
*** the issuance limit is the maximum amount of indebtedness one node will permit itself to get into with the other
Changed lines 28-30 from:
to:
*  [[Implementation/CreditRelationshipBalanceExample | Example of account balance and limits in action.]]

Changed lines 17-18 from:
* is controlled by a single client instance
to:
Changed line 23 from:
*** balance of payments on this credit relationship (the sum of the balances of both lines of credit -- [[Implementation/CreditRelationshipBalanceExample | example]])
to:
*** balance of payments on this credit relationship (the sum of the balances of both lines of credit)
Added line 26:
***  [[Implementation/CreditRelationshipBalanceExample | Example of account balance and limits in action.]]
Changed lines 32-48 from:
!!!! A client can register and manage user nodes and credit relationships between them.
* Each node belongs to only one client.
* Each user has one or more ''exchanges'', which are nodes connecting the user's accounts together, indicating that that user will exchange between those accounts for Ripple payments
.
* There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's client.
* Each version of an account belongs to a single exchange.
* A client can only manage its own users and account versions, not those of other clients.
* When user
A's client registers a version of his account with user B, user B's client must confirm the existence of the account by registering its version of the account.
* For the standalone backend, accounts must be between users on a single Ripple server.
For the distributed version, accounts may be between users on different Ripple servers as well.  (This defines ''standalone'' and ''distributed''.)
* A client can delete accounts, exchanges, and users
.

!!!! A client must register data for accounts and exchanges
* Data registered include:
** upper and lower limits for each account
** exchange rates between each pair of accounts in an exchange, in each direction
* Data has an expiry time after which it is invalid and must
be updated before the accounts in question can be used again.  Before the expiry time, Ripple may commit transactions on the accounts in question as long as the balance remains within their respective credit limits.
* Data may be pushed by client pre-emptively, before or after
expiry time, or pulled by server as needed, if that mode is supported by the client.
* A ''reconciliation'' must occur before new account data can be registered (see below)
.
to:
!!!! A client instance can register and manage nodes and credit relationships between them.
* To register a node, a client requests that the server create the node.
* To register a credit relationship between node A and node B, node A's client requests that the server register the relationship
.  The server then asks node B's client, which may be different from node A's client, to confirm the relationship.
** Node A's request establishes the unit of value for the relationship, and node A's account data; node B's confirmation establishes node B's account data.
** Node A's request establishes incoming and outgoing exchange rates between all of node
A's other relationships; node B's confirmation does the same for node B.  If a node is unwilling to exchange between certain subsets of its relationships when available credit permits, it should properly be represented as two nodes for the routing system to function optimally.
*
For the standalone backend, relationships must be between nodes on a single Ripple server.  For the distributed version, relationships may also be between nodes on different Ripple servers.  (This defines ''standalone'' and ''distributed''.)
* A client instance can delete its nodes
* A client instance can delete a relationship that its node is party to, with the permission of the other party.

!!!! A client can update data for nodes and credit relationships
* Data that can
be updated:
** credit and issuance limits for each relationship account
** exchange rates between a node's relationships
* When set (including initially) this data has an expiry time after which it is invalid and must be updated before the accounts in question can be used again.  Before the
expiry time, Ripple may commit transactions on the accounts in question as long as the balance remains within their respective credit limits.
** Changing a credit limit may leave the account balance outside that limit.  This is permissible, and simply means that any transactions on that relationship must move the balance closer zero, never further away, until the balance is once again within the account limits.
* Updates may be pushed by client pre-emptively, before or after expiry time, or pulled by server as needed, if that mode is supported by the client.
* A ''reconciliation'' must occur before new account data can be registered
.
Changed line 50 from:
** The reconciliation may be ''hard'', meaning the cumulative balances for the accounts on the Ripple server is reset to zero or ''soft'', meaning it is not.  In other words, new credit limits set after a hard reconciliation are relative to the current balance, and credit limits after a soft reconciliation are still relative to the balance at the last hard reconciliation.
to:
** The reconciliation may be ''hard'', meaning the cumulative balances for the accounts in question are reset to zero or ''soft'', meaning they are not.  In other words, new credit limits set after a hard reconciliation are relative to the current balance, and credit limits after a soft reconciliation are still relative to the balance at the last hard reconciliation.
Changed lines 54-57 from:
* Payment is between two Ripple users, called the payer and recipient.
* The payment pathset
may originate and terminate at any subset of the payer's and recipient's exchanges, respectively.
* Both payer's and recipient's clients must approve a payment before it occurs.
* Either payer or recipient may initiate the payment process.
to:
* A client can tag nodes with one or more ''addresses''. 
** Multiple nodes
may have the same address, but they must be on the same client.
* Payment is between two addresses, called the paying and receiving addresses.  Each address may consist of multiple nodes.
* Both paying and receiving clients must approve a payment before it occurs.
* Either paying or receiving client
may initiate the payment process.
Changed lines 9-10 from:
'''Client'''
* A Ripple client is a software instance that manages accounts that involve lines of credit between parties.
to:
'''A client'''
* is software that manages accounts that involve lines of credit between parties.
Changed lines 19-22 from:
'''Credit relationship'''
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists.
* Two nodes connected by a credit relationship are called ''neighbours''.
* A credit relationship
consists of the following data:
to:
'''A credit relationship'''
* is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists.
* consists of the following data:
Changed lines 27-28 from:
to:
* Two nodes connected by a credit relationship are called ''neighbours''.
Changed line 25 from:
*** balance of payments on this credit relationship (the sum of the balances of both lines of credit)
to:
*** balance of payments on this credit relationship (the sum of the balances of both lines of credit -- [[Implementation/CreditRelationshipBalanceExample | example]])
Changed lines 26-28 from:
*** the credit limit for the other node (ie, the maximum amount of obligations this node will accept from the other; range: zero-infinite)
*** the issuance limit for this node (ie, the maximum amount of obligations this node will issue to the other; range: zero-infinite)
to:
*** the credit limit for the other node (the maximum amount of obligations this node will accept from the other; range: zero-infinite)
*** the issuance limit for this node (the maximum amount of obligations this node will issue to the other; range: zero-infinite)
Changed line 20 from:
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists{-, with the balance kept as a sum of the balances of the two lines of credit to simplify their use in payments.-}
to:
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists.
Changed line 25 from:
*** balance of payments on this credit relationship
to:
*** balance of payments on this credit relationship (the sum of the balances of both lines of credit)
Changed lines 13-18 from:
'''Node'''
* A node is a representation of a party to a line of credit within a single client that can perform the following functions:
** acting as a payment endpoint, either payer or recipient
** acting as a payment intermediary, receiving value from one node and passing it along to another as part of a payment chain

A node
to:
'''A node'''
Changed lines 15-18 from:
* can be a payment endpoint, either payer or recipient.
* or can be a payment payment intermediary, receiving value from one node and passing it along to another as part of a payment chain

to:
* can be a payment endpoint, either payer or recipient
* can be a payment intermediary, receiving value from one node and passing it along to another as part of a payment chain
* is controlled by a single client instance
Changed line 227 from:
Let the client specify a callback URL or formula that takes available data at each hop and makes more complex decisions about where to route and what exchange rates to use.
to:
Let the client specify a callback URL or formula that takes available data at each hop and makes more complex decisions about where to route and what exchange rates to use.
March 07, 2008, at 07:13 PM by 190.33.59.5 -
Changed line 20 from:
* can be a payment endpoint, either payer or payee.
to:
* can be a payment endpoint, either payer or recipient.
Changed line 25 from:
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists, with the balance kept as a sum of the balances of the two lines of credit to simplify their use in payments.
to:
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists{-, with the balance kept as a sum of the balances of the two lines of credit to simplify their use in payments.-}
March 07, 2008, at 07:09 PM by 190.33.59.5 -
Added lines 18-23:
A node
* has lines of credit with other nodes
* can be a payment endpoint, either payer or payee.
* or can be a payment payment intermediary, receiving value from one node and passing it along to another as part of a payment chain

Changed lines 7-28 from:
!!!!! A single Ripple server can support multiple clients.
to:
!!!! Definitions

'''Client'''
* A Ripple client is a software instance that manages accounts that involve lines of credit between parties.
** See [[Main/RippleClientExamples]]

'''Node'''
* A node is a representation of a party to a line of credit within a single client that can perform the following functions:
** acting as a payment endpoint, either payer or recipient
** acting as a payment intermediary, receiving value from one node and passing it along to another as part of a payment chain

'''Credit relationship'''
* A credit relationship is a line of credit between two nodes, and the reciprocal line of credit in the same units, if it exists, with the balance kept as a sum of the balances of the two lines of credit to simplify their use in payments.
* Two nodes connected by a credit relationship are called ''neighbours''.
* A credit relationship consists of the following data:
** a unit of value (eg, USD, Euro, oz. of gold)
** an account for each node, containing:
*** balance of payments on this credit relationship
*** the credit limit for the other node (ie, the maximum amount of obligations this node will accept from the other; range: zero-infinite)
*** the issuance limit for this node (ie, the maximum amount of obligations this node will issue to the other; range: zero-infinite)

!!!! A single Ripple server can support multiple clients.
Changed lines 31-33 from:
!!!!! A client can register and manage users and accounts between them.
* An account is between two users.
* Each user is a user of
only one client.
to:
!!!! A client can register and manage user nodes and credit relationships between them.
* Each node belongs to only one client.
Changed line 41 from:
!!!!! A client must register data for accounts and exchanges
to:
!!!! A client must register data for accounts and exchanges
Changed line 52 from:
!!!!! Transaction interaction
to:
!!!! Transaction interaction
Changed lines 8-9 from:
to:
* The client-server communications might be initiated by either side, as in XMPP, or client-initiated only, as in HTTP.
Changed lines 28-30 from:
** The reconciliation may be ''hard'', meaning the cumulative balances for the accounts on the Ripple server is reset to zero or ''soft'', meaning it is not.
** The reconciliation may be followed by a data update.
to:
** The reconciliation may be ''hard'', meaning the cumulative balances for the accounts on the Ripple server is reset to zero or ''soft'', meaning it is not.  In other words, new credit limits set after a hard reconciliation are relative to the current balance, and credit limits after a soft reconciliation are still relative to the balance at the last hard reconciliation.
** A hard reconciliation must be followed by a data update.  A soft reconciliation may optionally
be followed by a data update.
Changed lines 1-4 from:
!! Ripple Server-Account System API

The interface between accounting systems and the Ripple backend, either standalone or distributed.
to:
!! Ripple Client Server Protocol/API

The interface between inter-user accounting clients and the Ripple backend, either standalone or distributed.
Changed lines 7-9 from:
!!!!! A single Ripple server can support multiple accounting systems.

!!!!! An accounting system can register and manage users and accounts between them.
to:
!!!!! A single Ripple server can support multiple clients.

!!!!! A client can register and manage users and accounts between them.
Changed line 11 from:
* Each user is a user of only one accounting system.
to:
* Each user is a user of only one client.
Changed line 13 from:
* There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's accounting system.
to:
* There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's client.
Changed lines 15-16 from:
* An accounting system can only manage its own users and account versions, not those of other accounting systems.
* When user A's accounting system registers a version of his account with user B, user B's accounting system must confirm the existence of the account by registering its version of the account.
to:
* A client can only manage its own users and account versions, not those of other clients.
* When user A's client registers a version of his account with user B, user B's client must confirm the existence of the account by registering its version of the account.
Changed lines 18-20 from:
* An accounting system can delete accounts, exchanges, and users.

!!!!! An accounting system must register data for accounts and exchanges
to:
* A client can delete accounts, exchanges, and users.

!!!!! A client must register data for accounts and exchanges
Changed line 25 from:
* Data may be pushed by client pre-emptively, before or after expiry time, or pulled by server as needed.
to:
* Data may be pushed by client pre-emptively, before or after expiry time, or pulled by server as needed, if that mode is supported by the client.
Changed line 27 from:
* An accounting system may request a reconciliation with the Ripple server for some or all of its accounts.
to:
* A client may request a reconciliation with the Ripple server for some or all of its accounts.
Changed line 34 from:
* Both payer's and recipient's accounting systems must approve a payment before it occurs.
to:
* Both payer's and recipient's clients must approve a payment before it occurs.
Changed lines 42-45 from:
RESTful principles.  GET is idempotent, POST for state-changing methods.

HTTP GET/POST parameters for input, JSON
for results.  (Possibly allow for XML as well, if client prefers?)
to:
Two interfaces may be useful:

* HTTP/REST client request, server respond model, where server must wait
for client to check in to send certain information
* XMPP real-time messaging, where server can push or request information from the client as it needs

Changed lines 49-59 from:
to:
JSON for parameters and results.  (Maybe XML as well if a client wants?)

!!!! HTTP

RESTful principles, GET/POST.  GET is idempotent, POST for state-changing methods.

!!!! XMPP

Use @@<iq/>@@ @@get/set@@ stanzas.

Changed lines 7-29 from:
* Support multiple accounting systems on a single Ripple server.

* An accounting system can register and manage users and accounts between them.
** An account is between two users.
** Each user is a user of only one accounting system.
** Each user has one or more ''exchanges'', which are nodes connecting the user's accounts together, indicating that that user will exchange between those accounts for Ripple payments.
** There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's accounting system.
** Each version of an account belongs to a single exchange.
** An accounting system can only manage its own users and account versions, not those of other accounting systems.
** When user A's accounting system registers a version of his account with user B, user B's accounting system must confirm the existence of the account by registering its version of the account.
** For the standalone backend, accounts must be between users on a single Ripple server.  For the distributed version, accounts may be between users on different Ripple servers as well.  (This defines ''standalone'' and ''distributed''.)

* Transaction interaction
** Payment is between two Ripple users
, called the payer and recipient.
** The payment may originate and terminate at any subset of the payer's and recipient's exchanges, respectively.
** Both payer's and recipient's accounting systems must approve a payment before it occurs.
** Payment consists of value transfer along one or more paths of accounts between payer
and recipient.
** Payment is denominated in payment units, which may or may not be
the same as the units on any account used in the transaction.
** Accounting systems determine
the exchange rate between account units for their users.
** The Ripple server communicates with accounting systems to determine request exchanges, freeze available credit, and commit balance changes.
** The Ripple server must support accounting systems that will interact with their users at transaction time to get transaction authorizations along payment paths.  (Of course, this will take a lot longer.)

to:
!!!!! A single Ripple server can support multiple accounting systems.

!!!!! An accounting system can register and manage users and accounts between them.
* An account is between two users.
* Each user is a user of only one accounting system.
* Each user has one or more ''exchanges'', which are nodes connecting the user's accounts together, indicating that that user will exchange between those accounts for Ripple payments.
* There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's accounting system.
* Each version of an account belongs to a single exchange.
* An accounting system can only manage its own users and account versions, not those of other accounting systems.
* When user A's accounting system registers a version of his account with user B, user B's accounting system must confirm the existence of the account by registering its version of the account.
* For the standalone backend, accounts must be between users on a single Ripple server.  For the distributed version, accounts may be between users on different Ripple servers as well.  (This defines ''standalone'' and ''distributed''.)
* An accounting system can delete accounts, exchanges, and users.

!!!!! An accounting system must register data for accounts and exchanges
* Data registered include:
** upper and lower limits for each account
** exchange rates between each pair of accounts in an exchange, in each direction
* Data has an expiry time after which it is invalid
and must be updated before the accounts in question can be used again.  Before the expiry time, Ripple may commit transactions on the accounts in question as long as the balance remains within their respective credit limits.
* Data may be pushed by client pre-emptively, before or after expiry time, or pulled by server as needed.
* A ''reconciliation'' must occur before new account data can be registered (see below).
* An accounting system may request a reconciliation with the Ripple server for some or all of its accounts
.
** The reconciliation may be ''hard'', meaning the cumulative balances for the accounts on the Ripple server is reset to zero or ''soft'', meaning it is not.
** The reconciliation may be followed by a data update.

!!!!! Transaction interaction
* Payment is between two Ripple users, called the payer and recipient.
* The payment pathset may originate and terminate at any subset of the payer's and recipient's exchanges, respectively.
* Both payer's and recipient's accounting systems must approve a payment before it occurs.
* Either payer or recipient may initiate the payment process.
* Payment consists of value transfer along a ''pathset'' of one or more paths of accounts between payer and recipient.
* Payment is denominated in ''payment units'', which may or may not be the same as the units on any account used in the transaction.


Changed lines 11-12 from:
** Each user is a user of one accounting system.
to:
** Each user is a user of only one accounting system.
** Each user has one or more ''exchanges'', which are nodes connecting the user's accounts together, indicating that that user will exchange between those accounts for Ripple payments
.
Changed lines 14-17 from:
** An accounting system can only manage its own users and account versions, not those of other accounting systems
** When an accounting system registers a version
of an account with a user of another accounting system, that user's system must confirm the existence of the account by registering its version of the account.
** For the standalone backend, accounts must be between users on a single Ripple server.  For the distributed version, accounts may be between users on different Ripple servers as
well.
to:
** Each version of an account belongs to a single exchange.
** An accounting system can only manage its own users and account versions, not those
of other accounting systems.
** When
user A's accounting system registers a version of his account with user B, user B's accounting system must confirm the existence of the account by registering its version of the account.
** For the standalone backend, accounts must be between users on a single Ripple server.  For the distributed version, accounts may be between users on different Ripple servers as
well.  (This defines ''standalone'' and ''distributed''.)
Added line 21:
** The payment may originate and terminate at any subset of the payer's and recipient's exchanges, respectively.
Added lines 147-148:
!!!! Payments
Deleted lines 150-151:
!!!! Payments
Changed lines 120-121 from:
to:
** ''necessary?''
Changed lines 159-169 from:
** query, and potentially freeze credit along pathset (may freeze only if full amount is available, partial amount, or not at all)
** params:
@@payment_id <accounts_in_each_path> direction=(bwd|fwd) amount units authorize=(full|part|no) deadline@@
** returns:
*** authorization ID
*** available credit on each account, up to requested amount
*** authorized credit on each account

* commit pathsets
** params: @@authorization_id_list
@@

to:
** freeze credit for accounts in pathset
** params: @@payment_id <list of accounts> <list_of_amount_for_each_account>@@

* commit pathset
** params:
@@payment_id@@

Changed lines 1-2 from:
!! Ripple Engine API
to:
!! Ripple Server-Account System API
Changed lines 24-30 from:


---------------------
!! Old Stuff

An attempt to create a common HTTP API to both the standalone ripplesite engine and the ripplep2p distributed protocol engine
.
to:
** The Ripple server must support accounting systems that will interact with their users at transaction time to get transaction authorizations along payment paths.  (Of course, this will take a lot longer.)

Changed lines 31-32 from:
HTTP GET/POST parameters for input, JSON for results.
to:
HTTP GET/POST parameters for input, JSON for results.  (Possibly allow for XML as well, if client prefers?)
Added line 35:
Added line 42:
Changed lines 59-71 from:
!!! Payment API

Client interface for the Ripple transaction server.

* register account type
** params: @@query_accounts_callback authorize_pathsets_callback commit_callback@@

* get account types

* get account type detail

* modify account type
to:
!!! Rippler Server API

Client interface for an account system to the Ripple transaction server.

Account system data will be defined manually by the Ripple server admin.

!!!! Users

* register user
** params: @@name@@

* get users

* delete user

!!!! Accounts

Changed lines 77-78 from:
to:
** params: @@name owner partner@@
Changed lines 83-85 from:
* register exchange (ie, user who will exchange between two accounts)
** params: @@from_account to_
account priority@@
to:
* delete account

!!!! Exchanges

* register
exchange
** params: @@user@@

* get exchanges

* add
account to exchange

* remove account from exchange

Added lines 98-99:
!!!! Payments
Changed lines 129-131 from:
* paying_accounts = <list of accounts>
* receiving_accounts = <list of accounts>
* units = <units ID>
to:
* paying_exchanges = <list of accounts>
* receiving_exchanges = <list of accounts>
* units = <string>
Changed lines 135-140 from:


!!! Payment-Account API

Accounts system must provide the following to
the transaction module:
to:
* deadline = <datetime>


!!! Account System API

Account systems must provide
the following to the transaction module:

!!!! Accounts

* confirm account

* payment request

!!!! Payments

Deleted lines 152-156:
** returns: available credit on each account, up to requested amount (in both path units and account units)

* authorize pathset
** query accounts system for available credit along paths
** params: @@payment_id <accounts_in_each_path> direction=(bwd|fwd) amount units authorize=(full|part|no) deadline@@
Added lines 154-160:
*** available credit on each account, up to requested amount (in both path units and account units)
*** priority score for each account (optional)

* authorize pathset
** query, and potentially freeze credit along pathset (may freeze only if full amount is available, partial amount, or not at all)
** params: @@payment_id <accounts_in_each_path> direction=(bwd|fwd) amount units authorize=(full|part|no) deadline@@
** returns:
Changed lines 164-166 from:
*** whether or not to suspend path search for this payment (necessary for interactive payment)

* commit pathset
to:

* commit pathsets
Changed lines 169-270 from:
!!! Account API

Client interface to the Ripple shared account server,
a generic way to create and keep accounts between Ripple users.

!!!! User management

* new user - @@POST /users/@@
** params: (user fields)

* get users - @@GET /users/@@

* modify user - @@POST /users/<user_id>/@@
** params: (user fields)

!!!!! User fields

* id = <user_id>
* is_intermediary = (true|false) - whether user handles thru payments
* interact = (true|false) - whether to request one-time credit allowances on payments

!!!! Value units & exchange rates

This could be farmed off to its own API, where account server queries exchange rate server
for current rates.  (For efficiency, these could have an expiry time, so the account server
could cache exchange rates until they expired.)

* get units - @@GET /units/@@

* new unit - @@POST /units/@@
** required param: @@id=<unit_id>@@

* get exchange rates - @@GET /rates/@@
** optional params: @@value=<unit_id> in=<unit_id> date=<datetime>@@

* set exchange rates - @@POST /rates/@@
** required params: @@<unit_id1>_in_<unit_id2>=<rate>@@

!!!! Account management

* new invitation - @@POST /invitations/@@
** params: (invitation fields)

* get invitations - @@GET /invitations/@@
** optional params: @@user=<username> type=(sent|received)@@

* accept/reject invitation - @@POST /invitations/<invitation_id>/(accept|reject)/@@
** optional params: @@note@@

* withdraw invitation - @@POST /invitations/<invitation_id>/withdraw/@@

* new account (set directly by system) - @@POST /accounts/@@
** params: (account fields)

* get accounts - @@GET /accounts/@@
** optional params: @@user=<username>@@

* change account field (eg, limit) - @@POST /accounts/<account_id>/@@
** required params: @@user=<username> [<fieldname>=<value>]+@@
** optional param: @@note@@
** @@user@@ is the user who is requesting the change

* get change requests to an account - @@GET /accounts/<account_id>/requests/@@
** required params: @@user=<username> type=(made|received)@@

* get account entries - @@GET /accounts/<account_id>/entries/@@
** optional params: @@start end dateorder=(asc|desc)}}} - non-sortable@@
** entries are sorted by date, @@dateorder='desc'@@ is the default.

* make account entry - @@POST /accounts/<account_id>/entries/@@
** params: @@user amount@@
** optional params: @@date@@ - defaults to now
** deducts @@amount@@ from @@user@@'s balance

* get account history - @@GET /accounts/<account_id>/history/@@
** optional params: @@start end dateorder=(asc|desc)@@ - non-sortable
** history items are sorted by date, @@dateorder='desc'@@ is the default.

!!!!! Account fields

* id = <UUID>
* initiator = <user ID>
* partner = <user ID>
* units = <units ID>
* owner_limit = <decimal>
* friend_limit = <decimal>
* balance = <decimal>
* interest_rate = <decimal>
* created = <datetime>
* last_update = <datetime>
* status = (active|frozen|closed)
* passthru = (true|false) - whether to use this account for thru payments
* interact_initiator = (true|false)
* interact_partner = (true|false)


!!! Issues between engines

'''Single accounting system'''

The standalone server acts within a single accounting system, and so can just take a payment path found and commit the payment using those accounts, if it wishes, without needing to defer to the transaction engine to authorize and commit the transaction.

to:
!!! Issues between standalone and distributed engines
Changed lines 173-180 from:
To support both local and remote user identification for ripplep2p, local users are identified by username only, and remote users by their Ripple ID (user@ripplehost:port).  Apps developed on the standalone server will have to be adapted to allow for accounts with remote users.  See [[Main/AccountCreation]].  As well, they will have to be adapted to allow payments to remote users.

'''Payment modes'''

ripplesite must support two path search modes: ''standard'', which respects established credit limits, and ''interactive'', which asks users to accept IOUs beyond existing limits (which are zero if no account exists).  To support interactive mode, ripplesite should create a ''latent'' account with zero limits when users connect, so that these connections can be searched.  Interactive mode must be able to pause and return proposed out-of-limit IOUs, which the client must present to the users.  The search must be able to continue once one or more proposed IOUs are approved or rejected.

This interactive mode can be supported by ripplep2p, by the ability to propose out-of-limit IOUs on the local host, and by setting a long search deadline on queries to other hosts, which they may interpret as being long enough to interact with users as necessary.  We can't control how other hosts behave, however
.
to:
To support both local and remote user identification for the distributed server, local users are identified by username only, and remote users by their Ripple ID (user@ripplehost:port).  Apps developed on the standalone server should support Ripple usernames in this format for forward compatibility to the distributed server.
Changed lines 177-187 from:
ripplep2p will store signed messages as part of each account history and payment.  These are not available on ripplesite.  Could just have optional JSON return fields for these where necessary, that are left empty by ripplesite.  These are only useful for auditing, and aren't central to regular operations.

'''Account keys'''

ripplep2p will need to store cryptographic keys for owner and partner on each account to create and validate digital signatures.

'''Callbacks'''

ripplep2p will receive new account invitations, payment requests, and account modification requests from other hosts that will require client action.  Instead of forcing the client to poll for these, allow client to set callback URLs where the server can push these requests as they are received.  Might be good for payments too, because they can take a long time
.

to:
The distributed server will store signed messages as part of each account history and payment.  These are not available on the standalone server.  Could just have optional JSON return fields for these where necessary, that are left empty by the standalone server.  These are only useful for auditing, and aren't central to regular operations.

Changed line 12 from:
** There may be one or two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's accounting system.
to:
** There are two versions of an account, each owned by one of the users that is party to the account, and each kept on that party's accounting system.
Changed line 14 from:
** When an accounting system registers a version of an account with a user of another accounting system, that user's system must confirm the existence of the account, and be given the opportunity to register its version of the account.
to:
** When an accounting system registers a version of an account with a user of another accounting system, that user's system must confirm the existence of the account by registering its version of the account.
Changed lines 16-17 from:
** It should be possible to define account units in terms of well-known units.
to:
Changed lines 22-26 from:
** The Ripple server determines the exchange rate between payment units and account units at path endpoints, and between account units for successive path accounts.  The Ripple server should provide some basic way to convert between well-known units (and therefore between account units based on well-known units), as well as allowing accounting systems to determine their own exchange rates if they wish.
** The Ripple server must be able to determine exchange rates for accounts on behalf of a user whose accounting system does not keep a version of the account or accounts in question.  Thus the accounting system must give the Ripple server some method of determining exchange rates when it confirms an accounts, even when it does not register a version of that account.
** The Ripple server communicates with accounting systems to determine available credit on accounts, freeze that
credit, and commit balance changes.

to:
** Accounting systems determine the exchange rate between account units for their users.
** The Ripple server communicates with accounting systems to determine request exchanges, freeze available
credit, and commit balance changes.

Changed lines 16-17 from:
to:
** It should be possible to define account units in terms of well-known units.
Changed line 23 from:
** The Ripple server determines the exchange rate between payment units and account units at path endpoints, and between account units for successive path accounts. 
to:
** The Ripple server determines the exchange rate between payment units and account units at path endpoints, and between account units for successive path accounts.  The Ripple server should provide some basic way to convert between well-known units (and therefore between account units based on well-known units), as well as allowing accounting systems to determine their own exchange rates if they wish.
Changed lines 18-22 from:
** Payment is initiated by one endpoint's accounting system and approved by the other endpoint's accounting system, if different.
** The Ripple server determines exchange rates between each user's accounts at transaction time, including for which the user's accounting system doesn't keep a version
.
** The Ripple server queries accounting systems to determine available credit on accounts, freeze that credit, and commit balance changes.

to:
** Payment is between two Ripple users, called the payer and recipient.
** Both payer's and recipient
's accounting systems must approve a payment before it occurs.
** Payment consists of value transfer along one or more paths of accounts between payer and recipient
.
** Payment is denominated in payment units, which may or may not be the same as the units on any account used in the transaction.
** The Ripple server determines the exchange rate between payment units and account units at path endpoints, and between account units for successive path accounts. 
** The Ripple server must be able to determine exchange rates for accounts on behalf of a user whose accounting system does not keep a version of the account or accounts in question.  Thus the accounting system must give the Ripple server some method of determining exchange rates when it confirms an accounts, even when it does not register a version of that account.
** The Ripple server communicates with
accounting systems to determine available credit on accounts, freeze that credit, and commit balance changes.

Changed lines 10-14 from:
** An accounting system can register an account with a user on another accounting system (which for the distributed backend may be on a different Ripple server), requiring the other accounting system to confirm the existence of the account, and optionally register its local version of that account with the Ripple system.
** An accounting system can only manage its own users and accounts, not those of other
accounting systems
** Each user has only one accounting system.  Parties who wish to have accounts on multiple accounting systems and exchange between them can create accounts between their multiple users on the system, their accounting systems permitting
.

to:
** An account is between two users.
** Each user is
a user of one accounting system.
** There may be one or two versions of an account, each owned by one of the users that is party to
the account, and each kept on that party's accounting system.
** An accounting system can only manage its own users and account versions, not those of other accounting systems
** When an
accounting system registers a version of an account with a user of another accounting system, that user's system must confirm the existence of the account, and be given the opportunity to register its version of the account.
** For the standalone backend, accounts must be between users on a single Ripple server.  For the distributed version, accounts may be between users on different Ripple servers as well.
Changed line 19 from:
** The Ripple server determines exchange rates between each user's accounts at transaction time.
to:
** The Ripple server determines exchange rates between each user's accounts at transaction time, including for which the user's accounting system doesn't keep a version.
Changed lines 19-20 from:
**
to:

Added lines 3-23:
The interface between accounting systems and the Ripple backend, either standalone or distributed.

!!! Requirements

* Support multiple accounting systems on a single Ripple server.

* An accounting system can register and manage users and accounts between them.
** An accounting system can register an account with a user on another accounting system (which for the distributed backend may be on a different Ripple server), requiring the other accounting system to confirm the existence of the account, and optionally register its local version of that account with the Ripple system.
** An accounting system can only manage its own users and accounts, not those of other accounting systems
** Each user has only one accounting system.  Parties who wish to have accounts on multiple accounting systems and exchange between them can create accounts between their multiple users on the system, their accounting systems permitting.


* Transaction interaction
** Payment is initiated by one endpoint's accounting system and approved by the other endpoint's accounting system, if different.
** The Ripple server determines exchange rates between each user's accounts at transaction time.
** The Ripple server queries accounting systems to determine available credit on accounts, freeze that credit, and commit balance changes.
**

---------------------
!! Old Stuff

Added lines 1-247:
!! Ripple Engine API

An attempt to create a common HTTP API to both the standalone ripplesite engine and the ripplep2p distributed protocol engine.

!!! Design

RESTful principles.  GET is idempotent, POST for state-changing methods.

HTTP GET/POST parameters for input, JSON for results.

GET methods should generally have standard ways of filtering, sorting and limiting results.

!!! Access

We'll need to allow for and control remote access, probably in a similar way to a database server, by IP address and by user/password authentication (regular HTTP authentication).  We might add PKI stuff (HTTPS) later.

To implement, we'll need to store client identites (IP address, user, password) in the database, as well as have a configuration option (command line/config file) for which policies to implement.

!!! Method Specification

For each method, need to specify:

* HTTP method (GET|POST) and URL
* permitted/required GET/POST parameters
* results

For GET methods, given parameters are for filtering results.  Every GET method also has the following parameters:

* @@sort=<filter_param>@@
* @@order=(asc|desc)@@
* @@limit@@
* @@offset@@


!!! Payment API

Client interface for the Ripple transaction server.

* register account type
** params: @@query_accounts_callback authorize_pathsets_callback commit_callback@@

* get account types

* get account type detail

* modify account type

* register account

* get accounts

* get account detail

* register exchange (ie, user who will exchange between two accounts)
** params: @@from_account to_account priority@@

* delete exchange

* request payment - @@POST /paymentrequests/@@
** params: (payment request details)

* get payment requests - @@GET /paymentrequests/@@
** optional params: @@user=<username> type=(sent|received)@@

* accept/reject/withdraw payment request - @@POST /paymentrequests/<paymentrequest_id>/(accept|reject|withdraw)@@

* init payment - @@POST /payments/@@
** params: (payment details)
** returns <payment_id>

* find pathset - @@POST /payments/<payment_id>/search/@@
** params: @@deadline=<datetime> max_cost_amount=<decimal> max_cost_units=<unit_id>@@
** returns ID of authorized pathset found, and its cost.  Payer can then commit or search for more.
 
* commit pathset - @@POST /payments/<payment_id>/commit/@@
** params: @@pathset_id=<pathset_id>@@

* cancel payment - @@POST /payments/<payment_id>/cancel/@@

* get payments - @@GET /payments/@@
** optional params: @@account=<account_id> status=(succeeded|failed)@@

* get payment detail/documentation (including signed messages, for protocol) - @@GET /payments/<payment_id>/@@

!!!!! Payment fields

* id = <UUID>
* paying_accounts = <list of accounts>
* receiving_accounts = <list of accounts>
* units = <units ID>
* amount = <decimal>
* for_payer = (true|false) - whether amount is for payer or from recipient
* date = <datetime>


!!! Payment-Account API

Accounts system must provide the following to the transaction module:

* query accounts
** query set of potential accounts for next hop in path being searched
** params: @@payment_id <accounts_to_query> from_account path_amount units account_amount deadline@@
** returns: available credit on each account, up to requested amount (in both path units and account units)

* authorize pathset
** query accounts system for available credit along paths
** params: @@payment_id <accounts_in_each_path> direction=(bwd|fwd) amount units authorize=(full|part|no) deadline@@
** returns:
*** authorization ID
*** available credit on each account, up to requested amount
*** authorized credit on each account
*** whether or not to suspend path search for this payment (necessary for interactive payment)

* commit pathset
** params: @@authorization_id_list@@


!!! Account API

Client interface to the Ripple shared account server,
a generic way to create and keep accounts between Ripple users.

!!!! User management

* new user - @@POST /users/@@
** params: (user fields)

* get users - @@GET /users/@@

* modify user - @@POST /users/<user_id>/@@
** params: (user fields)

!!!!! User fields

* id = <user_id>
* is_intermediary = (true|false) - whether user handles thru payments
* interact = (true|false) - whether to request one-time credit allowances on payments

!!!! Value units & exchange rates

This could be farmed off to its own API, where account server queries exchange rate server
for current rates.  (For efficiency, these could have an expiry time, so the account server
could cache exchange rates until they expired.)

* get units - @@GET /units/@@

* new unit - @@POST /units/@@
** required param: @@id=<unit_id>@@

* get exchange rates - @@GET /rates/@@
** optional params: @@value=<unit_id> in=<unit_id> date=<datetime>@@

* set exchange rates - @@POST /rates/@@
** required params: @@<unit_id1>_in_<unit_id2>=<rate>@@

!!!! Account management

* new invitation - @@POST /invitations/@@
** params: (invitation fields)

* get invitations - @@GET /invitations/@@
** optional params: @@user=<username> type=(sent|received)@@

* accept/reject invitation - @@POST /invitations/<invitation_id>/(accept|reject)/@@
** optional params: @@note@@

* withdraw invitation - @@POST /invitations/<invitation_id>/withdraw/@@

* new account (set directly by system) - @@POST /accounts/@@
** params: (account fields)

* get accounts - @@GET /accounts/@@
** optional params: @@user=<username>@@

* change account field (eg, limit) - @@POST /accounts/<account_id>/@@
** required params: @@user=<username> [<fieldname>=<value>]+@@
** optional param: @@note@@
** @@user@@ is the user who is requesting the change

* get change requests to an account - @@GET /accounts/<account_id>/requests/@@
** required params: @@user=<username> type=(made|received)@@

* get account entries - @@GET /accounts/<account_id>/entries/@@
** optional params: @@start end dateorder=(asc|desc)}}} - non-sortable@@
** entries are sorted by date, @@dateorder='desc'@@ is the default.

* make account entry - @@POST /accounts/<account_id>/entries/@@
** params: @@user amount@@
** optional params: @@date@@ - defaults to now
** deducts @@amount@@ from @@user@@'s balance

* get account history - @@GET /accounts/<account_id>/history/@@
** optional params: @@start end dateorder=(asc|desc)@@ - non-sortable
** history items are sorted by date, @@dateorder='desc'@@ is the default.

!!!!! Account fields

* id = <UUID>
* initiator = <user ID>
* partner = <user ID>
* units = <units ID>
* owner_limit = <decimal>
* friend_limit = <decimal>
* balance = <decimal>
* interest_rate = <decimal>
* created = <datetime>
* last_update = <datetime>
* status = (active|frozen|closed)
* passthru = (true|false) - whether to use this account for thru payments
* interact_initiator = (true|false)
* interact_partner = (true|false)


!!! Issues between engines

'''Single accounting system'''

The standalone server acts within a single accounting system, and so can just take a payment path found and commit the payment using those accounts, if it wishes, without needing to defer to the transaction engine to authorize and commit the transaction.

'''Remote users'''

To support both local and remote user identification for ripplep2p, local users are identified by username only, and remote users by their Ripple ID (user@ripplehost:port).  Apps developed on the standalone server will have to be adapted to allow for accounts with remote users.  See [[Main/AccountCreation]].  As well, they will have to be adapted to allow payments to remote users.

'''Payment modes'''

ripplesite must support two path search modes: ''standard'', which respects established credit limits, and ''interactive'', which asks users to accept IOUs beyond existing limits (which are zero if no account exists).  To support interactive mode, ripplesite should create a ''latent'' account with zero limits when users connect, so that these connections can be searched.  Interactive mode must be able to pause and return proposed out-of-limit IOUs, which the client must present to the users.  The search must be able to continue once one or more proposed IOUs are approved or rejected.

This interactive mode can be supported by ripplep2p, by the ability to propose out-of-limit IOUs on the local host, and by setting a long search deadline on queries to other hosts, which they may interpret as being long enough to interact with users as necessary.  We can't control how other hosts behave, however.

'''Signed messages'''

ripplep2p will store signed messages as part of each account history and payment.  These are not available on ripplesite.  Could just have optional JSON return fields for these where necessary, that are left empty by ripplesite.  These are only useful for auditing, and aren't central to regular operations.

'''Account keys'''

ripplep2p will need to store cryptographic keys for owner and partner on each account to create and validate digital signatures.

'''Callbacks'''

ripplep2p will receive new account invitations, payment requests, and account modification requests from other hosts that will require client action.  Instead of forcing the client to poll for these, allow client to set callback URLs where the server can push these requests as they are received.  Might be good for payments too, because they can take a long time.


!!! Future directions

'''Customizable routing policy'''

Let the client specify a callback URL or formula that takes available data at each hop and makes more complex decisions about where to route and what exchange rates to use.