Skip to content

Transaction simulation should return serialized simulationResponse #256

@aristidesstaffieri

Description

@aristidesstaffieri

What problem does your feature solve?

Our simulation endpoints get the simulation response from RPC, then they prepare the transaction, then return the simulation response along with the prepared transaction to clients. This means that when the client side needs to use internal of the SimulateTransactionSuccessResponse like transactionData, they have no way to instantiate the associated class becuase we don't pass through the corresponding xdr.

What would you like to see?

Serialize the transactionData and return that along with the other SimulateTransactionSuccessResponse fields.

const data = {
  simulationResponse: {
    transactionData: simulationResponse.transactionData.build().toXDR(),
    .... the rest of the fields ....
 },
  preparedTransaction: built.toXDR(),
};

What alternatives are there?

Have clients reach into the transaction data internal fields for data that should be accessed through accesor methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions