Skip to content

Include prepared transaction data in submit requests #4

Description

@brittleboye

Convex-Dev/convex#655 makes transaction preparation stateless so public prepare requests cannot populate a Peer primary store. The prepare response already contains both hash (the bytes to sign) and data (the complete multi-cell transaction). POST /api/v1/transaction/submit will now require data as well as hash, accountKey, and sig.

Please update this SDK to:

  • retain data from the prepare response without re-encoding it;
  • continue signing hash exactly as before;
  • include the unchanged data string in the submit JSON body;
  • report a clear client error if prepare does not return either hash or data;
  • add a prepare/sign/submit regression test using a transaction with non-embedded data (over 140 encoded bytes), so a hash-only implementation cannot pass accidentally.

The server will reject missing data with a message directing callers to pass the complete data returned by transaction/prepare, and will reject mismatched hash/data before queueing the transaction.

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