#Escrow

13 messages · Page 1 of 1 (latest)

nova lotus
#

I am making EscrowFinish transactions. I want to know how to get offerSequence and type of offerSequence.

open spoke
#

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

#

I meant EscrowCreate transactions in the above message, not OfferCreate

rugged osprey
#

@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,
            }```
nova lotus
#

Thanks guys

rugged osprey
#

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

open spoke
proud furnace
#

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.

rugged osprey
proud furnace
#

I meant as a param in the object