1

I'm currently writing an app that facilitates multi-sig transactions, and one of the issues we faced was the fact that to enable multiple transactions to be created and signed, we had to use channel accounts in order to avoid having the wrong sequence number for a transaction e.g If we created two transactions using the multi-sig accounts sequence number, we would fall into a sequencing issue if we submitted the second transaction before the first one.

This is working great, however when you get the operations for an account (e.g /accounts/{multi_sig_account_id}/operations) it doesn't show the operations from the transaction submitted using the channel account.

It's odd because the transaction shows up when I look get the transactions for the account ( /accounts/{multi_sig_account_id}/transactions ), however it's a not really a useful endpoint as it doesnt show information about each operation in the transaction.

Is this intended behaviour?

1

when you get the operations for an account (e.g /accounts/{multi_sig_account_id}/operations) it doesn't show the operations from the transaction submitted using the channel account.

I guess it's because you apply operations to the channel accounts, so neither of operations are applied directly to the "multi_sig_account". Therefore, such operations shouldn't be displayed by /accounts/{multi_sig_account_id}/operations endpoint. It's hard to tell without a context; a link to an example tx would be helpful.

however it's a not really a useful endpoint as it doesnt show information about each operation in the transaction.

Actually, you can retrieve operations from the transaction. Just convert envelope_xdr to the transaction object.

const tx = new StellarSdk.Transaction(envelope_xdr)
console.log(tx.operations)
  • Here's an example transaction horizon-testnet.stellar.org/transactions/… if you click on the envelope xdr you can see the source account for the transaction is the channel account but the source account for the payment operation is GAM2YDZ234OYBN3VYL7WU2ZULJHKSOLSBHFWGTK3DUGKMZQ4HSF7KL4F (the multisig account). Thanks for the tip, I knew how to get the operations from a envelope, however I didn't want to have to loop through all of the transactions items. I thought using the operations endpoint made more sense – Adil Ali Dec 27 '18 at 14:58
  • stellar.org/laboratory/… here's the link to env – Adil Ali Dec 27 '18 at 15:02
  • Looks like GB7OTX...LN26C4K is your multi-sig account. But it is neither a channel or source account of the tx (merely one more signature keypair), so naturally the operations endpoint won't show the operations for it. Have you tried using GAM2YD...HSF7KL4F as a multi-sig account? In that case you'll get exactly what you want from /account/GAM2YD...HSF7KL4F/operations. Maybe even there is no need to change anything in the signature schema if GAM2YD...HSF7KL4F is a source account for all your operations. – Orbit Lens Dec 27 '18 at 15:19
  • Sorry I should've been more clear; GAM2YD...HSF7KL4F is the multisig account, GB7OTX...LN26C4K is one of the signers for the multi-sig account, and GAYWPB...7GS6B4INX is the channel account. looking at /accounts/GAM2YD...HSF7KL4F/operations doesn't show the payment operation where the source is GAM2YD...HSF7KL4F, but looking at /accounts/GAM2YD...HSF7KL4F/transactions does show the transaction where the source account for the payment operation is GAM2YD...HSF7KL4F – Adil Ali Dec 27 '18 at 15:39
  • 1
    Oh wow lol that's pretty stupid of me, this whole time I thought the default limit was 20 not 10. Thanks a lot man! – Adil Ali Dec 27 '18 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.