hashgraph / hashgraph/stablecoin-studio
`transfer` and `transfers` Methods Not Implemented in Hedera Transaction Adapters
- Dominant language
- TypeScript
- Stars
- 67
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
## Description
The `transfer` and `transfers` operations in the Stablecoin Studio SDK (@hashgraph/stablecoin-npm-sdk) currently throw a "Method not implemented" error when using Hedera-based transaction adapters (e.g., `ExternalHederaTransactionAdapter` or `ClientTransactionAdapter`).
While these methods are defined in the `TransactionAdapter` interface and base abstract class, they are not overridden in the concrete Hedera adapter implementations, rendering the `TransferStablecoinTool` in the Hedera Agent Kit plugin non-functional.
## Steps to Reproduce
1. Initialize the Stablecoin Studio SDK with a Hedera account.
2. Attempt to call `StableCoin.transfers()` using a `TransfersRequest`.
3. The operation fails with the following error:
```text
Failed to transfer stablecoin: Method not implemented.
```
## Technical Analysis
- **Base Class**: [`packages/sdk/src/port/out/TransactionAdapter.ts`](https://github.com/hashgraph/stablecoin-studio/blob/main/packages/sdk/src/port/out/TransactionAdapter.ts) defines the methods with a default `throw new Error('Method not implemented.');`.
- **Missing Overrides**: [`packages/sdk/src/port/out/hs/BaseHederaTransactionAdapter.ts`](https://github.com/hashgraph/stablecoin-studio/blob/main/packages/sdk/src/port/out/hs/BaseHederaTransactionAdapter.ts) (the base for all Hedera-based wallets) does not provide an implementation for these methods.
- **Affected Adapters**:
- `ExternalHederaTransactionAdapter`
- `ClientTransactionAdapter`
- **Command Handler**: `packages/sdk/src/app/usecase/command/stablecoin/operations/transfer/TransfersCommandHandler.ts` correctly routes the request to the handler, but the handler lacks the implementation.
## Expected Behavior
The `transfer` and `transfers` methods should be implemented in `BaseHederaTransactionAdapter.ts` using the standard Hiero SDK `TransferTransaction` or the appropriate smart contract calls if applicable.
## Environment
- **SDK Version**: 4.2.0
- **Network**: Hedera Testnet
- **Platform**: Linux
Contributor guide
Assessment
This issue has not been assessed yet.