Protocol /
PaymentProtocolWorkPage
Protocol.PaymentProtocolWorkPage History
Hide minor edits - Show changes to output
February 02, 2007, at 10:41 PM
by - new message format incl. may-ignore w/ json addressing
Changed lines 21-25 from:
Signed Message
to:
'''Message Format'''
How about:
How about:
Changed lines 26-34 from:
"signed-message": {
"content": { (Ripple message) },
"signatures": [
{
"hash": ("sha1" | "md5"),
"sign": ("rsa" | "dsa" | "elgamal"),
"signature": (base64)
}
]
"hash": ("sha1" | "md5"),
"signature": (base64)
}
]
to:
"type": (message type),
(other message fields here),
("may-ignore": [
(sequence of json addresses to fields that the receiver may ignore if it does not understand them),
])
(other message fields here),
("may-ignore": [
(sequence of json addresses to fields that the receiver may ignore if it does not understand them),
])
Changed lines 33-35 from:
Public Key Data Structures
to:
Of course, this, along with specifying erroneous fields in error messages, requires:
'''JSON Addressing'''
JSON addressing works like unix filesystem paths. Take the following piece of JSON:
'''JSON Addressing'''
JSON addressing works like unix filesystem paths. Take the following piece of JSON:
Changed lines 40-48 from:
"dsa-key": {
("p": (base64),)
("q": (base64),)
"g: (base64),
"y: (base64),
"j: (base64),
("seed": (base64),)
("p-gen-counter": (base64),)
}
("seed": (base64),)
("p-gen-counter": (base64),)
}
to:
"a": 1,
"b": 2,
"c": {"d": 4,"e": 5,"f":"d"},
"g": [6, 7, 8],
"b": 2,
"c": {"d": 4,"e": 5,"f":"d"},
"g": [6, 7, 8],
Added lines 46-63:
Maps (dictionaries) are easy to address -- use the key name. Array sequences (lists) are trickier. The array element at position n (first position is 0) is addressed by "[n]". A wildcard "[*]" indicates any array position.
So
* @@/"a"@@ is @@1@@
* @@/"c"/"e"@@ is 5
* @@/"g"/[1]@@ is 7
* @@/"g"/[*]@@ may be any of 6, 7, or 8
Paths may be relative to the path of an element as well, meaning that the value @@"d"@@ at @@/"c"/"f"@@ may be interpreted as pointing to @@/"c"/"d"@@ with is 5. (Only if you're expecting a JSON path at @@/"c"/"f"@@ though, otherwise it's just the string @@"d"@@ of course.)
Note that the quotations around path elements need to be escaped in JSON strings.
!!!Ripple Payment Protocol Messages
Signed Message
So
* @@/"a"@@ is @@1@@
* @@/"c"/"e"@@ is 5
* @@/"g"/[1]@@ is 7
* @@/"g"/[*]@@ may be any of 6, 7, or 8
Paths may be relative to the path of an element as well, meaning that the value @@"d"@@ at @@/"c"/"f"@@ may be interpreted as pointing to @@/"c"/"d"@@ with is 5. (Only if you're expecting a JSON path at @@/"c"/"f"@@ though, otherwise it's just the string @@"d"@@ of course.)
Note that the quotations around path elements need to be escaped in JSON strings.
!!!Ripple Payment Protocol Messages
Signed Message
Changed lines 65-68 from:
"rsa-key": {
"modulus": (base64),
"exponent": (base64),
}
to:
"signed-message": {
(Ripple message)
},
"signatures": [
{
"hash": ("sha1" | "md5"),
"sign": ("rsa" | "dsa" | "elgamal"),
"signature": (base64)
}
]
(Ripple message)
},
"signatures": [
{
"hash": ("sha1" | "md5"),
"sign": ("rsa" | "dsa" | "elgamal"),
"signature": (base64)
}
]
Changed lines 78-79 from:
to:
Public Key Data Structures
Changed lines 81-83 from:
"error": {
"code": (string),
("message": (string))
"
to:
"dsa-key": {
("p": (base64),)
("q": (base64),)
"g: (base64),
"y: (base64),
"j: (base64),
("seed": (base64),)
("p-gen-counter": (base64),)
("p": (base64),)
("q": (base64),)
"g: (base64),
"y: (base64),
"j: (base64),
("seed": (base64),)
("p-gen-counter": (base64),)
Deleted lines 91-93:
Time
Changed lines 93-96 from:
"time": "2006-10-30 18:47:55.356000"
to:
"rsa-key": {
"modulus": (base64),
"exponent": (base64),
}
"modulus": (base64),
"exponent": (base64),
}
Changed lines 100-101 from:
to:
Error
Changed lines 103-113 from:
"account": {
"account-id": (string),
"unit": (URI),
"initiator": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
"partner": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
"
"
"node-id": (Ripple ID),
"key": (public key data structure)
"partner": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
to:
"error": {
"code": (string),
("message": (string))
}
"code": (string),
("message": (string))
}
Changed lines 110-111 from:
to:
Time
Changed lines 113-120 from:
"account-request": {
"request-id": (integer),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
("note": (string))
}
"request-id"
"account"
(remaining account data structure containing requested field values)
},
("note": (string))
}
to:
"time": "2006-10-30 18:47:55.356000"
Changed lines 117-118 from:
Account Set
to:
Account Data Structure
Changed lines 120-125 from:
"account-set": {
"request-id": (integer - only present on responses to account-requests),
"timestamp": (date/time string),
"account": {
"account-id": (string),
(remaining account datastructure containing requested field values)
"
(remaining account data
to:
"account": {
"account-id": (string),
"unit": (URI),
"initiator": {
"node-id": (Ripple ID),
"key": (public key data structure)
"account-id": (string),
"unit": (URI),
"initiator": {
"node-id": (Ripple ID),
"key": (public key data structure)
Changed lines 127-130 from:
}
to:
"partner": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
"node-id": (Ripple ID),
"key": (public key data structure)
},
Changed lines 134-135 from:
Account Verify Request
to:
Account Request
Changed lines 137-138 from:
"account-verify-request": {
"account-id": "550e8400-e29b-41d4-a716-446655440000"
"
to:
"account-request": {
"request-id": (integer),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
("note": (string))
"request-id": (integer),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
("note": (string))
Changed lines 148-149 from:
Account Verify
to:
Account Set
Changed lines 151-152 from:
"account-verify": {
"timestamp": "2006-11-07 02:11:28.401000",
"
to:
"account-set": {
"request-id": (integer - only present on responses to account-requests),
"timestamp": (date/time string),
"request-id": (integer - only present on responses to account-requests),
"timestamp": (date/time string),
Changed lines 155-156 from:
(...)
}
to:
"account-id": (string),
(remaining account data structure containing requested field values)
},
(remaining account data structure containing requested field values)
},
Changed lines 162-163 from:
Account History Request
to:
Account Verify Request
Changed lines 165-167 from:
"account-history-request": {
"starting": "2006-01-01 00:00:00.000000",
"ending": "2006-11-07 02:11:28.401000"
"
"ending": "2006-11-07 02:11:28.401000
to:
"account-verify-request": {
"account-id": "550e8400-e29b-41d4-a716-446655440000"
"account-id": "550e8400-e29b-41d4-a716-446655440000"
Changed lines 171-172 from:
Account History
to:
Account Verify
Changed lines 174-179 from:
"account-history": [
(a chronological order of signed messages sent and received over
this account during the requested period that have changed a piece
of shared account data, in the format they were originally sent or
received, including signatures)
]
of shared account data, in the format they were originally sent or
received, including signatures)
]
to:
"account-verify": {
"timestamp": "2006-11-07 02:11:28.401000",
"account": {
(...)
}
}
"timestamp": "2006-11-07 02:11:28.401000",
"account": {
(...)
}
}
Changed lines 183-184 from:
Account Close
to:
Account History Request
Changed lines 186-188 from:
"account-close": {
"request-id": 14590,
"account-id": "550e8400-e29b-41d4-a716-446655440000"
"
to:
"account-history-request": {
"starting": "2006-01-01 00:00:00.000000",
"ending": "2006-11-07 02:11:28.401000"
"starting": "2006-01-01 00:00:00.000000",
"ending": "2006-11-07 02:11:28.401000"
Changed lines 193-194 from:
to:
Account History
Changed lines 196-202 from:
"payment-request": {
"payment-id": (string),
"amount": (decimal),
"unit": (URI),
"recipient-node-id": (Ripple ID),
("note": (string))
}
"amount": (decimal),
"unit": (URI),
("note": (string))
}
to:
"account-history": [
(a chronological order of signed messages sent and received over
this account during the requested period that have changed a piece
of shared account data, in the format they were originally sent or
received, including signatures)
]
(a chronological order of signed messages sent and received over
this account during the requested period that have changed a piece
of shared account data, in the format they were originally sent or
received, including signatures)
]
Changed lines 205-206 from:
to:
Account Close
Changed lines 208-212 from:
"payment-init": {
"payment-id": (string),
"amount": (decimal),
"units": (URI),
("note": (string))
"
"
("note": (string))
to:
"account-close": {
"request-id": 14590,
"account-id": "550e8400-e29b-41d4-a716-446655440000"
"request-id": 14590,
"account-id": "550e8400-e29b-41d4-a716-446655440000"
Changed lines 215-216 from:
Payment Accept
to:
Payment Request
Changed lines 218-223 from:
"payment-accept": {
"payment-init": {
(...)
}
"recipient-receipt-key": (public key data structure),
"recipient-certificate": (certificate data structure)
"payment-
"
to:
"payment-request": {
"payment-id": (string),
"amount": (decimal),
"unit": (URI),
"recipient-node-id": (Ripple ID),
("note": (string))
"payment-id": (string),
"amount": (decimal),
"unit": (URI),
"recipient-node-id": (Ripple ID),
("note": (string))
Changed lines 228-229 from:
to:
Payment Init
Changed line 231 from:
"promise": {
to:
"payment-init": {
Deleted lines 232-235:
"path-amount": (decimal),
("path-units": (URI),)
"account-id": (string),
Changed lines 234-242 from:
("penalty-deadline": (date/time string),)
("penalty-rate": (decimal),)
"deadline": (date/time string),
("max-receipt": (decimal),)
"payer-receipt-key": (public key data structure),
"recipient-receipt-key": (public key data structure),
"timestamp": (date/time string
to:
"units": (URI),
("note": (string))
("note": (string))
Changed lines 240-241 from:
to:
Payment Accept
Changed lines 243-245 from:
"encryption-method": ("none" | "rsa" | "dsa")
("key-id": (string),)
"blob": (encrypted routing blob data structure)
to:
"payment-accept": {
"payment-init": {
(...)
}
"recipient-receipt-key": (public key data structure),
"recipient-certificate": (certificate data structure)
}
"payment-init": {
(...)
}
"recipient-receipt-key": (public key data structure),
"recipient-certificate": (certificate data structure)
}
Changed lines 253-254 from:
to:
Promise
Changed lines 256-264 from:
}
Promise Received
{
"promise-received
to:
"promise": {
Changed lines 259-261 from:
"deadline": (date/time string),
to:
"path-amount": (decimal),
("path-units": (URI),)
"account-id": (string),
("path-units": (URI),)
"account-id": (string),
Changed lines 263-271 from:
("max-receipt": (decimal))
to:
("onion": (routing onion data structure),)
"ttl": (date/time string),
("penalty-deadline": (date/time string),)
("penalty-rate": (decimal),)
"deadline": (date/time string),
("max-receipt": (decimal),)
"payer-receipt-key": (public key data structure),
"recipient-receipt-key": (public key data structure),
"timestamp": (date/time string)
"ttl": (date/time string),
("penalty-deadline": (date/time string),)
("penalty-rate": (decimal),)
"deadline": (date/time string),
("max-receipt": (decimal),)
"payer-receipt-key": (public key data structure),
"recipient-receipt-key": (public key data structure),
"timestamp": (date/time string)
Changed lines 276-277 from:
to:
Routing Onion Data Structure
Changed lines 279-283 from:
"receipt": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
}
}
to:
"encryption-method": ("none" | "rsa" | "dsa")
("key-id": (string),)
"blob": (encrypted routing blob data structure)
("key-id": (string),)
"blob": (encrypted routing blob data structure)
Changed lines 285-286 from:
to:
Routing Blob Data Structure
Changed lines 288-299 from:
("amount": (decimal),)
"signed-message" {
(receipt)
}
}
}
Receipt Accept
to:
(arbitrary data),
"onion": (inner layers of onion)
}
Promise Received
"onion": (inner layers of onion)
}
Promise Received
Changed lines 296-301 from:
"receipt-accept": {
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp":(date/time string),
"timestamp":
to:
"promise-received": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"deadline": (date/time string),
"amount": (decimal),
"payment-id": (string),
"path-id": [(ordered list of strings)],
"deadline": (date/time string),
"amount": (decimal),
Changed lines 305-312 from:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
to:
Receipt
Changed line 309 from:
"promise-release": {
to:
"receipt": {
Changed lines 311-314 from:
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
"amount": (decimal),
"timestamp": (date/time string
to:
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
"path-amount": (decimal)
Added lines 316-360:
Receipt Redeem
{
"receipt-redeem": {
"account-id": (string),
("amount": (decimal),)
"signed-message" {
(receipt)
}
}
}
Receipt Accept
{
"receipt-accept": {
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
}
}
Notes:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
{
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
}
}
Changed lines 237-238 from:
to:
Routing Onion Data Structure
Changed lines 240-246 from:
"promise-received": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"deadline": (date/time string),
"amount": (decimal),
("max-receipt": (decimal))
}
"amount": (decimal
("max-receipt": (decimal))
}
to:
"encryption-method": ("none" | "rsa" | "dsa")
("key-id": (string),)
"blob": (encrypted routing blob data structure)
("key-id": (string),)
"blob": (encrypted routing blob data structure)
Changed lines 246-247 from:
to:
Routing Blob Data Structure
Changed lines 249-257 from:
"receipt": {
to:
(arbitrary data),
"onion": (inner layers of onion)
}
Promise Received
{
"promise-received": {
"onion": (inner layers of onion)
}
Promise Received
{
"promise-received": {
Changed lines 260-262 from:
"path-amount": (decimal)
to:
"deadline": (date/time string),
"amount": (decimal),
("max-receipt": (decimal))
"amount": (decimal),
("max-receipt": (decimal))
Changed lines 267-268 from:
Receipt Redeem
to:
Receipt
Changed lines 270-275 from:
"receipt-redeem": {
"account-id": (string),
("amount": (decimal),)
"signed-message" {
(receipt)
}
"
}
to:
"receipt": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
Changed lines 278-279 from:
Receipt Accept
to:
Receipt Redeem
Changed lines 281-282 from:
"receipt-accept": {
to:
"receipt-redeem": {
"account-id": (string),
"account-id": (string),
Changed lines 284-288 from:
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
(
}
"timestamp": (date/time string),
("max-receipt": (decimal))
to:
"signed-message" {
(receipt)
}
(receipt)
}
Changed lines 290-297 from:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
to:
Receipt Accept
Changed lines 294-299 from:
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
"
to:
"receipt-accept": {
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
Changed lines 304-321 from:
to:
Notes:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
{
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
}
}
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
{
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
}
}
Changed line 10 from:
* third-party timestamp/relay/verifiers
to:
* third-party timestamp/relay/verifiers - how can they deliver?
Changed lines 17-305 from:
to:
* handle rounding
---------------
Ripple Payment Protocol Messages
Signed Message
{
"signed-message": {
"content": { (Ripple message) },
"signatures": [
{
"hash": ("sha1" | "md5"),
"sign": ("rsa" | "dsa" | "elgamal"),
"signature": (base64)
}
]
}
Public Key Data Structures
{
"dsa-key": {
("p": (base64),)
("q": (base64),)
"g: (base64),
"y: (base64),
"j: (base64),
("seed": (base64),)
("p-gen-counter": (base64),)
}
}
{
"rsa-key": {
"modulus": (base64),
"exponent": (base64),
}
}
Error
{
"error": {
"code": (string),
("message": (string))
}
}
Time
{
"time": "2006-10-30 18:47:55.356000"
}
Account Data Structure
{
"account": {
"account-id": (string),
"unit": (URI),
"initiator": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
"partner": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
}
Account Request
{
"account-request": {
"request-id": (integer),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
("note": (string))
}
}
Account Set
{
"account-set": {
"request-id": (integer - only present on responses to account-requests),
"timestamp": (date/time string),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
}
}
Account Verify Request
{
"account-verify-request": {
"account-id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Account Verify
{
"account-verify": {
"timestamp": "2006-11-07 02:11:28.401000",
"account": {
(...)
}
}
}
Account History Request
{
"account-history-request": {
"starting": "2006-01-01 00:00:00.000000",
"ending": "2006-11-07 02:11:28.401000"
}
}
Account History
{
"account-history": [
(a chronological order of signed messages sent and received over
this account during the requested period that have changed a piece
of shared account data, in the format they were originally sent or
received, including signatures)
]
}
Account Close
{
"account-close": {
"request-id": 14590,
"account-id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Payment Request
{
"payment-request": {
"payment-id": (string),
"amount": (decimal),
"unit": (URI),
"recipient-node-id": (Ripple ID),
("note": (string))
}
}
Payment Init
{
"payment-init": {
"payment-id": (string),
"amount": (decimal),
"units": (URI),
("note": (string))
}
}
Payment Accept
{
"payment-accept": {
"payment-init": {
(...)
}
"recipient-receipt-key": (public key data structure),
"recipient-certificate": (certificate data structure)
}
}
Promise
{
"promise": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal),
("path-units": (URI),)
"account-id": (string),
"amount": (decimal),
("onion": (routing onion data structure),)
"ttl": (date/time string),
("penalty-deadline": (date/time string),)
("penalty-rate": (decimal),)
"deadline": (date/time string),
("max-receipt": (decimal),)
"payer-receipt-key": (public key data structure),
"recipient-receipt-key": (public key data structure),
"timestamp": (date/time string)
}
}
Promise Received
{
"promise-received": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"deadline": (date/time string),
"amount": (decimal),
("max-receipt": (decimal))
}
}
Receipt
{
"receipt": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
}
}
Receipt Redeem
{
"receipt-redeem": {
"account-id": (string),
("amount": (decimal),)
"signed-message" {
(receipt)
}
}
}
Receipt Accept
{
"receipt-accept": {
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
}
}
Notes:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
{
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
}
}
---------------
Ripple Payment Protocol Messages
Signed Message
{
"signed-message": {
"content": { (Ripple message) },
"signatures": [
{
"hash": ("sha1" | "md5"),
"sign": ("rsa" | "dsa" | "elgamal"),
"signature": (base64)
}
]
}
Public Key Data Structures
{
"dsa-key": {
("p": (base64),)
("q": (base64),)
"g: (base64),
"y: (base64),
"j: (base64),
("seed": (base64),)
("p-gen-counter": (base64),)
}
}
{
"rsa-key": {
"modulus": (base64),
"exponent": (base64),
}
}
Error
{
"error": {
"code": (string),
("message": (string))
}
}
Time
{
"time": "2006-10-30 18:47:55.356000"
}
Account Data Structure
{
"account": {
"account-id": (string),
"unit": (URI),
"initiator": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
"partner": {
"node-id": (Ripple ID),
"key": (public key data structure)
},
}
Account Request
{
"account-request": {
"request-id": (integer),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
("note": (string))
}
}
Account Set
{
"account-set": {
"request-id": (integer - only present on responses to account-requests),
"timestamp": (date/time string),
"account": {
"account-id": (string),
(remaining account data structure containing requested field values)
},
}
}
Account Verify Request
{
"account-verify-request": {
"account-id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Account Verify
{
"account-verify": {
"timestamp": "2006-11-07 02:11:28.401000",
"account": {
(...)
}
}
}
Account History Request
{
"account-history-request": {
"starting": "2006-01-01 00:00:00.000000",
"ending": "2006-11-07 02:11:28.401000"
}
}
Account History
{
"account-history": [
(a chronological order of signed messages sent and received over
this account during the requested period that have changed a piece
of shared account data, in the format they were originally sent or
received, including signatures)
]
}
Account Close
{
"account-close": {
"request-id": 14590,
"account-id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Payment Request
{
"payment-request": {
"payment-id": (string),
"amount": (decimal),
"unit": (URI),
"recipient-node-id": (Ripple ID),
("note": (string))
}
}
Payment Init
{
"payment-init": {
"payment-id": (string),
"amount": (decimal),
"units": (URI),
("note": (string))
}
}
Payment Accept
{
"payment-accept": {
"payment-init": {
(...)
}
"recipient-receipt-key": (public key data structure),
"recipient-certificate": (certificate data structure)
}
}
Promise
{
"promise": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal),
("path-units": (URI),)
"account-id": (string),
"amount": (decimal),
("onion": (routing onion data structure),)
"ttl": (date/time string),
("penalty-deadline": (date/time string),)
("penalty-rate": (decimal),)
"deadline": (date/time string),
("max-receipt": (decimal),)
"payer-receipt-key": (public key data structure),
"recipient-receipt-key": (public key data structure),
"timestamp": (date/time string)
}
}
Promise Received
{
"promise-received": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"deadline": (date/time string),
"amount": (decimal),
("max-receipt": (decimal))
}
}
Receipt
{
"receipt": {
"payment-id": (string),
"path-id": [(ordered list of strings)],
"path-amount": (decimal)
}
}
Receipt Redeem
{
"receipt-redeem": {
"account-id": (string),
("amount": (decimal),)
"signed-message" {
(receipt)
}
}
}
Receipt Accept
{
"receipt-accept": {
("amount": (decimal),)
"receipt-redeem" {
(...)
},
"timestamp": (date/time string),
("max-receipt": (decimal))
}
}
Notes:
* official amount may be declared in either receipt-redeem or receipt-accept
* negotiated with error messages, or set ahead of time?
Promise Release
{
"promise-release": {
"payment-id": (string),
"path-id": (string),
"path-amount": (decimal),
"amount": (decimal),
"timestamp": (date/time string)
}
}
Changed lines 16-17 from:
* flesh out finalizing payment
to:
* flesh out finalizing payment
* handle rounding
* handle rounding
Added line 13:
* max-fees limit on promise (requires specifying known path-units)
Added lines 1-15:
'''Todo'''
* message signing
* public key data structure
* certificate data structure
* routing onion data structure
* releasing promises
* collecting on penalties
* delays/disputes
* third-party timestamp/relay/verifiers
* partial receipts/max receipt amount field
* fees (flat fees possible by intermediary altering path-amount?)
* define valid receipt
* error messages
* flesh out finalizing payment
* message signing
* public key data structure
* certificate data structure
* routing onion data structure
* releasing promises
* collecting on penalties
* delays/disputes
* third-party timestamp/relay/verifiers
* partial receipts/max receipt amount field
* fees (flat fees possible by intermediary altering path-amount?)
* define valid receipt
* error messages
* flesh out finalizing payment