Skip to content

feat(billing): submit vault deduct via stellar-sdk with u64 request ids - #1555

Open
esegbueadam-sys wants to merge 1 commit into
CalloraOrg:mainfrom
esegbueadam-sys:feat/soroban-vault-billing-client
Open

esegbueadam-sys wants to merge 1 commit into
CalloraOrg:mainfrom
esegbueadam-sys:feat/soroban-vault-billing-client

Conversation

@esegbueadam-sys

Copy link
Copy Markdown
Contributor
  • Replace simulate-only Soroban RPC client with SorobanVaultBillingClient that builds, signs, submits and confirms real vault.deduct(caller, amount, request_id) transactions using @stellar/stellar-sdk
  • Add deterministic u64 onchain_request_id from Postgres sequence (never 0, reused across retries for idempotency)
  • Map VaultError contract codes to stable SorobanRpcError categories (InsufficientBalance→INSUFFICIENT_BALANCE, Paused/Unauthorized/ExceedsMaxDeduct→CONTRACT_ERROR)
  • Wire createSorobanBillingService to new client; missing SOROBAN_BILLING_BACKEND_SECRET_KEY logs warning and returns undefined (no partial client)
  • Update docs: billing-deduct.md request_id mapping, fee-abstraction.md, soroban-simulation-diagnostics.md error codes, .env.example with testnet values
  • Add onchain_request_id column + sequence migration 0033
  • Reorder app.ts dependencies: vaultRepository resolved before billing service

Closes #1487

- Replace simulate-only Soroban RPC client with SorobanVaultBillingClient that builds, signs, submits and confirms real vault.deduct(caller, amount, request_id) transactions using @stellar/stellar-sdk
- Add deterministic u64 onchain_request_id from Postgres sequence (never 0, reused across retries for idempotency)
- Map VaultError contract codes to stable SorobanRpcError categories (InsufficientBalance→INSUFFICIENT_BALANCE, Paused/Unauthorized/ExceedsMaxDeduct→CONTRACT_ERROR)
- Wire createSorobanBillingService to new client; missing SOROBAN_BILLING_BACKEND_SECRET_KEY logs warning and returns undefined (no partial client)
- Update docs: billing-deduct.md request_id mapping, fee-abstraction.md, soroban-simulation-diagnostics.md error codes, .env.example with testnet values
- Add onchain_request_id column + sequence migration 0033
- Reorder app.ts dependencies: vaultRepository resolved before billing service
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.

Replace the simulate-only Soroban billing client with a real build, sign, submit and confirm flow against the vault ABI

1 participant