mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-08-21 07:30:52 +00:00
@@ -4434,6 +4434,12 @@ address | [address](#address) | The address of the account that is creating the
|
||||
escrowCreation | [escrowCreation](#escrow-creation) | The specification of the escrow creation to prepare.
|
||||
instructions | [instructions](#transaction-instructions) | *Optional* Instructions for executing the transaction
|
||||
|
||||
This is a convenience method for generating the EscrowCreate JSON used by rippled, so the same restrictions apply.
|
||||
|
||||
Field mapping: `allowCancelAfter` is equivalent to rippled's `CancelAfter`; `allowExecuteAfter` is equivalent to `FinishAfter`. At the `allowCancelAfter` time, the escrow is considered expired. This means that the funds can only be returned to the sender. At the `allowExecuteAfter` time, the escrow is permitted to be released to the recipient (if the `condition` is fulfilled).
|
||||
|
||||
Note that `allowCancelAfter` must be chronologically later than `allowExecuteAfter`.
|
||||
|
||||
### Return Value
|
||||
|
||||
This method returns a promise that resolves with an object with the following structure:
|
||||
|
||||
@@ -8,6 +8,12 @@ Prepare an escrow creation transaction. The prepared transaction must subsequent
|
||||
|
||||
<%- renderSchema('input/prepare-escrow-creation.json') %>
|
||||
|
||||
This is a convenience method for generating the EscrowCreate JSON used by rippled, so the same restrictions apply.
|
||||
|
||||
Field mapping: `allowCancelAfter` is equivalent to rippled's `CancelAfter`; `allowExecuteAfter` is equivalent to `FinishAfter`. At the `allowCancelAfter` time, the escrow is considered expired. This means that the funds can only be returned to the sender. At the `allowExecuteAfter` time, the escrow is permitted to be released to the recipient (if the `condition` is fulfilled).
|
||||
|
||||
Note that `allowCancelAfter` must be chronologically later than `allowExecuteAfter`.
|
||||
|
||||
### Return Value
|
||||
|
||||
This method returns a promise that resolves with an object with the following structure:
|
||||
|
||||
@@ -46,8 +46,8 @@ function createEscrowCreationTransaction(account: string,
|
||||
}
|
||||
if (Boolean(payment.allowCancelAfter) && Boolean(payment.allowExecuteAfter) &&
|
||||
txJSON.CancelAfter <= txJSON.FinishAfter) {
|
||||
throw new ValidationError('"CancelAfter" must be after "FinishAfter" for'
|
||||
+ ' EscrowCreate')
|
||||
throw new ValidationError('prepareEscrowCreation: ' +
|
||||
'"allowCancelAfter" must be after "allowExecuteAfter"')
|
||||
}
|
||||
return txJSON
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user