Skip to content

Implement xdr transaction builder and signer for soroban contract calls in backend - #896

Open
Johnsource-hub wants to merge 6 commits into
scout-off:mainfrom
Johnsource-hub:Implement-XDR-transaction-builder-and-signer-for-Soroban-contract-calls-in-backend
Open

Implement xdr transaction builder and signer for soroban contract calls in backend#896
Johnsource-hub wants to merge 6 commits into
scout-off:mainfrom
Johnsource-hub:Implement-XDR-transaction-builder-and-signer-for-Soroban-contract-calls-in-backend

Conversation

@Johnsource-hub

Copy link
Copy Markdown

#close
#796

Summary
This PR introduces SorobanTransactionBuilder in src/utils/contract.ts, providing a robust, stateless, and fully typed transaction pipeline for building, simulating, signing, and submitting Soroban contract invocations on Steller

Key Changes

  1. SorobanTransactionBuilder (src/utils/contract.ts)
    Build (buildContractCall): Retrieves source account sequence numbers directly from Soroban RPC and builds the un-simulated contract call Transaction.
    Simulate (simulate): Invokes server.simulateTransaction, computes resource footprint/fees via SorobanRpc.assembleTransaction, and extracts authorization entries (SorobanAuthorizationEntry[]).
    Sign & Fee-Bump (sign): Supports signing with source keypairs and creating/signing fee-bump transaction envelopes (FeeBumpTransaction) for sponsored transactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant