-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Summary
We need Stablecoin Studio SDK support for a external build-only flow that returns full Hedera transaction bytes for frontend wallet/external app signing, without requiring private keys and without relying on the SDK’s multisig HTTP backend; WalletConnect/HashPack adapters are frontend interactive.
What we’re trying to build (Goal)
A Stablecoin Studio plugin for the Hedera Agent Kit
We need a backend-driven/external-driven, non-custodial transaction flow:
- Hedera Agent Kit (agent runtime) builds Stablecoin Studio transactions. No private key held on HAK. Produces fully-formed, frozen Hedera transaction bytes
- Frontend wallet (HashPack / WalletConnect) or any third-party signsAndExecutes the transaction
This is a standard external signer pattern required for agents and headless runtimes.
Why this is required
Agents / Hedera MCP / etc must not custody end-user private keys. We need a clean build → sign&submit externally lifecycle. This is foundational for agent-based and server-side automation use cases
Current SDK behavior (what happens today)
The smoke test uses: Network.connect(..., SupportedWallets.CLIENT, privateKey) which:
- Mutates global SDK state
- Signs internally for every
StableCoin*call Networkis effectively a singleton:connect()selects a transaction adapter- Sets the active account
- Locks you into a signing model up front
The core blocker
There is no supported “build-only / return transaction bytes” mode in the SDK.The only mode that returns tx bytes today: SupportedWallets.MULTISIG…but it is implemented as:
- Freeze tx
- toBytes()
- HTTP POST to a backend service via BackendAdapter.addTransaction(...)
- Later: signatures are POSTedtx is fetched
backsignatures attachedtxsubmitted. This forces an external backend storage + HTTP roundtrip, even if the consumer just wants the bytes in-process.
Asks
We explicitly do not want: SDK-controlled backend storage
HTTP-based transaction persistence just to retrieve bytes
We want: freeze → bytes → return to caller
Why
WalletConnect / HashPack adapters don’t solve this
- Wallet adapters are frontend, interactive by design: They require
window/ UI session& assume user presence - They follow sign-and-execute, not build-and-return
- They do not expose:
- unsigned tx bytes
- a “don’t submit yet” option
- They’re not usable from a headless BE / agent runtime.
What we think the SDK needs (recommended solution)
- First-class External Signer / Build-Only strategyExample names:
- EXTERNAL_SIGNER
- BUILD_ONLY
- RETURN_BYTES
Capabilities:
- no private key required
- build + freeze transactions
- return:
Transaction.toBytes()basic metadata (tx type, description, required signers) - no automatic submission
- Proper extension point for adapters, so consumers don’t need to fork internals:
Network.registerTransactionAdapter(...)Network.setTransactionHandler(...)- adapter factory injection
(Authored by @piotrswierzy)