Skip to content

Commit

Permalink
Fix escrow condition and fulfillment descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonianb committed Apr 12, 2017
1 parent b556433 commit 081fcbf
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/index.md
Expand Up @@ -534,7 +534,7 @@ amount | [value](#value) | Amount of XRP for sender to escrow.
destination | [address](#ripple-address) | Address to receive escrowed XRP.
allowCancelAfter | date-time string | *Optional* If present, the escrow may be cancelled after this time.
allowExecuteAfter | date-time string | *Optional* If present, the escrow can not be executed before this time.
condition | string | *Optional* If present, fulfillment is required upon execution.
condition | string | *Optional* A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). If present, `fulfillment` is required upon execution.
destinationTag | integer | *Optional* Destination tag.
memos | [memos](#transaction-memos) | *Optional* Array of memos to attach to the transaction.
sourceTag | integer | *Optional* Source tag.
Expand Down Expand Up @@ -580,8 +580,8 @@ Name | Type | Description
---- | ---- | -----------
owner | [address](#ripple-address) | The address of the owner of the escrow to execute.
escrowSequence | [sequence](#account-sequence-number) | The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to execute.
condition | string | *Optional* The original `condition` from the escrow creation transaction. This is sha256 hash of `fulfillment` string. It is replicated here so that the relatively expensive hashing operation can be delegated to a server without ledger history and the server with ledger history only has to do a quick comparison of the old condition with the new condition.
fulfillment | string | *Optional* A value that produces the condition when hashed. It must be 32 charaters long and contain only 8-bit characters.
condition | string | *Optional* A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). This must match the original `condition` from the escrow creation transaction.
fulfillment | string | *Optional* A hex value representing the [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) fulfillment for `condition`.
memos | [memos](#transaction-memos) | *Optional* Array of memos to attach to the transaction.

### Example
Expand Down
2 changes: 1 addition & 1 deletion src/common/schemas/specifications/escrow-creation.json
Expand Up @@ -15,7 +15,7 @@
"memos": {"$ref": "memos"},
"condition": {
"type": "string",
"description": "If present, fulfillment is required upon execution.",
"description": "A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). If present, `fulfillment` is required upon execution.",
"pattern": "^[A-F0-9]{0,256}$"
},
"allowCancelAfter": {
Expand Down
4 changes: 2 additions & 2 deletions src/common/schemas/specifications/escrow-execution.json
Expand Up @@ -15,12 +15,12 @@
},
"condition": {
"type": "string",
"description": "The original `condition` from the escrow creation transaction. This is sha256 hash of `fulfillment` string. It is replicated here so that the relatively expensive hashing operation can be delegated to a server without ledger history and the server with ledger history only has to do a quick comparison of the old condition with the new condition.",
"description": "A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). This must match the original `condition` from the escrow creation transaction.",
"pattern": "^[A-F0-9]{0,256}$"
},
"fulfillment": {
"type": "string",
"description": "A value that produces the condition when hashed. It must be 32 charaters long and contain only 8-bit characters.",
"description": "A hex value representing the [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) fulfillment for `condition`.",
"pattern": "^[A-F0-9]+$"
}
},
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/requests/prepare-escrow-creation-full.json
@@ -1,7 +1,7 @@
{
"destination": "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo",
"amount": "0.01",
"condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"allowExecuteAfter": "2014-09-24T21:21:50.000Z",
"memos": [
{
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/responses/get-transaction-escrow-create.json
Expand Up @@ -13,7 +13,7 @@
"data": "mema data"
}
],
"condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"allowCancelAfter": "2015-11-16T06:53:42.000Z",
"allowExecuteAfter": "2015-11-16T06:47:42.000Z",
"destinationTag": 2,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/responses/prepare-escrow-creation-full.json
@@ -1,5 +1,5 @@
{
"txJSON": "{\"TransactionType\":\"EscrowCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"10000\",\"Condition\":\"8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4\",\"FinishAfter\":464908910,\"SourceTag\":1,\"DestinationTag\":2,\"Memos\":[{\"Memo\":{\"MemoData\":\"7465787465642064617461\",\"MemoType\":\"74657374\"}}],\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
"txJSON": "{\"TransactionType\":\"EscrowCreate\",\"Account\":\"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59\",\"Destination\":\"rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo\",\"Amount\":\"10000\",\"Condition\":\"A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100\",\"FinishAfter\":464908910,\"SourceTag\":1,\"DestinationTag\":2,\"Memos\":[{\"Memo\":{\"MemoData\":\"7465787465642064617461\",\"MemoType\":\"74657374\"}}],\"Flags\":2147483648,\"LastLedgerSequence\":8819954,\"Fee\":\"12\",\"Sequence\":23}",
"instructions": {
"fee": "0.000012",
"sequence": 23,
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/rippled/tx/escrow-creation-iou.json
Expand Up @@ -6,7 +6,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"Fee": "12",
"FinishAfter": 500971662,
"Flags": 2147483648,
Expand Down Expand Up @@ -41,7 +41,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"FinishAfter": 500971662,
"SourceTag": 1
}
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/rippled/tx/escrow-creation.json
Expand Up @@ -6,7 +6,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"Fee": "12",
"FinishAfter": 500971662,
"Flags": 2147483648,
Expand Down Expand Up @@ -41,7 +41,7 @@
"CancelAfter": 500972022,
"Destination": "rp8rJYTpodf8qbSCHVTNacf8nSW8mRakFw",
"DestinationTag": 2,
"Condition": "8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4",
"Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"FinishAfter": 500971662,
"SourceTag": 1
}
Expand Down

0 comments on commit 081fcbf

Please sign in to comment.