2

I want to be able to fund account creation only if account is going to add myself as an additional signer for this account. I thought on creating transaction with SetOptions operation that will set thresholds and add myself as an additional signer. The account that should be created will send me signed transaction with SetOptions operation. Then I submit account creation request followed by signed transaction with SetOptions operation. Problem is that it seems to be no way to sign transaction when sequence number is unknown and sequence number cannot be retrieved for non-existing account. Is there workaround? Thanks.

2

You can build a transaction with 2 operations in it to achieve this.

Setup:

  • A: G...ZAUC is your account
  • B: G...ONYI is the account you want to create

Transaction

  • Source of the transaction is A
  • First Operation: Create account B
  • Second Operation: Set the weights and add A to B signers, the source of the operation is B.

Since B is the source of an operation but not of the transaction, we don't need to know its sequence number.

Signing

Both accounts will have to sign the transaction before sending to the network

View Transaction in Laboratory

  • Thanks, it is neat. I can also add additional operations such as creating trust line for newly created account, correct? – user127993 Oct 13 at 14:56
  • That's correct. – Francesco Oct 13 at 15:15

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.