#Escrow
13 messages · Page 1 of 1 (latest)
Do you have access to the original OfferCreate transaction? If so, you need to grab the OfferSequence from that transaction. Here's an example: https://xrpl.org/docs/tutorials/how-tos/use-specialized-payment-types/use-escrows/send-a-time-held-escrow#6.-submit-escrowfinish-transaction
If you do not know the OfferCreate transaction, you could search through the escrow objects held by the account. Here's an example using the account_objects request. (You don't have to use websockets, this can be accomplished with JSON-RPC requests or rippled CLI too)
https://xrpl.org/docs/tutorials/how-tos/use-specialized-payment-types/use-escrows/look-up-escrows
Look up pending escrows by sender or destination address.
Create an escrow whose only condition for release is that a specific time has passed.
I meant EscrowCreate transactions in the above message, not OfferCreate
@nova lotus as @open spoke said. but there is an additional step: if you fetch the Escrows with the account_objects method, those Escrows do not contain the OfferSequence. So the escrow objects themselves do not contain the sequence.
You will have to check the A0951691DF3BCBEEB3108F2229A702D078BBBF848268BC601E59B68A2E390AAC transaction field which is the transaction hash of the transaction which altered this escrow object. in this case it created the escrow.
then you have to fetch the tx_hash to get the transaction meta data and there you find the OfferSequence of the escrow
command: "tx",
transaction: escrow.PreviousTxnID,
}```
Thanks guys
if you have the chance: store the sequence when the escrow is created. easier to handle. but checking the PreviousTxnID is always a (fallback) option
ah interesting, I didn't know that! It would have been prudent to save the OfferSequence on the Offer Ledger object. It would save a lot of work for these type of users (who don't have the OfferSeq on hand)
I think the only reason it hasn't been done is because you'd need an amendment, and that's a lot of effort for this tiny fix. But theoretically it could be added.
The OfferSequence is actually part of the Escrow ledger index (Escrow ID) or what you want to call it. But unfortunately that's hashes and therefore you can't decode it 😅
I meant as a param in the object